Skip to content
This repository has been archived by the owner on Jun 12, 2019. It is now read-only.

Commit

Permalink
[tb October 2018] rechit production without common mode noise subtrac…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
ThorbenQuast committed Nov 10, 2018
1 parent 990fee1 commit 9da7665
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
24 changes: 13 additions & 11 deletions Reco/plugins/HGCalTBRecHitProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ HGCalTBRecHitProducer::HGCalTBRecHitProducer(const edm::ParameterSet& cfg) :
m_calibrationPerChannel(cfg.getUntrackedParameter<bool>("calibrationPerChannel", false)),
m_expectedMaxTimeSample(cfg.getUntrackedParameter<int>("ExpectedMaxTimeSample", 3)),
m_maxADCCut(cfg.getUntrackedParameter<double>("MaxADCCut", 15)),
m_subtractCommonMode(cfg.getUntrackedParameter<bool>("subtractCommonMode", true)),
m_preselectionMethod(cfg.getUntrackedParameter<std::string>("preselectionMethod", "TB2018"))
{
m_HGCalTBRawHitCollection = consumes<HGCalTBRawHitCollection>(cfg.getParameter<edm::InputTag>("InputCollection"));
Expand Down Expand Up @@ -89,8 +90,9 @@ void HGCalTBRecHitProducer::produce(edm::Event& event, const edm::EventSetup& iS
event.getByToken(m_HGCalTBRawHitCollection, rawhits);

CommonMode cm(essource_.emap_); //default is common mode per chip using the median
cm.Evaluate( rawhits );
if (m_subtractCommonMode) cm.Evaluate( rawhits );
std::map<int, commonModeNoise> cmMap = cm.CommonModeNoiseMap();


std::vector<std::pair<double, double> > CellXY;
PulseFitter fitter(0);
Expand Down Expand Up @@ -122,30 +124,30 @@ void HGCalTBRecHitProducer::produce(edm::Event& event, const edm::EventSetup& iS
}
case 0 :
for ( int it = 0; it < NUMBER_OF_TIME_SAMPLES; it++ ) {
subHG[it] = cmMap[iski].fullHG[it];
subLG[it] = cmMap[iski].fullLG[it];
subHG[it] = m_subtractCommonMode ? cmMap[iski].fullHG[it] : 0.;
subLG[it] = m_subtractCommonMode ? cmMap[iski].fullLG[it] : 0.;
}
break;
case 2 :
for ( int it = 0; it < NUMBER_OF_TIME_SAMPLES; it++ ) {
subHG[it] = cmMap[iski].halfHG[it];
subLG[it] = cmMap[iski].halfLG[it];
subHG[it] = m_subtractCommonMode ? cmMap[iski].halfHG[it] : 0.;
subLG[it] = m_subtractCommonMode ? cmMap[iski].halfLG[it] : 0.;
}
break;
case 3 :
for ( int it = 0; it < NUMBER_OF_TIME_SAMPLES; it++ ) {
subHG[it] = cmMap[iski].mouseBiteHG[it];
subLG[it] = cmMap[iski].mouseBiteLG[it];
subHG[it] = m_subtractCommonMode ? cmMap[iski].mouseBiteHG[it] : 0.;
subLG[it] = m_subtractCommonMode ? cmMap[iski].mouseBiteLG[it] : 0.;
}
break;
case 4 : for ( int it = 0; it < NUMBER_OF_TIME_SAMPLES; it++ ) {
subHG[it] = cmMap[iski].outerHG[it];
subLG[it] = cmMap[iski].outerLG[it];
subHG[it] = m_subtractCommonMode ? cmMap[iski].outerHG[it] : 0.;
subLG[it] = m_subtractCommonMode ? cmMap[iski].outerLG[it] : 0.;
}
break;
case 5 : for ( int it = 0; it < NUMBER_OF_TIME_SAMPLES; it++ ) {
subHG[it] = cmMap[iski].mergedHG[it];
subLG[it] = cmMap[iski].mergedLG[it];
subHG[it] = m_subtractCommonMode ? cmMap[iski].mergedHG[it] : 0.;
subLG[it] = m_subtractCommonMode ? cmMap[iski].mergedLG[it] : 0.;
}
break;
}
Expand Down
1 change: 1 addition & 0 deletions Reco/plugins/HGCalTBRecHitProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class HGCalTBRecHitProducer : public edm::EDProducer
int m_expectedMaxTimeSample;
double m_maxADCCut;
bool m_useCalibration;
bool m_subtractCommonMode;

std::map<int, TH2F*> shapesLG;
std::map<int, TH2F*> shapesHG;
Expand Down
3 changes: 2 additions & 1 deletion runConfigurationsCERNOctober2018/hgcalRechits.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
ADCCalibrations = cms.untracked.string(adcCalibrations),
calibrationPerChannel=cms.untracked.bool(True),
ExpectedMaxTimeSample=cms.untracked.int32(options.ExpectedMaxTimesample),
MaxADCCut=cms.untracked.double(15)
MaxADCCut=cms.untracked.double(15),
subtractCommonMode=cms.untracked.bool(False)
)


Expand Down

0 comments on commit 9da7665

Please sign in to comment.