CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
HcalDigitizer Class Reference

#include <HcalDigitizer.h>

Public Member Functions

void accumulate (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
void finalizeEvent (edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
 HcalDigitizer (const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &c)
 
void setHBHENoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setHFNoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setHONoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setQIE10NoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setQIE11NoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setZDCNoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
virtual ~HcalDigitizer ()
 

Private Types

typedef CaloTDigitizer< HBHEDigitizerTraits, CaloTDigitizerQIE8RunHBHEDigitizer
 
typedef CaloTDigitizer< HFDigitizerTraits, CaloTDigitizerQIE8RunHFDigitizer
 
typedef CaloTDigitizer< HODigitizerTraits, CaloTDigitizerQIE8RunHODigitizer
 
typedef CaloTDigitizer< HcalQIE10DigitizerTraits, CaloTDigitizerQIE1011RunQIE10Digitizer
 
typedef CaloTDigitizer< HcalQIE11DigitizerTraits, CaloTDigitizerQIE1011RunQIE11Digitizer
 
typedef CaloTDigitizer< ZDCDigitizerTraits, CaloTDigitizerQIE8RunZDCDigitizer
 

Private Member Functions

void accumulateCaloHits (edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *, const HcalTopology *h)
 
void buildHBHEQIECells (const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
 
void buildHFQIECells (const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
 
void buildHOSiPMCells (const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
 
void checkGeometry (const edm::EventSetup &eventSetup)
 
void darkening (std::vector< PCaloHit > &hcalHits)
 
void fillFakeHits ()
 some hits in each subdetector, just for testing purposes More...
 
void setup (const edm::EventSetup &es)
 
void updateGeometry (const edm::EventSetup &eventSetup)
 

Private Attributes

bool agingFlagHB
 
bool agingFlagHE
 
bool debugCS_
 
double deliveredLumi
 
bool doHFWindow_
 
std::vector< DetIdhbheCells
 
bool hbhegeo
 
const HcalTimeSlewhcalTimeSlew_delay_
 
bool hfgeo
 
std::string hitsProducer_
 
bool hogeo
 
bool ignoreTime_
 
std::vector< PCaloHitinjectedHits_
 
std::vector< int > injectedHitsCells_
 
std::vector< double > injectedHitsEnergy_
 
std::vector< double > injectedHitsTime_
 
bool injectTestHits_
 
bool isHCAL
 
bool isZDC
 
bool killHE_
 
const HBHEDarkeningm_HBDarkening
 
const HBHEDarkeningm_HEDarkening
 
std::unique_ptr< HFRecalibrationm_HFRecalibration
 
bool testNumbering_
 
std::unique_ptr< HcalCoderFactorytheCoderFactory
 
const CaloGeometrytheGeometry
 
edm::ESWatcher< CaloGeometryRecordtheGeometryWatcher_
 
std::unique_ptr< HcalAmplifiertheHBHEAmplifier
 
std::unique_ptr< HBHEDigitizertheHBHEDigitizer
 
std::unique_ptr< HcalElectronicsSimtheHBHEElectronicsSim
 
HBHEHitFilter theHBHEHitFilter
 
std::unique_ptr< HcalAmplifiertheHBHEQIE11Amplifier
 
std::vector< DetIdtheHBHEQIE11DetIds
 
std::unique_ptr< QIE11DigitizertheHBHEQIE11Digitizer
 
std::unique_ptr< HcalElectronicsSimtheHBHEQIE11ElectronicsSim
 
HBHEHitFilter theHBHEQIE11HitFilter
 
std::vector< DetIdtheHBHEQIE8DetIds
 
std::unique_ptr< CaloHitResponsetheHBHEResponse
 
std::unique_ptr< HcalSiPMHitResponsetheHBHESiPMResponse
 
std::unique_ptr< HcalAmplifiertheHFAmplifier
 
std::unique_ptr< HFDigitizertheHFDigitizer
 
std::unique_ptr< HcalElectronicsSimtheHFElectronicsSim
 
HFHitFilter theHFHitFilter
 
std::unique_ptr< HcalAmplifiertheHFQIE10Amplifier
 
std::vector< DetIdtheHFQIE10DetIds
 
std::unique_ptr< QIE10DigitizertheHFQIE10Digitizer
 
std::unique_ptr< HcalElectronicsSimtheHFQIE10ElectronicsSim
 
HFHitFilter theHFQIE10HitFilter
 
std::unique_ptr< CaloHitResponsetheHFQIE10Response
 
std::vector< DetIdtheHFQIE8DetIds
 
std::unique_ptr< CaloHitResponsetheHFResponse
 
std::unique_ptr< HcalAmplifiertheHOAmplifier
 
std::unique_ptr< HODigitizertheHODigitizer
 
std::unique_ptr< HcalElectronicsSimtheHOElectronicsSim
 
HOHitFilter theHOHitFilter
 
std::vector< DetIdtheHOHPDDetIds
 
std::unique_ptr< CaloHitResponsetheHOResponse
 
int theHOSiPMCode
 
std::vector< DetIdtheHOSiPMDetIds
 
std::unique_ptr< HODigitizertheHOSiPMDigitizer
 
HOHitFilter theHOSiPMHitFilter
 
std::unique_ptr< HcalSiPMHitResponsetheHOSiPMResponse
 
std::unique_ptr< HPDIonFeedbackSimtheIonFeedback
 
HcalSimParameterMap theParameterMap
 
const HcalDDDRecConstantstheRecNumber
 
edm::ESWatcher< HcalRecNumberingRecordtheRecNumberWatcher_
 
std::unique_ptr< HcalHitRelabellertheRelabeller
 
HcalShapes theShapes
 
std::unique_ptr< HcalTimeSlewSimtheTimeSlewSim
 
std::unique_ptr< HcalAmplifiertheZDCAmplifier
 
std::unique_ptr< ZDCDigitizertheZDCDigitizer
 
std::unique_ptr< HcalElectronicsSimtheZDCElectronicsSim
 
ZDCHitFilter theZDCHitFilter
 
std::unique_ptr< CaloHitResponsetheZDCResponse
 
bool zdcgeo
 

Detailed Description

Definition at line 46 of file HcalDigitizer.h.

Member Typedef Documentation

Reconstruction algorithm

Definition at line 89 of file HcalDigitizer.h.

Definition at line 91 of file HcalDigitizer.h.

Definition at line 90 of file HcalDigitizer.h.

Definition at line 93 of file HcalDigitizer.h.

Definition at line 94 of file HcalDigitizer.h.

Definition at line 92 of file HcalDigitizer.h.

Constructor & Destructor Documentation

HcalDigitizer::HcalDigitizer ( const edm::ParameterSet ps,
edm::ConsumesCollector iC 
)
explicit

Definition at line 37 of file HcalDigitizer.cc.

References edm::ConsumesCollector::consumes(), HcalCoderFactory::DB, debugCS_, deliveredLumi, hcalUnsuppressedDigis_cfi::doEmpty, hcalUnsuppressedDigis_cfi::doNoise, hcalUnsuppressedDigis_cfi::doTimeSlew, Exception, edm::ParameterSet::getParameter(), hcalTimeSlew_delay_, hitsProducer_, ignoreTime_, m_HFRecalibration, hcalUnsuppressedDigis_cfi::minFCToDelay, testNumbering_, theCoderFactory, theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, theHBHEHitFilter, theHBHEQIE11Amplifier, theHBHEQIE11Digitizer, theHBHEQIE11ElectronicsSim, theHBHEQIE11HitFilter, theHBHEResponse, theHBHESiPMResponse, theHFAmplifier, theHFDigitizer, theHFElectronicsSim, theHFHitFilter, theHFQIE10Amplifier, theHFQIE10Digitizer, theHFQIE10ElectronicsSim, theHFQIE10HitFilter, theHFQIE10Response, theHFResponse, theHOAmplifier, theHODigitizer, theHOElectronicsSim, theHOHitFilter, theHOResponse, theHOSiPMCode, theHOSiPMDigitizer, theHOSiPMHitFilter, theHOSiPMResponse, theIonFeedback, theParameterMap, theRelabeller, theShapes, theTimeSlewSim, theZDCAmplifier, theZDCDigitizer, theZDCElectronicsSim, theZDCHitFilter, and theZDCResponse.

37  :
38  theGeometry(nullptr),
39  theRecNumber(nullptr),
40  theParameterMap(ps),
41  theShapes(),
42  theHBHEResponse(std::make_unique<CaloHitResponse>(&theParameterMap,&theShapes)),
43  theHBHESiPMResponse(std::make_unique<HcalSiPMHitResponse>(&theParameterMap, &theShapes, ps.getParameter<bool>("HcalPreMixStage1"), true)),
44  theHOResponse(std::make_unique<CaloHitResponse>(&theParameterMap,&theShapes)),
45  theHOSiPMResponse(std::make_unique<HcalSiPMHitResponse>(&theParameterMap, &theShapes, ps.getParameter<bool>("HcalPreMixStage1"), false)),
46  theHFResponse(std::make_unique<CaloHitResponse>(&theParameterMap,&theShapes)),
47  theHFQIE10Response(std::make_unique<CaloHitResponse>(&theParameterMap,&theShapes)),
48  theZDCResponse(std::make_unique<CaloHitResponse>(&theParameterMap,&theShapes)),
49  theHBHEAmplifier(nullptr),
50  theHFAmplifier(nullptr),
51  theHOAmplifier(nullptr),
52  theZDCAmplifier(nullptr),
53  theHFQIE10Amplifier(nullptr),
54  theHBHEQIE11Amplifier(nullptr),
55  theIonFeedback(nullptr),
56  theCoderFactory(nullptr),
57  theHBHEElectronicsSim(nullptr),
58  theHFElectronicsSim(nullptr),
59  theHOElectronicsSim(nullptr),
60  theZDCElectronicsSim(nullptr),
61  theHFQIE10ElectronicsSim(nullptr),
70  theHBHEDigitizer(nullptr),
71  theHODigitizer(nullptr),
72  theHOSiPMDigitizer(nullptr),
73  theHFDigitizer(nullptr),
74  theZDCDigitizer(nullptr),
75  theHFQIE10Digitizer(nullptr),
76  theHBHEQIE11Digitizer(nullptr),
77  theRelabeller(nullptr),
78  isZDC(true),
79  isHCAL(true),
80  zdcgeo(true),
81  hbhegeo(true),
82  hogeo(true),
83  hfgeo(true),
84  doHFWindow_(ps.getParameter<bool>("doHFWindow")),
85  killHE_(ps.getParameter<bool>("killHE")),
86  debugCS_(ps.getParameter<bool>("debugCaloSamples")),
87  ignoreTime_(ps.getParameter<bool>("ignoreGeantTime")),
88  injectTestHits_(ps.getParameter<bool>("injectTestHits")),
89  hitsProducer_(ps.getParameter<std::string>("hitsProducer")),
90  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode")),
91  deliveredLumi(0.),
92  agingFlagHB(ps.getParameter<bool>("HBDarkening")),
93  agingFlagHE(ps.getParameter<bool>("HEDarkening")),
94  m_HBDarkening(nullptr),
95  m_HEDarkening(nullptr),
96  m_HFRecalibration(nullptr),
97  injectedHitsEnergy_(ps.getParameter<std::vector<double>>("injectTestHitsEnergy")),
98  injectedHitsTime_(ps.getParameter<std::vector<double>>("injectTestHitsTime")),
99  injectedHitsCells_(ps.getParameter<std::vector<int>>("injectTestHitsCells"))
100 {
101  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "ZDCHITS"));
102  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "HcalHits"));
103 
104  bool doNoise = ps.getParameter<bool>("doNoise");
105 
106  bool PreMix1 = ps.getParameter<bool>("HcalPreMixStage1"); // special threshold/pedestal treatment
107  bool PreMix2 = ps.getParameter<bool>("HcalPreMixStage2"); // special threshold/pedestal treatment
108  bool doEmpty = ps.getParameter<bool>("doEmpty");
109  deliveredLumi = ps.getParameter<double>("DelivLuminosity");
110  bool agingFlagHF = ps.getParameter<bool>("HFDarkening");
111  double minFCToDelay= ps.getParameter<double>("minFCToDelay");
112 
113  if(PreMix1 && PreMix2) {
114  throw cms::Exception("Configuration")
115  << "HcalDigitizer cannot operate in PreMixing digitization and PreMixing\n"
116  "digi combination modes at the same time. Please set one mode to False\n"
117  "in the configuration file.";
118  }
119 
120  // need to make copies, because they might get different noise generators
121  theHBHEAmplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
122  theHFAmplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
123  theHOAmplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
124  theZDCAmplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
125  theHFQIE10Amplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
126  theHBHEQIE11Amplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
127 
128  theCoderFactory = std::make_unique<HcalCoderFactory>(HcalCoderFactory::DB);
129 
130  theHBHEElectronicsSim = std::make_unique<HcalElectronicsSim>(theHBHEAmplifier.get(), theCoderFactory.get(), PreMix1);
131  theHFElectronicsSim = std::make_unique<HcalElectronicsSim>(theHFAmplifier.get(), theCoderFactory.get(), PreMix1);
132  theHOElectronicsSim = std::make_unique<HcalElectronicsSim>(theHOAmplifier.get(), theCoderFactory.get(), PreMix1);
133  theZDCElectronicsSim = std::make_unique<HcalElectronicsSim>(theZDCAmplifier.get(), theCoderFactory.get(), PreMix1);
134  theHFQIE10ElectronicsSim = std::make_unique<HcalElectronicsSim>(theHFQIE10Amplifier.get(), theCoderFactory.get(), PreMix1); //should this use a different coder factory?
135  theHBHEQIE11ElectronicsSim = std::make_unique<HcalElectronicsSim>(theHBHEQIE11Amplifier.get(), theCoderFactory.get(), PreMix1); //should this use a different coder factory?
136 
137  bool doHOHPD = (theHOSiPMCode != 1);
138  bool doHOSiPM = (theHOSiPMCode != 0);
139  if(doHOHPD) {
140  theHOResponse = std::make_unique<CaloHitResponse>(&theParameterMap,&theShapes);
141  theHOResponse->setHitFilter(&theHOHitFilter);
142  theHODigitizer = std::make_unique<HODigitizer>(theHOResponse.get(), theHOElectronicsSim.get(), doEmpty);
143  }
144  if(doHOSiPM) {
145  theHOSiPMResponse->setHitFilter(&theHOSiPMHitFilter);
146  theHOSiPMDigitizer = std::make_unique<HODigitizer>(theHOSiPMResponse.get(), theHOElectronicsSim.get(), doEmpty);
147  }
148 
149  theHBHEResponse->setHitFilter(&theHBHEHitFilter);
151 
152  //QIE8 and QIE11 can coexist in HBHE
153  theHBHEQIE11Digitizer = std::make_unique<QIE11Digitizer>(theHBHESiPMResponse.get(), theHBHEQIE11ElectronicsSim.get(), doEmpty);
154  theHBHEDigitizer = std::make_unique<HBHEDigitizer>(theHBHEResponse.get(), theHBHEElectronicsSim.get(), doEmpty);
155 
156  bool doTimeSlew = ps.getParameter<bool>("doTimeSlew");
157  //initialize: they won't be called later if flag is set
158  hcalTimeSlew_delay_ = nullptr;
159  theTimeSlewSim.reset(nullptr);
160  if(doTimeSlew) {
161  // no time slewing for HF
162  theTimeSlewSim = std::make_unique<HcalTimeSlewSim>(&theParameterMap,minFCToDelay);
163  theHBHEAmplifier->setTimeSlewSim(theTimeSlewSim.get());
164  theHBHEQIE11Amplifier->setTimeSlewSim(theTimeSlewSim.get());
165  theHOAmplifier->setTimeSlewSim(theTimeSlewSim.get());
166  theZDCAmplifier->setTimeSlewSim(theTimeSlewSim.get());
167  }
168 
169  theHFResponse->setHitFilter(&theHFHitFilter);
170  theHFQIE10Response->setHitFilter(&theHFQIE10HitFilter);
171  theZDCResponse->setHitFilter(&theZDCHitFilter);
172 
173  //QIE8 and QIE10 can coexist in HF
174  theHFQIE10Digitizer = std::make_unique<QIE10Digitizer>(theHFQIE10Response.get(), theHFQIE10ElectronicsSim.get(), doEmpty);
175  theHFDigitizer = std::make_unique<HFDigitizer>(theHFResponse.get(), theHFElectronicsSim.get(), doEmpty);
176 
177  theZDCDigitizer = std::make_unique<ZDCDigitizer>(theZDCResponse.get(), theZDCElectronicsSim.get(), doEmpty);
178 
179  testNumbering_ = ps.getParameter<bool>("TestNumbering");
180 // std::cout << "Flag to see if Hit Relabeller to be initiated " << testNumbering_ << std::endl;
181  if (testNumbering_) theRelabeller=std::make_unique<HcalHitRelabeller>(ps.getParameter<bool>("doNeutralDensityFilter"));
182 
183  if(ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) {
184  theIonFeedback = std::make_unique<HPDIonFeedbackSim>(ps,&theShapes);
185  theHBHEResponse->setPECorrection(theIonFeedback.get());
186  if(ps.getParameter<bool>("doThermalNoise")) {
187  theHBHEAmplifier->setIonFeedbackSim(theIonFeedback.get());
188  }
189  }
190 
191  //option to save CaloSamples as event product for debugging
192  if(debugCS_){
193  if(theHBHEDigitizer) theHBHEDigitizer->setDebugCaloSamples(true);
194  if(theHBHEQIE11Digitizer) theHBHEQIE11Digitizer->setDebugCaloSamples(true);
195  if(theHODigitizer) theHODigitizer->setDebugCaloSamples(true);
196  if(theHOSiPMDigitizer) theHOSiPMDigitizer->setDebugCaloSamples(true);
197  if(theHFDigitizer) theHFDigitizer->setDebugCaloSamples(true);
198  if(theHFQIE10Digitizer) theHFQIE10Digitizer->setDebugCaloSamples(true);
199  theZDCDigitizer->setDebugCaloSamples(true);
200  }
201 
202  //option to ignore Geant time distribution in SimHits, for debugging
203  if(ignoreTime_){
204  theHBHEResponse->setIgnoreGeantTime(ignoreTime_);
205  theHBHESiPMResponse->setIgnoreGeantTime(ignoreTime_);
206  theHOResponse->setIgnoreGeantTime(ignoreTime_);
207  theHOSiPMResponse->setIgnoreGeantTime(ignoreTime_);
208  theHFResponse->setIgnoreGeantTime(ignoreTime_);
209  theHFQIE10Response->setIgnoreGeantTime(ignoreTime_);
210  theZDCResponse->setIgnoreGeantTime(ignoreTime_);
211  }
212 
213  if(agingFlagHF) m_HFRecalibration.reset(new HFRecalibration(ps.getParameter<edm::ParameterSet>("HFRecalParameterBlock")));
214 }
HFHitFilter theHFQIE10HitFilter
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< int > injectedHitsCells_
HBHEHitFilter theHBHEHitFilter
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:78
std::unique_ptr< CaloHitResponse > theHFResponse
std::unique_ptr< HcalTimeSlewSim > theTimeSlewSim
std::unique_ptr< HcalAmplifier > theHBHEAmplifier
std::unique_ptr< HBHEDigitizer > theHBHEDigitizer
HOHitFilter theHOHitFilter
std::unique_ptr< ZDCDigitizer > theZDCDigitizer
std::unique_ptr< HcalHitRelabeller > theRelabeller
HFHitFilter theHFHitFilter
std::unique_ptr< HFDigitizer > theHFDigitizer
std::unique_ptr< HODigitizer > theHODigitizer
std::unique_ptr< HcalAmplifier > theHFAmplifier
std::unique_ptr< HcalCoderFactory > theCoderFactory
std::unique_ptr< HcalElectronicsSim > theZDCElectronicsSim
std::unique_ptr< HFRecalibration > m_HFRecalibration
std::vector< double > injectedHitsEnergy_
std::unique_ptr< HcalElectronicsSim > theHFQIE10ElectronicsSim
const HBHEDarkening * m_HEDarkening
std::unique_ptr< HcalElectronicsSim > theHFElectronicsSim
std::string hitsProducer_
double deliveredLumi
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
const HcalTimeSlew * hcalTimeSlew_delay_
std::unique_ptr< HcalAmplifier > theHBHEQIE11Amplifier
ZDCHitFilter theZDCHitFilter
std::unique_ptr< HcalSiPMHitResponse > theHBHESiPMResponse
std::vector< double > injectedHitsTime_
HcalShapes theShapes
Definition: HcalDigitizer.h:97
std::unique_ptr< CaloHitResponse > theHBHEResponse
Definition: HcalDigitizer.h:99
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
std::unique_ptr< HcalElectronicsSim > theHBHEElectronicsSim
std::unique_ptr< CaloHitResponse > theHOResponse
std::unique_ptr< HPDIonFeedbackSim > theIonFeedback
std::unique_ptr< HcalAmplifier > theZDCAmplifier
std::unique_ptr< QIE11Digitizer > theHBHEQIE11Digitizer
std::unique_ptr< QIE10Digitizer > theHFQIE10Digitizer
HOHitFilter theHOSiPMHitFilter
std::unique_ptr< CaloHitResponse > theZDCResponse
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:77
std::unique_ptr< HcalAmplifier > theHOAmplifier
std::unique_ptr< HcalSiPMHitResponse > theHOSiPMResponse
const HBHEDarkening * m_HBDarkening
std::unique_ptr< HcalElectronicsSim > theHOElectronicsSim
HBHEHitFilter theHBHEQIE11HitFilter
std::unique_ptr< CaloHitResponse > theHFQIE10Response
std::unique_ptr< HcalAmplifier > theHFQIE10Amplifier
std::unique_ptr< HcalElectronicsSim > theHBHEQIE11ElectronicsSim
HcalDigitizer::~HcalDigitizer ( )
virtual

Definition at line 217 of file HcalDigitizer.cc.

217  {
218 }

Member Function Documentation

void HcalDigitizer::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 372 of file HcalDigitizer.cc.

References accumulateCaloHits(), edm::EventSetup::get(), edm::Event::getByLabel(), hitsProducer_, injectTestHits_, isHCAL, edm::HandleBase::isValid(), isZDC, or, and edm::ESHandle< T >::product().

Referenced by HcalDigiProducer::accumulate().

372  {
373  // Step A: Get Inputs
374  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
376  e.getByLabel(zdcTag, zdcHandle);
377  isZDC = zdcHandle.isValid();
378 
379  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
381  e.getByLabel(hcalTag, hcalHandle);
382  isHCAL = hcalHandle.isValid() or injectTestHits_;
383 
385  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
386  const HcalTopology *htopoP=htopo.product();
387 
388  accumulateCaloHits(hcalHandle, zdcHandle, 0, engine, htopoP);
389 }
std::string hitsProducer_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool isValid() const
Definition: HandleBase.h:74
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *, const HcalTopology *h)
T const * product() const
Definition: ESHandle.h:84
void HcalDigitizer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 391 of file HcalDigitizer.cc.

References accumulateCaloHits(), PileUpEventPrincipal::bunchCrossing(), edm::EventSetup::get(), PileUpEventPrincipal::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), isZDC, and edm::ESHandle< T >::product().

391  {
392  // Step A: Get Inputs
393  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
395  e.getByLabel(zdcTag, zdcHandle);
396  isZDC = zdcHandle.isValid();
397 
398  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
400  e.getByLabel(hcalTag, hcalHandle);
401  isHCAL = hcalHandle.isValid();
402 
404  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
405  const HcalTopology *htopoP=htopo.product();
406 
407  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing(), engine, htopoP);
408 }
std::string hitsProducer_
bool isValid() const
Definition: HandleBase.h:74
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *, const HcalTopology *h)
T const * product() const
Definition: ESHandle.h:84
void HcalDigitizer::accumulateCaloHits ( edm::Handle< std::vector< PCaloHit > > const &  hcalHits,
edm::Handle< std::vector< PCaloHit > > const &  zdcHits,
int  bunchCrossing,
CLHEP::HepRandomEngine *  engine,
const HcalTopology h 
)
private

Definition at line 297 of file HcalDigitizer.cc.

References gather_cfg::cout, darkening(), TauDecayModes::dec, doHFWindow_, hbhegeo, HcalEndcap, HcalForward, hfgeo, hogeo, mps_fire::i, triggerObjects_cff::id, injectedHits_, injectTestHits_, isHCAL, isZDC, killHE_, m_HBDarkening, m_HEDarkening, m_HFRecalibration, HcalDetId::newForm(), HcalDetId::oldFormat(), DetId::rawId(), HcalDetId::subdet(), testNumbering_, theHBHEDigitizer, theHBHEQIE11Digitizer, theHFDigitizer, theHFQIE10Digitizer, theHODigitizer, theHOSiPMDigitizer, theRelabeller, theZDCDigitizer, HcalTopology::validHcal(), and zdcgeo.

Referenced by accumulate().

297  {
298 
299  // Step A: pass in inputs, and accumulate digis
300  if(isHCAL) {
301  std::vector<PCaloHit> hcalHitsOrig = *hcalHandle.product();
302  if(injectTestHits_) hcalHitsOrig = injectedHits_;
303  std::vector<PCaloHit> hcalHits;
304  hcalHits.reserve(hcalHitsOrig.size());
305 
306  //evaluate darkening before relabeling
307  if (testNumbering_) {
309  darkening(hcalHitsOrig);
310  }
311  // Relabel PCaloHits if necessary
312  edm::LogInfo("HcalDigitizer") << "Calling Relabeller";
313  theRelabeller->process(hcalHitsOrig);
314  }
315 
316  //eliminate bad hits
317  for (unsigned int i=0; i< hcalHitsOrig.size(); i++) {
318  DetId id(hcalHitsOrig[i].id());
319  HcalDetId hid(id);
320  if (!htopoP->validHcal(hid)) {
321  edm::LogError("HcalDigitizer") << "bad hcal id found in digitizer. Skipping " << id.rawId() << " " << hid << std::endl;
322  continue;
323  }
324  else if(hid.subdet()==HcalForward && !doHFWindow_ && hcalHitsOrig[i].depth()!=0){
325  //skip HF window hits unless desired
326  continue;
327  }
328  else if( killHE_ && hid.subdet()==HcalEndcap ) {
329  // remove HE hits if asked for (phase 2)
330  continue;
331  }
332  else {
333 #ifdef DebugLog
334  std::cout << "HcalDigitizer format " << hid.oldFormat() << " for " << hid << std::endl;
335 #endif
336  DetId newid = DetId(hid.newForm());
337 #ifdef DebugLog
338  std::cout << "Hit " << i << " out of " << hcalHits.size() << " " << std::hex << id.rawId() << " --> " << newid.rawId() << std::dec << " " << HcalDetId(newid.rawId()) << '\n';
339 #endif
340  hcalHitsOrig[i].setID(newid.rawId());
341  hcalHits.push_back(hcalHitsOrig[i]);
342  }
343  }
344 
345  if(hbhegeo) {
346  if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing, engine);
347  if(theHBHEQIE11Digitizer) theHBHEQIE11Digitizer->add(hcalHits, bunchCrossing, engine);
348  }
349 
350  if(hogeo) {
351  if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing, engine);
352  if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing, engine);
353  }
354 
355  if(hfgeo) {
356  if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing, engine);
357  if(theHFQIE10Digitizer) theHFQIE10Digitizer->add(hcalHits, bunchCrossing, engine);
358  }
359  } else {
360  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
361  }
362 
363  if(isZDC) {
364  if(zdcgeo) {
365  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing, engine);
366  }
367  } else {
368  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
369  }
370 }
std::unique_ptr< HBHEDigitizer > theHBHEDigitizer
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
std::unique_ptr< ZDCDigitizer > theZDCDigitizer
void darkening(std::vector< PCaloHit > &hcalHits)
std::unique_ptr< HcalHitRelabeller > theRelabeller
std::unique_ptr< HFDigitizer > theHFDigitizer
std::unique_ptr< HODigitizer > theHODigitizer
std::unique_ptr< HFRecalibration > m_HFRecalibration
const HBHEDarkening * m_HEDarkening
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
Definition: DetId.h:18
std::unique_ptr< QIE11Digitizer > theHBHEQIE11Digitizer
std::unique_ptr< QIE10Digitizer > theHFQIE10Digitizer
const HBHEDarkening * m_HBDarkening
std::vector< PCaloHit > injectedHits_
void HcalDigitizer::buildHBHEQIECells ( const std::vector< DetId > &  allCells,
const edm::EventSetup eventSetup 
)
private

Definition at line 655 of file HcalDigitizer.cc.

References edm::EventSetup::get(), edm::ESHandle< T >::product(), lumiQueryAPI::q, QIE11, QIE8, HcalHitFilter< subdets >::setDetIds(), HcalCondObjectContainerBase::setTopo(), theHBHEDigitizer, theHBHEHitFilter, theHBHEQIE11DetIds, theHBHEQIE11Digitizer, theHBHEQIE11HitFilter, and theHBHEQIE8DetIds.

Referenced by updateGeometry().

655  {
656  //if results are already cached, no need to look again
657  if(!theHBHEQIE8DetIds.empty() || !theHBHEQIE11DetIds.empty()) return;
658 
659  //get the QIETypes
661  eventSetup.get<HcalQIETypesRcd>().get(q);
663  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
664 
665  HcalQIETypes qieTypes(*q.product());
666  if (qieTypes.topo()==nullptr) {
667  qieTypes.setTopo(htopo.product());
668  }
669 
670  for(std::vector<DetId>::const_iterator detItr = allCells.begin(); detItr != allCells.end(); ++detItr) {
671  HcalQIENum qieType = HcalQIENum(qieTypes.getValues(*detItr)->getValue());
672  if(qieType == QIE8) {
673  theHBHEQIE8DetIds.push_back(*detItr);
674  }
675  else if(qieType == QIE11) {
676  theHBHEQIE11DetIds.push_back(*detItr);
677  }
678  else { //default is QIE8
679  theHBHEQIE8DetIds.push_back(*detItr);
680  }
681  }
682 
683  if(!theHBHEQIE8DetIds.empty()) theHBHEDigitizer->setDetIds(theHBHEQIE8DetIds);
684  else {
685  theHBHEDigitizer.reset();
686  }
687 
689  else {
690  theHBHEQIE11Digitizer.reset();
691  }
692 
693  if(!theHBHEQIE8DetIds.empty() && !theHBHEQIE11DetIds.empty()){
696  }
697 }
HBHEHitFilter theHBHEHitFilter
std::unique_ptr< HBHEDigitizer > theHBHEDigitizer
Definition: HcalQIENum.h:4
HcalQIENum
Definition: HcalQIENum.h:4
std::unique_ptr< QIE11Digitizer > theHBHEQIE11Digitizer
void setDetIds(const std::vector< DetId > &detIds)
Definition: HcalHitFilter.h:17
HBHEHitFilter theHBHEQIE11HitFilter
T get() const
Definition: EventSetup.h:68
std::vector< DetId > theHBHEQIE8DetIds
T const * product() const
Definition: ESHandle.h:84
std::vector< DetId > theHBHEQIE11DetIds
void setTopo(const HcalTopology *topo)
void HcalDigitizer::buildHFQIECells ( const std::vector< DetId > &  allCells,
const edm::EventSetup eventSetup 
)
private

Definition at line 618 of file HcalDigitizer.cc.

References edm::EventSetup::get(), edm::ESHandle< T >::product(), lumiQueryAPI::q, QIE10, QIE8, HcalCondObjectContainerBase::setTopo(), theHFDigitizer, theHFQIE10DetIds, theHFQIE10Digitizer, and theHFQIE8DetIds.

Referenced by updateGeometry().

618  {
619  //if results are already cached, no need to look again
620  if(!theHFQIE8DetIds.empty() || !theHFQIE10DetIds.empty()) return;
621 
622  //get the QIETypes
624  eventSetup.get<HcalQIETypesRcd>().get(q);
626  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
627 
628  HcalQIETypes qieTypes(*q.product());
629  if (qieTypes.topo()==nullptr) {
630  qieTypes.setTopo(htopo.product());
631  }
632 
633  for(std::vector<DetId>::const_iterator detItr = allCells.begin(); detItr != allCells.end(); ++detItr) {
634  HcalQIENum qieType = HcalQIENum(qieTypes.getValues(*detItr)->getValue());
635  if(qieType == QIE8) {
636  theHFQIE8DetIds.push_back(*detItr);
637  } else if(qieType == QIE10) {
638  theHFQIE10DetIds.push_back(*detItr);
639  } else { //default is QIE8
640  theHFQIE8DetIds.push_back(*detItr);
641  }
642  }
643 
644  if(!theHFQIE8DetIds.empty()) theHFDigitizer->setDetIds(theHFQIE8DetIds);
645  else {
646  theHFDigitizer.reset();
647  }
648 
649  if(!theHFQIE10DetIds.empty()) theHFQIE10Digitizer->setDetIds(theHFQIE10DetIds);
650  else {
651  theHFQIE10Digitizer.reset();
652  }
653 }
std::vector< DetId > theHFQIE10DetIds
Definition: HcalQIENum.h:4
std::unique_ptr< HFDigitizer > theHFDigitizer
HcalQIENum
Definition: HcalQIENum.h:4
std::vector< DetId > theHFQIE8DetIds
std::unique_ptr< QIE10Digitizer > theHFQIE10Digitizer
T get() const
Definition: EventSetup.h:68
T const * product() const
Definition: ESHandle.h:84
void setTopo(const HcalTopology *topo)
void HcalDigitizer::buildHOSiPMCells ( const std::vector< DetId > &  allCells,
const edm::EventSetup eventSetup 
)
private

Definition at line 699 of file HcalDigitizer.cc.

References edm::EventSetup::get(), HcalShapes::HAMAMATSU, AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< T >::product(), HcalHitFilter< subdets >::setDetIds(), HcalSimParameterMap::setHOHamamatsuDetIds(), HcalSimParameterMap::setHOZecotekDetIds(), HcalCondObjectContainerBase::setTopo(), theHODigitizer, theHOHitFilter, theHOHPDDetIds, theHOSiPMCode, theHOSiPMDetIds, theHOSiPMDigitizer, theHOSiPMHitFilter, theParameterMap, and HcalShapes::ZECOTEK.

Referenced by updateGeometry().

699  {
700  // all HPD
701 
702  if(theHOSiPMCode == 0) {
703  theHODigitizer->setDetIds(allCells);
704  } else if(theHOSiPMCode == 1) {
705  theHOSiPMDigitizer->setDetIds(allCells);
706  // FIXME pick Zecotek or hamamatsu?
707  } else if(theHOSiPMCode == 2) {
708  std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds;
710  eventSetup.get<HcalMCParamsRcd>().get(p);
712  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
713 
714  HcalMCParams mcParams(*p.product());
715  if (mcParams.topo()==nullptr) {
716  mcParams.setTopo(htopo.product());
717  }
718 
719  for(std::vector<DetId>::const_iterator detItr = allCells.begin(); detItr != allCells.end(); ++detItr) {
720  int shapeType = mcParams.getValues(*detItr)->signalShape();
721  if(shapeType == HcalShapes::ZECOTEK) {
722  zecotekDetIds.emplace_back(*detItr);
723  theHOSiPMDetIds.push_back(*detItr);
724  } else if(shapeType == HcalShapes::HAMAMATSU) {
725  hamamatsuDetIds.emplace_back(*detItr);
726  theHOSiPMDetIds.push_back(*detItr);
727  } else {
728  theHOHPDDetIds.push_back(*detItr);
729  }
730  }
731 
732  if(!theHOHPDDetIds.empty()) theHODigitizer->setDetIds(theHOHPDDetIds);
733  else {
734  theHODigitizer.reset();
735  }
736 
737  if(!theHOSiPMDetIds.empty()) theHOSiPMDigitizer->setDetIds(theHOSiPMDetIds);
738  else {
739  theHOSiPMDigitizer.reset();
740  }
741 
742  if(!theHOHPDDetIds.empty() && !theHOSiPMDetIds.empty()){
745  }
746 
747  theParameterMap.setHOZecotekDetIds(zecotekDetIds);
748  theParameterMap.setHOHamamatsuDetIds(hamamatsuDetIds);
749 
750  // make sure we don't got through this exercise again
751  theHOSiPMCode = -2;
752  }
753 }
HOHitFilter theHOHitFilter
std::unique_ptr< HODigitizer > theHODigitizer
void setHOZecotekDetIds(const std::vector< HcalDetId > &ids)
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
std::vector< DetId > theHOHPDDetIds
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
void setHOHamamatsuDetIds(const std::vector< HcalDetId > &ids)
void setDetIds(const std::vector< DetId > &detIds)
Definition: HcalHitFilter.h:17
std::vector< DetId > theHOSiPMDetIds
HOHitFilter theHOSiPMHitFilter
T get() const
Definition: EventSetup.h:68
T const * product() const
Definition: ESHandle.h:84
void setTopo(const HcalTopology *topo)
void HcalDigitizer::checkGeometry ( const edm::EventSetup eventSetup)
private

make sure the digitizer has the correct list of all cells that exist in the geometry

Definition at line 526 of file HcalDigitizer.cc.

References edm::ESWatcher< T >::check(), geometry, edm::EventSetup::get(), or, theGeometry, theGeometryWatcher_, theHBHEResponse, theHBHESiPMResponse, theHFQIE10Response, theHFResponse, theHOResponse, theHOSiPMResponse, theRecNumber, theRecNumberWatcher_, theRelabeller, theZDCResponse, and updateGeometry().

Referenced by setup().

526  {
528  eventSetup.get<CaloGeometryRecord>().get(geometry);
529  theGeometry = &*geometry;
531  eventSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
532  theRecNumber= &*pHRNDC;
533 
534  if(theHBHEResponse) theHBHEResponse->setGeometry(theGeometry);
536  if(theHOResponse) theHOResponse->setGeometry(theGeometry);
538  theHFResponse->setGeometry(theGeometry);
539  theHFQIE10Response->setGeometry(theGeometry);
540  theZDCResponse->setGeometry(theGeometry);
541  if(theRelabeller) theRelabeller->setGeometry(theRecNumber);
542 
543  // See if it's been updated
544  bool check1 = theGeometryWatcher_.check(eventSetup);
545  bool check2 = theRecNumberWatcher_.check(eventSetup);
546  if (check1 or check2) {
547  updateGeometry(eventSetup);
548  }
549 }
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:78
std::unique_ptr< CaloHitResponse > theHFResponse
std::unique_ptr< HcalHitRelabeller > theRelabeller
edm::ESWatcher< HcalRecNumberingRecord > theRecNumberWatcher_
Definition: HcalDigitizer.h:76
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::unique_ptr< HcalSiPMHitResponse > theHBHESiPMResponse
std::unique_ptr< CaloHitResponse > theHBHEResponse
Definition: HcalDigitizer.h:99
std::unique_ptr< CaloHitResponse > theHOResponse
edm::ESWatcher< CaloGeometryRecord > theGeometryWatcher_
Definition: HcalDigitizer.h:75
std::unique_ptr< CaloHitResponse > theZDCResponse
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:77
std::unique_ptr< HcalSiPMHitResponse > theHOSiPMResponse
ESHandle< TrackerGeometry > geometry
T get() const
Definition: EventSetup.h:68
std::unique_ptr< CaloHitResponse > theHFQIE10Response
void updateGeometry(const edm::EventSetup &eventSetup)
void HcalDigitizer::darkening ( std::vector< PCaloHit > &  hcalHits)
private

Definition at line 755 of file HcalDigitizer.cc.

References HBHEDarkening::degradation(), deliveredLumi, egammaForCoreTracking_cff::depth, HcalBarrel, HcalEndcap, HcalForward, cuy::ii, m_HBDarkening, m_HEDarkening, m_HFRecalibration, phi, HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by accumulateCaloHits().

755  {
756 
757  for (unsigned int ii=0; ii<hcalHits.size(); ++ii) {
758  uint32_t tmpId = hcalHits[ii].id();
759  int det, z, depth, ieta, phi, lay;
760  HcalTestNumbering::unpackHcalIndex(tmpId,det,z,depth,ieta,phi,lay);
761 
762  bool darkened = false;
763  float dweight = 1.;
764 
765  if(det==int(HcalBarrel) && m_HBDarkening){
766  //HB darkening
767  dweight = m_HBDarkening->degradation(deliveredLumi,ieta,lay);
768  darkened = true;
769  }
770  else if(det==int(HcalEndcap) && m_HEDarkening){
771  //HE darkening
772  dweight = m_HEDarkening->degradation(deliveredLumi,ieta,lay);
773  darkened = true;
774  }
775  else if(det==int(HcalForward) && m_HFRecalibration){
776  //HF darkening - approximate: invert recalibration factor
777  dweight = 1.0/m_HFRecalibration->getCorr(ieta,depth,deliveredLumi);
778  darkened = true;
779  }
780 
781  //reset hit energy
782  if(darkened) hcalHits[ii].setEnergy(hcalHits[ii].energy()*dweight);
783  }
784 
785 }
std::unique_ptr< HFRecalibration > m_HFRecalibration
const HBHEDarkening * m_HEDarkening
double deliveredLumi
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
ii
Definition: cuy.py:590
const HBHEDarkening * m_HBDarkening
float degradation(float intlumi, int ieta, int lay) const
void HcalDigitizer::fillFakeHits ( )
private

some hits in each subdetector, just for testing purposes

void HcalDigitizer::finalizeEvent ( edm::Event e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *   
)

Definition at line 410 of file HcalDigitizer.cc.

References gather_cfg::cout, debugCS_, hbhegeo, hfgeo, hogeo, injectedHits_, injectTestHits_, isHCAL, isZDC, HcalDataFrameContainer< QIE11DataFrame >::MAXSAMPLES, HcalDataFrameContainer< QIE10DataFrame >::MAXSAMPLES, eostools::move(), edm::Event::put(), CaloSimParameters::readoutFrameSize(), HcalSimParameterMap::simParameters(), theHBHEDigitizer, theHBHEQIE11DetIds, theHBHEQIE11Digitizer, theHBHESiPMResponse, theHFDigitizer, theHFQIE10DetIds, theHFQIE10Digitizer, theHODigitizer, theHOSiPMDigitizer, theParameterMap, theZDCDigitizer, and zdcgeo.

Referenced by HcalDigiProducer::finalizeEvent().

410  {
411 
412  // Step B: Create empty output
413  std::unique_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection());
414  std::unique_ptr<HODigiCollection> hoResult(new HODigiCollection());
415  std::unique_ptr<HFDigiCollection> hfResult(new HFDigiCollection());
416  std::unique_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection());
417  std::unique_ptr<QIE10DigiCollection> hfQIE10Result(
419  !theHFQIE10DetIds.empty() ?
422  )
423  );
424  std::unique_ptr<QIE11DigiCollection> hbheQIE11Result(
426  !theHBHEQIE11DetIds.empty() ?
427  theHBHESiPMResponse.get()->getReadoutFrameSize(theHBHEQIE11DetIds[0]) :
428 // theParameterMap->simParameters(theHBHEQIE11DetIds[0]).readoutFrameSize() :
430  )
431  );
432 
433  // Step C: Invoke the algorithm, getting back outputs.
434  if(isHCAL&&hbhegeo){
435  if(theHBHEDigitizer) theHBHEDigitizer->run(*hbheResult, engine);
436  if(theHBHEQIE11Digitizer) theHBHEQIE11Digitizer->run(*hbheQIE11Result, engine);
437  }
438  if(isHCAL&&hogeo) {
439  if(theHODigitizer) theHODigitizer->run(*hoResult, engine);
440  if(theHOSiPMDigitizer) theHOSiPMDigitizer->run(*hoResult, engine);
441  }
442  if(isHCAL&&hfgeo) {
443  if(theHFDigitizer) theHFDigitizer->run(*hfResult, engine);
444  if(theHFQIE10Digitizer) theHFQIE10Digitizer->run(*hfQIE10Result, engine);
445  }
446  if(isZDC&&zdcgeo) {
447  theZDCDigitizer->run(*zdcResult, engine);
448  }
449 
450  edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size();
451  edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size();
452  edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size();
453  edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size();
454  edm::LogInfo("HcalDigitizer") << "HCAL HF QIE10 digis : " << hfQIE10Result->size();
455  edm::LogInfo("HcalDigitizer") << "HCAL HBHE QIE11 digis : " << hbheQIE11Result->size();
456 
457 #ifdef DebugLog
458  std::cout << std::endl;
459  std::cout << "HCAL HBHE digis : " << hbheResult->size() << std::endl;
460  std::cout << "HCAL HO digis : " << hoResult->size() << std::endl;
461  std::cout << "HCAL HF digis : " << hfResult->size() << std::endl;
462  std::cout << "HCAL ZDC digis : " << zdcResult->size() << std::endl;
463  std::cout << "HCAL HF QIE10 digis : " << hfQIE10Result->size() << std::endl;
464  std::cout << "HCAL HBHE QIE11 digis : " << hbheQIE11Result->size() << std::endl;
465 #endif
466 
467  // Step D: Put outputs into event
468  e.put(std::move(hbheResult));
469  e.put(std::move(hoResult));
470  e.put(std::move(hfResult));
471  e.put(std::move(zdcResult));
472  e.put(std::move(hfQIE10Result), "HFQIE10DigiCollection");
473  e.put(std::move(hbheQIE11Result), "HBHEQIE11DigiCollection");
474 
475  if(debugCS_){
476  std::unique_ptr<CaloSamplesCollection> csResult(new CaloSamplesCollection());
477  //smush together all the results
478  if(theHBHEDigitizer) csResult->insert(csResult->end(),theHBHEDigitizer->getCaloSamples().begin(),theHBHEDigitizer->getCaloSamples().end());
479  if(theHBHEQIE11Digitizer) csResult->insert(csResult->end(),theHBHEQIE11Digitizer->getCaloSamples().begin(),theHBHEQIE11Digitizer->getCaloSamples().end());
480  if(theHODigitizer) csResult->insert(csResult->end(),theHODigitizer->getCaloSamples().begin(),theHODigitizer->getCaloSamples().end());
481  if(theHOSiPMDigitizer) csResult->insert(csResult->end(),theHOSiPMDigitizer->getCaloSamples().begin(),theHOSiPMDigitizer->getCaloSamples().end());
482  if(theHFDigitizer) csResult->insert(csResult->end(),theHFDigitizer->getCaloSamples().begin(),theHFDigitizer->getCaloSamples().end());
483  if(theHFQIE10Digitizer) csResult->insert(csResult->end(),theHFQIE10Digitizer->getCaloSamples().begin(),theHFQIE10Digitizer->getCaloSamples().end());
484  csResult->insert(csResult->end(),theZDCDigitizer->getCaloSamples().begin(),theZDCDigitizer->getCaloSamples().end());
485  e.put(std::move(csResult),"HcalSamples");
486  }
487 
488  if(injectTestHits_){
489  std::unique_ptr<edm::PCaloHitContainer> pcResult(new edm::PCaloHitContainer());
490  pcResult->insert(pcResult->end(),injectedHits_.begin(),injectedHits_.end());
491  e.put(std::move(pcResult),"HcalHits");
492  }
493 
494 #ifdef DebugLog
495  std::cout << std::endl << "========> HcalDigitizer e.put " << std::endl << std::endl;
496 #endif
497 
498 }
std::vector< DetId > theHFQIE10DetIds
std::vector< PCaloHit > PCaloHitContainer
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
std::vector< CaloSamples > CaloSamplesCollection
Definition: CaloSamples.h:88
std::unique_ptr< HBHEDigitizer > theHBHEDigitizer
std::unique_ptr< ZDCDigitizer > theZDCDigitizer
std::unique_ptr< HFDigitizer > theHFDigitizer
std::unique_ptr< HODigitizer > theHODigitizer
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
HcalDataFrameContainer< QIE10DataFrame > QIE10DigiCollection
edm::SortedCollection< HODataFrame > HODigiCollection
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
std::unique_ptr< HcalSiPMHitResponse > theHBHESiPMResponse
int readoutFrameSize() const
for now, the LinearFrames and trhe digis will be one-to-one.
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
HcalDataFrameContainer< QIE11DataFrame > QIE11DigiCollection
std::unique_ptr< QIE11Digitizer > theHBHEQIE11Digitizer
std::unique_ptr< QIE10Digitizer > theHFQIE10Digitizer
edm::SortedCollection< HFDataFrame > HFDigiCollection
const CaloSimParameters & simParameters(const DetId &id) const override
std::vector< DetId > theHBHEQIE11DetIds
def move(src, dest)
Definition: eostools.py:511
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
std::vector< PCaloHit > injectedHits_
void HcalDigitizer::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)

Produces the EDM products,

Definition at line 264 of file HcalDigitizer.cc.

References edm::EventSetup::get(), edm::ESHandle< T >::product(), HcalShapes::setDbService(), HcalSimParameterMap::setDbService(), setup(), theCoderFactory, theHBHEAmplifier, theHBHEDigitizer, theHBHEQIE11Amplifier, theHBHEQIE11Digitizer, theHBHEQIE11ElectronicsSim, theHFAmplifier, theHFDigitizer, theHFQIE10Amplifier, theHFQIE10Digitizer, theHFQIE10ElectronicsSim, theHOAmplifier, theHODigitizer, theHOSiPMDigitizer, theParameterMap, theShapes, theZDCAmplifier, and theZDCDigitizer.

Referenced by HcalDigiProducer::initializeEvent().

264  {
265  setup(eventSetup);
266 
267  // get the appropriate gains, noises, & widths for this event
268  edm::ESHandle<HcalDbService> conditions;
269  eventSetup.get<HcalDbRecord>().get(conditions);
270 
271  theShapes.setDbService(conditions.product());
272 
273  theHBHEAmplifier->setDbService(conditions.product());
274  theHFAmplifier->setDbService(conditions.product());
275  theHOAmplifier->setDbService(conditions.product());
276  theZDCAmplifier->setDbService(conditions.product());
277  theHFQIE10Amplifier->setDbService(conditions.product());
278  theHBHEQIE11Amplifier->setDbService(conditions.product());
279 
280  theHFQIE10ElectronicsSim->setDbService(conditions.product());
281  theHBHEQIE11ElectronicsSim->setDbService(conditions.product());
282 
283  theCoderFactory->setDbService(conditions.product());
284  theParameterMap.setDbService(conditions.product());
285 
286  //initialize hits
287  if(theHBHEDigitizer) theHBHEDigitizer->initializeHits();
288  if(theHBHEQIE11Digitizer) theHBHEQIE11Digitizer->initializeHits();
289  if(theHODigitizer) theHODigitizer->initializeHits();
290  if(theHOSiPMDigitizer) theHOSiPMDigitizer->initializeHits();
291  if(theHFQIE10Digitizer) theHFQIE10Digitizer->initializeHits();
292  if(theHFDigitizer) theHFDigitizer->initializeHits();
293  theZDCDigitizer->initializeHits();
294 
295 }
std::unique_ptr< HcalAmplifier > theHBHEAmplifier
std::unique_ptr< HBHEDigitizer > theHBHEDigitizer
std::unique_ptr< ZDCDigitizer > theZDCDigitizer
std::unique_ptr< HFDigitizer > theHFDigitizer
std::unique_ptr< HODigitizer > theHODigitizer
std::unique_ptr< HcalAmplifier > theHFAmplifier
std::unique_ptr< HcalCoderFactory > theCoderFactory
std::unique_ptr< HcalElectronicsSim > theHFQIE10ElectronicsSim
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
std::unique_ptr< HcalAmplifier > theHBHEQIE11Amplifier
HcalShapes theShapes
Definition: HcalDigitizer.h:97
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
std::unique_ptr< HcalAmplifier > theZDCAmplifier
void setDbService(const HcalDbService *service)
Definition: HcalShapes.h:25
std::unique_ptr< QIE11Digitizer > theHBHEQIE11Digitizer
std::unique_ptr< QIE10Digitizer > theHFQIE10Digitizer
std::unique_ptr< HcalAmplifier > theHOAmplifier
std::unique_ptr< HcalAmplifier > theHFQIE10Amplifier
std::unique_ptr< HcalElectronicsSim > theHBHEQIE11ElectronicsSim
void setup(const edm::EventSetup &es)
T const * product() const
Definition: ESHandle.h:84
void setDbService(const HcalDbService *service)
void HcalDigitizer::setHBHENoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 221 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalBaseSignalGenerator::setParameterMap(), theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, and theParameterMap.

Referenced by HcalDigiProducer::setHBHENoiseSignalGenerator().

221  {
222  noiseGenerator->setParameterMap(&theParameterMap);
223  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim.get());
224  if (theHBHEDigitizer) theHBHEDigitizer->setNoiseSignalGenerator(noiseGenerator);
225  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
226 }
void setParameterMap(HcalSimParameterMap *map)
std::unique_ptr< HcalAmplifier > theHBHEAmplifier
std::unique_ptr< HBHEDigitizer > theHBHEDigitizer
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
std::unique_ptr< HcalElectronicsSim > theHBHEElectronicsSim
void HcalDigitizer::setHFNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 235 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalBaseSignalGenerator::setParameterMap(), theHFAmplifier, theHFDigitizer, theHFElectronicsSim, and theParameterMap.

Referenced by HcalDigiProducer::setHFNoiseSignalGenerator().

235  {
236  noiseGenerator->setParameterMap(&theParameterMap);
237  noiseGenerator->setElectronicsSim(theHFElectronicsSim.get());
238  if(theHFDigitizer) theHFDigitizer->setNoiseSignalGenerator(noiseGenerator);
239  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
240 }
void setParameterMap(HcalSimParameterMap *map)
std::unique_ptr< HFDigitizer > theHFDigitizer
std::unique_ptr< HcalAmplifier > theHFAmplifier
std::unique_ptr< HcalElectronicsSim > theHFElectronicsSim
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
void HcalDigitizer::setHONoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 249 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalBaseSignalGenerator::setParameterMap(), theHOAmplifier, theHODigitizer, theHOElectronicsSim, theHOSiPMDigitizer, and theParameterMap.

Referenced by HcalDigiProducer::setHONoiseSignalGenerator().

249  {
250  noiseGenerator->setParameterMap(&theParameterMap);
251  noiseGenerator->setElectronicsSim(theHOElectronicsSim.get());
252  if(theHODigitizer) theHODigitizer->setNoiseSignalGenerator(noiseGenerator);
253  if(theHOSiPMDigitizer) theHOSiPMDigitizer->setNoiseSignalGenerator(noiseGenerator);
254  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
255 }
void setParameterMap(HcalSimParameterMap *map)
std::unique_ptr< HODigitizer > theHODigitizer
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
std::unique_ptr< HcalAmplifier > theHOAmplifier
std::unique_ptr< HcalElectronicsSim > theHOElectronicsSim
void HcalDigitizer::setQIE10NoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 242 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalBaseSignalGenerator::setParameterMap(), theHFQIE10Amplifier, theHFQIE10Digitizer, theHFQIE10ElectronicsSim, and theParameterMap.

Referenced by HcalDigiProducer::setQIE10NoiseSignalGenerator().

242  {
243  noiseGenerator->setParameterMap(&theParameterMap);
244  noiseGenerator->setElectronicsSim(theHFQIE10ElectronicsSim.get());
245  if(theHFQIE10Digitizer) theHFQIE10Digitizer->setNoiseSignalGenerator(noiseGenerator);
246  theHFQIE10Amplifier->setNoiseSignalGenerator(noiseGenerator);
247 }
void setParameterMap(HcalSimParameterMap *map)
std::unique_ptr< HcalElectronicsSim > theHFQIE10ElectronicsSim
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
std::unique_ptr< QIE10Digitizer > theHFQIE10Digitizer
std::unique_ptr< HcalAmplifier > theHFQIE10Amplifier
void HcalDigitizer::setQIE11NoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 228 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalBaseSignalGenerator::setParameterMap(), theHBHEQIE11Amplifier, theHBHEQIE11Digitizer, theHBHEQIE11ElectronicsSim, and theParameterMap.

Referenced by HcalDigiProducer::setQIE11NoiseSignalGenerator().

228  {
229  noiseGenerator->setParameterMap(&theParameterMap);
230  noiseGenerator->setElectronicsSim(theHBHEQIE11ElectronicsSim.get());
231  if(theHBHEQIE11Digitizer) theHBHEQIE11Digitizer->setNoiseSignalGenerator(noiseGenerator);
232  theHBHEQIE11Amplifier->setNoiseSignalGenerator(noiseGenerator);
233 }
void setParameterMap(HcalSimParameterMap *map)
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
std::unique_ptr< HcalAmplifier > theHBHEQIE11Amplifier
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
std::unique_ptr< QIE11Digitizer > theHBHEQIE11Digitizer
std::unique_ptr< HcalElectronicsSim > theHBHEQIE11ElectronicsSim
void HcalDigitizer::setup ( const edm::EventSetup es)
private

Definition at line 501 of file HcalDigitizer.cc.

References agingFlagHB, agingFlagHE, checkGeometry(), edm::EventSetup::get(), hcalTimeSlew_delay_, m_HBDarkening, m_HEDarkening, theHBHEAmplifier, theHBHEQIE11Amplifier, theHOAmplifier, and theZDCAmplifier.

Referenced by initializeEvent().

501  {
502  checkGeometry(es);
503 
504  if (agingFlagHB) {
506  es.get<HBHEDarkeningRecord>().get("HB",hdark);
507  m_HBDarkening = &*hdark;
508  }
509  if (agingFlagHE) {
511  es.get<HBHEDarkeningRecord>().get("HE",hdark);
512  m_HEDarkening = &*hdark;
513  }
514 
516  es.get<HcalTimeSlewRecord>().get("HBHE", delay);
517  hcalTimeSlew_delay_ = &*delay;
518 
521  theHOAmplifier->setTimeSlew(hcalTimeSlew_delay_);
522  theZDCAmplifier->setTimeSlew(hcalTimeSlew_delay_);
523 }
std::unique_ptr< HcalAmplifier > theHBHEAmplifier
void checkGeometry(const edm::EventSetup &eventSetup)
const HBHEDarkening * m_HEDarkening
const HcalTimeSlew * hcalTimeSlew_delay_
std::unique_ptr< HcalAmplifier > theHBHEQIE11Amplifier
std::unique_ptr< HcalAmplifier > theZDCAmplifier
std::unique_ptr< HcalAmplifier > theHOAmplifier
const HBHEDarkening * m_HBDarkening
T get() const
Definition: EventSetup.h:68
void HcalDigitizer::setZDCNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 257 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalBaseSignalGenerator::setParameterMap(), theParameterMap, theZDCAmplifier, theZDCDigitizer, and theZDCElectronicsSim.

Referenced by HcalDigiProducer::setZDCNoiseSignalGenerator().

257  {
258  noiseGenerator->setParameterMap(&theParameterMap);
259  noiseGenerator->setElectronicsSim(theZDCElectronicsSim.get());
260  theZDCDigitizer->setNoiseSignalGenerator(noiseGenerator);
261  theZDCAmplifier->setNoiseSignalGenerator(noiseGenerator);
262 }
void setParameterMap(HcalSimParameterMap *map)
std::unique_ptr< ZDCDigitizer > theZDCDigitizer
std::unique_ptr< HcalElectronicsSim > theZDCElectronicsSim
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:96
std::unique_ptr< HcalAmplifier > theZDCAmplifier
void HcalDigitizer::updateGeometry ( const edm::EventSetup eventSetup)
private

Definition at line 552 of file HcalDigitizer.cc.

References buildHBHEQIECells(), buildHFQIECells(), buildHOSiPMCells(), DetId::Calo, Exception, CaloGeometry::getValidDetIds(), hbheCells, hbhegeo, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hfgeo, hogeo, injectedHits_, injectedHitsCells_, injectedHitsEnergy_, injectedHitsTime_, injectTestHits_, killHE_, HcalZDCDetId::SubdetectorId, theGeometry, theHBHEQIE11DetIds, theHBHESiPMResponse, theHOSiPMDigitizer, theHOSiPMResponse, theZDCDigitizer, tmp, and zdcgeo.

Referenced by checkGeometry().

552  {
553  const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
554  const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
555  const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
556  const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
557  const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
558  //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower);
559  //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId);
560 // std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl;
561  if(zdcCells.empty()) zdcgeo = false;
562  if(hbCells.empty() && heCells.empty()) hbhegeo = false;
563  if(hoCells.empty()) hogeo = false;
564  if(hfCells.empty()) hfgeo = false;
565  // combine HB & HE
566 
567  hbheCells = hbCells;
568  if( !killHE_) {
569  hbheCells.insert(hbheCells.end(), heCells.begin(), heCells.end());
570  }
571  //handle mixed QIE8/11 scenario in HBHE
572  buildHBHEQIECells(hbheCells,eventSetup);
575 
576  if(theHOSiPMDigitizer) {
577  buildHOSiPMCells(hoCells, eventSetup);
579  theHOSiPMResponse->setDetIds(hoCells);
580  }
581 
582  //handle mixed QIE8/10 scenario in HF
583  buildHFQIECells(hfCells,eventSetup);
584 
585  theZDCDigitizer->setDetIds(zdcCells);
586 
587  //fill test hits collection if desired and empty
588  if(injectTestHits_ && injectedHits_.empty() && !injectedHitsCells_.empty() && !injectedHitsEnergy_.empty()){
589  //make list of specified cells if desired
590  std::vector<DetId> testCells;
591  if(injectedHitsCells_.size()>=4){
592  testCells.reserve(injectedHitsCells_.size()/4);
593  for(unsigned ic = 0; ic < injectedHitsCells_.size(); ic += 4){
594  if(ic+4 > injectedHitsCells_.size()) break;
595  testCells.push_back(HcalDetId((HcalSubdetector)injectedHitsCells_[ic],injectedHitsCells_[ic+1],
597  }
598  }
599  else{
600  int testSubdet = injectedHitsCells_[0];
601  if(testSubdet==HcalBarrel) testCells = hbCells;
602  else if(testSubdet==HcalEndcap) testCells = heCells;
603  else if(testSubdet==HcalForward) testCells = hfCells;
604  else if(testSubdet==HcalOuter) testCells = hoCells;
605  else throw cms::Exception("Configuration") << "Unknown subdet " << testSubdet << " for HCAL test hit injection";
606  }
607  bool useHitTimes = (injectedHitsTime_.size()==injectedHitsEnergy_.size());
608  injectedHits_.reserve(testCells.size()*injectedHitsEnergy_.size());
609  for(unsigned ih = 0; ih < injectedHitsEnergy_.size(); ++ih){
610  double tmp = useHitTimes ? injectedHitsTime_[ih] : 0.;
611  for(auto& aCell: testCells){
612  injectedHits_.emplace_back(aCell,injectedHitsEnergy_[ih],tmp);
613  }
614  }
615  }
616 }
std::vector< int > injectedHitsCells_
void buildHFQIECells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
std::unique_ptr< ZDCDigitizer > theZDCDigitizer
void buildHBHEQIECells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
std::vector< double > injectedHitsEnergy_
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
void buildHOSiPMCells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
std::unique_ptr< HcalSiPMHitResponse > theHBHESiPMResponse
HcalSubdetector
Definition: HcalAssistant.h:31
std::vector< double > injectedHitsTime_
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:77
std::unique_ptr< HcalSiPMHitResponse > theHOSiPMResponse
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
std::vector< DetId > hbheCells
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< DetId > theHBHEQIE11DetIds
std::vector< PCaloHit > injectedHits_

Member Data Documentation

bool HcalDigitizer::agingFlagHB
private

Definition at line 166 of file HcalDigitizer.h.

Referenced by setup().

bool HcalDigitizer::agingFlagHE
private

Definition at line 166 of file HcalDigitizer.h.

Referenced by setup().

bool HcalDigitizer::debugCS_
private

Definition at line 157 of file HcalDigitizer.h.

Referenced by finalizeEvent(), and HcalDigitizer().

double HcalDigitizer::deliveredLumi
private

Definition at line 165 of file HcalDigitizer.h.

Referenced by darkening(), and HcalDigitizer().

bool HcalDigitizer::doHFWindow_
private

Definition at line 155 of file HcalDigitizer.h.

Referenced by accumulateCaloHits().

std::vector<DetId> HcalDigitizer::hbheCells
private

Definition at line 147 of file HcalDigitizer.h.

Referenced by updateGeometry().

bool HcalDigitizer::hbhegeo
private

Definition at line 153 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

const HcalTimeSlew* HcalDigitizer::hcalTimeSlew_delay_
private

Definition at line 171 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and setup().

bool HcalDigitizer::hfgeo
private

Definition at line 153 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

std::string HcalDigitizer::hitsProducer_
private

Definition at line 161 of file HcalDigitizer.h.

Referenced by accumulate(), and HcalDigitizer().

bool HcalDigitizer::hogeo
private

Definition at line 153 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

bool HcalDigitizer::ignoreTime_
private

Definition at line 158 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

std::vector<PCaloHit> HcalDigitizer::injectedHits_
private

Definition at line 176 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

std::vector<int> HcalDigitizer::injectedHitsCells_
private

Definition at line 175 of file HcalDigitizer.h.

Referenced by updateGeometry().

std::vector<double> HcalDigitizer::injectedHitsEnergy_
private

Definition at line 173 of file HcalDigitizer.h.

Referenced by updateGeometry().

std::vector<double> HcalDigitizer::injectedHitsTime_
private

Definition at line 174 of file HcalDigitizer.h.

Referenced by updateGeometry().

bool HcalDigitizer::injectTestHits_
private

Definition at line 159 of file HcalDigitizer.h.

Referenced by accumulate(), accumulateCaloHits(), finalizeEvent(), and updateGeometry().

bool HcalDigitizer::isHCAL
private

Definition at line 153 of file HcalDigitizer.h.

Referenced by accumulate(), accumulateCaloHits(), and finalizeEvent().

bool HcalDigitizer::isZDC
private

Definition at line 153 of file HcalDigitizer.h.

Referenced by accumulate(), accumulateCaloHits(), and finalizeEvent().

bool HcalDigitizer::killHE_
private

Definition at line 156 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), and updateGeometry().

const HBHEDarkening* HcalDigitizer::m_HBDarkening
private

Definition at line 167 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), darkening(), and setup().

const HBHEDarkening* HcalDigitizer::m_HEDarkening
private

Definition at line 168 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), darkening(), and setup().

std::unique_ptr<HFRecalibration> HcalDigitizer::m_HFRecalibration
private

Definition at line 169 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), darkening(), and HcalDigitizer().

bool HcalDigitizer::testNumbering_
private

Definition at line 154 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), and HcalDigitizer().

std::unique_ptr<HcalCoderFactory> HcalDigitizer::theCoderFactory
private

Definition at line 117 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and initializeEvent().

const CaloGeometry* HcalDigitizer::theGeometry
private

Definition at line 77 of file HcalDigitizer.h.

Referenced by checkGeometry(), and updateGeometry().

edm::ESWatcher<CaloGeometryRecord> HcalDigitizer::theGeometryWatcher_
private

Definition at line 75 of file HcalDigitizer.h.

Referenced by checkGeometry().

std::unique_ptr<HcalAmplifier> HcalDigitizer::theHBHEAmplifier
private
std::unique_ptr<HBHEDigitizer> HcalDigitizer::theHBHEDigitizer
private
std::unique_ptr<HcalElectronicsSim> HcalDigitizer::theHBHEElectronicsSim
private

Definition at line 119 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and setHBHENoiseSignalGenerator().

HBHEHitFilter HcalDigitizer::theHBHEHitFilter
private

Definition at line 126 of file HcalDigitizer.h.

Referenced by buildHBHEQIECells(), and HcalDigitizer().

std::unique_ptr<HcalAmplifier> HcalDigitizer::theHBHEQIE11Amplifier
private
std::vector<DetId> HcalDigitizer::theHBHEQIE11DetIds
private

Definition at line 148 of file HcalDigitizer.h.

Referenced by buildHBHEQIECells(), finalizeEvent(), and updateGeometry().

std::unique_ptr<QIE11Digitizer> HcalDigitizer::theHBHEQIE11Digitizer
private
std::unique_ptr<HcalElectronicsSim> HcalDigitizer::theHBHEQIE11ElectronicsSim
private

Definition at line 124 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and setQIE11NoiseSignalGenerator().

HBHEHitFilter HcalDigitizer::theHBHEQIE11HitFilter
private

Definition at line 127 of file HcalDigitizer.h.

Referenced by buildHBHEQIECells(), and HcalDigitizer().

std::vector<DetId> HcalDigitizer::theHBHEQIE8DetIds
private

Definition at line 148 of file HcalDigitizer.h.

Referenced by buildHBHEQIECells().

std::unique_ptr<CaloHitResponse> HcalDigitizer::theHBHEResponse
private

Definition at line 99 of file HcalDigitizer.h.

Referenced by checkGeometry(), and HcalDigitizer().

std::unique_ptr<HcalSiPMHitResponse> HcalDigitizer::theHBHESiPMResponse
private

Definition at line 100 of file HcalDigitizer.h.

Referenced by checkGeometry(), finalizeEvent(), HcalDigitizer(), and updateGeometry().

std::unique_ptr<HcalAmplifier> HcalDigitizer::theHFAmplifier
private

Definition at line 110 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and setHFNoiseSignalGenerator().

std::unique_ptr<HFDigitizer> HcalDigitizer::theHFDigitizer
private
std::unique_ptr<HcalElectronicsSim> HcalDigitizer::theHFElectronicsSim
private

Definition at line 120 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and setHFNoiseSignalGenerator().

HFHitFilter HcalDigitizer::theHFHitFilter
private

Definition at line 128 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

std::unique_ptr<HcalAmplifier> HcalDigitizer::theHFQIE10Amplifier
private

Definition at line 113 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and setQIE10NoiseSignalGenerator().

std::vector<DetId> HcalDigitizer::theHFQIE10DetIds
private

Definition at line 151 of file HcalDigitizer.h.

Referenced by buildHFQIECells(), and finalizeEvent().

std::unique_ptr<QIE10Digitizer> HcalDigitizer::theHFQIE10Digitizer
private
std::unique_ptr<HcalElectronicsSim> HcalDigitizer::theHFQIE10ElectronicsSim
private

Definition at line 123 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and setQIE10NoiseSignalGenerator().

HFHitFilter HcalDigitizer::theHFQIE10HitFilter
private

Definition at line 129 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

std::unique_ptr<CaloHitResponse> HcalDigitizer::theHFQIE10Response
private

Definition at line 104 of file HcalDigitizer.h.

Referenced by checkGeometry(), and HcalDigitizer().

std::vector<DetId> HcalDigitizer::theHFQIE8DetIds
private

Definition at line 151 of file HcalDigitizer.h.

Referenced by buildHFQIECells().

std::unique_ptr<CaloHitResponse> HcalDigitizer::theHFResponse
private

Definition at line 103 of file HcalDigitizer.h.

Referenced by checkGeometry(), and HcalDigitizer().

std::unique_ptr<HcalAmplifier> HcalDigitizer::theHOAmplifier
private

Definition at line 111 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), setHONoiseSignalGenerator(), and setup().

std::unique_ptr<HODigitizer> HcalDigitizer::theHODigitizer
private
std::unique_ptr<HcalElectronicsSim> HcalDigitizer::theHOElectronicsSim
private

Definition at line 121 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and setHONoiseSignalGenerator().

HOHitFilter HcalDigitizer::theHOHitFilter
private

Definition at line 130 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

std::vector<DetId> HcalDigitizer::theHOHPDDetIds
private

Definition at line 149 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

std::unique_ptr<CaloHitResponse> HcalDigitizer::theHOResponse
private

Definition at line 101 of file HcalDigitizer.h.

Referenced by checkGeometry(), and HcalDigitizer().

int HcalDigitizer::theHOSiPMCode
private

Definition at line 163 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

std::vector<DetId> HcalDigitizer::theHOSiPMDetIds
private

Definition at line 150 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

std::unique_ptr<HODigitizer> HcalDigitizer::theHOSiPMDigitizer
private
HOHitFilter HcalDigitizer::theHOSiPMHitFilter
private

Definition at line 131 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

std::unique_ptr<HcalSiPMHitResponse> HcalDigitizer::theHOSiPMResponse
private

Definition at line 102 of file HcalDigitizer.h.

Referenced by checkGeometry(), HcalDigitizer(), and updateGeometry().

std::unique_ptr<HPDIonFeedbackSim> HcalDigitizer::theIonFeedback
private

Definition at line 116 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalSimParameterMap HcalDigitizer::theParameterMap
private
const HcalDDDRecConstants* HcalDigitizer::theRecNumber
private

Definition at line 78 of file HcalDigitizer.h.

Referenced by checkGeometry().

edm::ESWatcher<HcalRecNumberingRecord> HcalDigitizer::theRecNumberWatcher_
private

Definition at line 76 of file HcalDigitizer.h.

Referenced by checkGeometry().

std::unique_ptr<HcalHitRelabeller> HcalDigitizer::theRelabeller
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), checkGeometry(), and HcalDigitizer().

HcalShapes HcalDigitizer::theShapes
private

Definition at line 97 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and initializeEvent().

std::unique_ptr<HcalTimeSlewSim> HcalDigitizer::theTimeSlewSim
private

Definition at line 134 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

std::unique_ptr<HcalAmplifier> HcalDigitizer::theZDCAmplifier
private

Definition at line 112 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), setup(), and setZDCNoiseSignalGenerator().

std::unique_ptr<ZDCDigitizer> HcalDigitizer::theZDCDigitizer
private
std::unique_ptr<HcalElectronicsSim> HcalDigitizer::theZDCElectronicsSim
private

Definition at line 122 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and setZDCNoiseSignalGenerator().

ZDCHitFilter HcalDigitizer::theZDCHitFilter
private

Definition at line 132 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

std::unique_ptr<CaloHitResponse> HcalDigitizer::theZDCResponse
private

Definition at line 105 of file HcalDigitizer.h.

Referenced by checkGeometry(), and HcalDigitizer().

bool HcalDigitizer::zdcgeo
private

Definition at line 153 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().