CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
EcalMixingModuleValidation Class Reference

#include <EcalMixingModuleValidation.h>

Inheritance diagram for EcalMixingModuleValidation:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
 EcalMixingModuleValidation (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~EcalMixingModuleValidation () override
 Destructor. More...
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &c) override
 Analyze. More...
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void dqmEndRun (const edm::Run &r, const edm::EventSetup &c) override
 
- Protected Member Functions inherited from DQMOneEDAnalyzer<>
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)=0
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Private Types

typedef std::map< uint32_t, float, std::less< uint32_t > > MapType
 

Private Member Functions

void bunchSumTest (std::vector< MonitorElement * > &theBunches, MonitorElement *&theTotal, MonitorElement *&theRatio, int nSample)
 
void checkCalibrations (edm::EventSetup const &c)
 
void checkPedestals (const edm::EventSetup &c)
 
void computeSDBunchDigi (const edm::EventSetup &eventSetup, const MixCollection< PCaloHit > &theHits, MapType &ebSignalSimMap, const EcalSubdetector &thisDet, const double &theSimThreshold, CLHEP::HepRandomEngine *)
 
void findPedestal (const DetId &detId, int gainId, double &ped) const
 
CLHEP::HepRandomEngine * randomEngine (edm::StreamID const &streamID)
 

Private Attributes

double barrelADCtoGeV_
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEBToken_
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEEToken_
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
 
edm::EDGetTokenT< EBDigiCollectionEBdigiCollectionToken_
 
edm::EDGetTokenT< EEDigiCollectionEEdigiCollectionToken_
 
double endcapADCtoGeV_
 
double esADCtokeV_
 
double esBaseline_
 
edm::EDGetTokenT< ESDigiCollectionESdigiCollectionToken_
 
double esThreshold_
 
std::map< int, double, std::less< int > > gainConv_
 
edm::EDGetTokenT< edm::HepMCProductHepMCToken_
 
double m_ESeffwei
 
int m_ESgain
 
const ESIntercalibConstantsm_ESmips
 
const ESPedestalsm_ESpeds
 
MonitorElementmeEBbunchCrossing_
 
MonitorElementmeEBBunchShape_ [nBunch]
 
MonitorElementmeEBDigiMixRatiogt100ADC_
 
MonitorElementmeEBDigiMixRatioOriggt50pc_
 
MonitorElementmeEBShape_
 
MonitorElementmeEBShapeRatio_
 
MonitorElementmeEEbunchCrossing_
 
MonitorElementmeEEBunchShape_ [nBunch]
 
MonitorElementmeEEDigiMixRatiogt100ADC_
 
MonitorElementmeEEDigiMixRatioOriggt40pc_
 
MonitorElementmeEEShape_
 
MonitorElementmeEEShapeRatio_
 
MonitorElementmeESbunchCrossing_
 
MonitorElementmeESBunchShape_ [nBunch]
 
MonitorElementmeESShape_
 
MonitorElementmeESShapeRatio_
 
std::string outputFile_
 
std::vector< CLHEP::HepRandomEngine * > randomEngines_
 
CaloHitResponsetheEBResponse
 
EBShapetheEBShape
 
CaloHitResponsetheEEResponse
 
EEShapetheEEShape
 
CaloHitResponsetheESResponse
 
ESShapetheESShape
 
const CaloGeometrytheGeometry
 
int theMaxBunch
 
int theMinBunch
 
const EcalSimParameterMaptheParameterMap
 
const EcalPedestalsthePedestals
 
bool verbose_
 

Static Private Attributes

static const int nBunch = 21
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer<>
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 72 of file EcalMixingModuleValidation.h.

Member Typedef Documentation

◆ MapType

typedef std::map<uint32_t, float, std::less<uint32_t> > EcalMixingModuleValidation::MapType
private

Definition at line 73 of file EcalMixingModuleValidation.h.

Constructor & Destructor Documentation

◆ EcalMixingModuleValidation()

EcalMixingModuleValidation::EcalMixingModuleValidation ( const edm::ParameterSet ps)

Constructor.

Definition at line 19 of file EcalMixingModuleValidation.cc.

20  : HepMCToken_(consumes<edm::HepMCProduct>(edm::InputTag(ps.getParameter<std::string>("moduleLabelMC")))),
21  EBdigiCollectionToken_(consumes<EBDigiCollection>(ps.getParameter<edm::InputTag>("EBdigiCollection"))),
22  EEdigiCollectionToken_(consumes<EEDigiCollection>(ps.getParameter<edm::InputTag>("EEdigiCollection"))),
23  ESdigiCollectionToken_(consumes<ESDigiCollection>(ps.getParameter<edm::InputTag>("ESdigiCollection"))),
25  edm::InputTag(std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEB")))),
27  edm::InputTag(std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEE")))),
29  std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsES")))) {
30  // needed for MixingModule checks
31 
32  double simHitToPhotoelectronsBarrel = ps.getParameter<double>("simHitToPhotoelectronsBarrel");
33  double simHitToPhotoelectronsEndcap = ps.getParameter<double>("simHitToPhotoelectronsEndcap");
34  double photoelectronsToAnalogBarrel = ps.getParameter<double>("photoelectronsToAnalogBarrel");
35  double photoelectronsToAnalogEndcap = ps.getParameter<double>("photoelectronsToAnalogEndcap");
36  double samplingFactor = ps.getParameter<double>("samplingFactor");
37  double timePhase = ps.getParameter<double>("timePhase");
38  int readoutFrameSize = ps.getParameter<int>("readoutFrameSize");
39  int binOfMaximum = ps.getParameter<int>("binOfMaximum");
40  bool doPhotostatistics = ps.getParameter<bool>("doPhotostatistics");
41  bool syncPhase = ps.getParameter<bool>("syncPhase");
42 
43  doPhotostatistics = false;
44 
50  timePhase,
54  syncPhase);
55  //theEcalShape = new EcalShape(timePhase);
56 
57  //theEcalResponse = new CaloHitResponse(theParameterMap, theEcalShape);
58 
59  /*
60  int ESGain = ps.getParameter<int>("ESGain");
61  double ESNoiseSigma = ps.getParameter<double> ("ESNoiseSigma");
62  int ESBaseline = ps.getParameter<int>("ESBaseline");
63  double ESMIPADC = ps.getParameter<double>("ESMIPADC");
64  double ESMIPkeV = ps.getParameter<double>("ESMIPkeV");
65 */
66 
67  theESShape = new ESShape();
68  theEBShape = new EBShape(true);
69  theEEShape = new EEShape(true);
70 
74 
75  // double effwei = 1.;
76 
77  /*
78  if (ESGain == 0)
79  effwei = 1.45;
80  else if (ESGain == 1)
81  effwei = 0.9066;
82  else if (ESGain == 2)
83  effwei = 0.8815;
84 
85  esBaseline_ = (double)ESBaseline;
86  esADCtokeV_ = 1000000.*ESMIPADC/ESMIPkeV;
87  esThreshold_ = 3.*effwei*ESNoiseSigma/esADCtokeV_;
88 */
89  theMinBunch = -10;
90  theMaxBunch = 10;
91 
92  // verbosity switch
93  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
94 
95  gainConv_[1] = 1.;
96  gainConv_[2] = 2.;
97  gainConv_[3] = 12.;
98  gainConv_[0] = 12.;
99  barrelADCtoGeV_ = 0.035;
100  endcapADCtoGeV_ = 0.06;
101 
102  meEBDigiMixRatiogt100ADC_ = nullptr;
103  meEEDigiMixRatiogt100ADC_ = nullptr;
104 
105  meEBDigiMixRatioOriggt50pc_ = nullptr;
106  meEEDigiMixRatioOriggt40pc_ = nullptr;
107 
108  meEBbunchCrossing_ = nullptr;
109  meEEbunchCrossing_ = nullptr;
110  meESbunchCrossing_ = nullptr;
111 
112  for (int i = 0; i < nBunch; i++) {
113  meEBBunchShape_[i] = nullptr;
114  meEEBunchShape_[i] = nullptr;
115  meESBunchShape_[i] = nullptr;
116  }
117 
118  meEBShape_ = nullptr;
119  meEEShape_ = nullptr;
120  meESShape_ = nullptr;
121 
122  meEBShapeRatio_ = nullptr;
123  meEEShapeRatio_ = nullptr;
124  meESShapeRatio_ = nullptr;
125 }

References barrelADCtoGeV_, ecalEBTriggerPrimitiveDigis_cfi::binOfMaximum, ecalSimParameterMap_cff::doPhotostatistics, endcapADCtoGeV_, gainConv_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, meEBbunchCrossing_, meEBBunchShape_, meEBDigiMixRatiogt100ADC_, meEBDigiMixRatioOriggt50pc_, meEBShape_, meEBShapeRatio_, meEEbunchCrossing_, meEEBunchShape_, meEEDigiMixRatiogt100ADC_, meEEDigiMixRatioOriggt40pc_, meEEShape_, meEEShapeRatio_, meESbunchCrossing_, meESBunchShape_, meESShape_, meESShapeRatio_, nBunch, ecalSimParameterMap_cff::photoelectronsToAnalogBarrel, ecalSimParameterMap_cff::photoelectronsToAnalogEndcap, ecalSimParameterMap_cff::readoutFrameSize, ecalSimParameterMap_cff::samplingFactor, ecalSimParameterMap_cff::simHitToPhotoelectronsBarrel, ecalSimParameterMap_cff::simHitToPhotoelectronsEndcap, ecalSimParameterMap_cff::syncPhase, theEBResponse, theEBShape, theEEResponse, theEEShape, theESResponse, theESShape, theMaxBunch, theMinBunch, theParameterMap, ecalSimParameterMap_cff::timePhase, and verbose_.

◆ ~EcalMixingModuleValidation()

EcalMixingModuleValidation::~EcalMixingModuleValidation ( )
override

Destructor.

Definition at line 127 of file EcalMixingModuleValidation.cc.

127 {}

Member Function Documentation

◆ analyze()

void EcalMixingModuleValidation::analyze ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

Analyze.

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 269 of file EcalMixingModuleValidation.cc.

269  {
270  //LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
271 
272  checkPedestals(c);
273 
274  std::vector<SimTrack> theSimTracks;
275  std::vector<SimVertex> theSimVertexes;
276 
278  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
282 
283  bool skipMC = false;
284  e.getByToken(HepMCToken_, MCEvt);
285  if (!MCEvt.isValid()) {
286  skipMC = true;
287  }
288 
289  const EBDigiCollection* EBdigis = nullptr;
290  const EEDigiCollection* EEdigis = nullptr;
291  const ESDigiCollection* ESdigis = nullptr;
292 
293  bool isBarrel = true;
294  e.getByToken(EBdigiCollectionToken_, EcalDigiEB);
295  if (EcalDigiEB.isValid()) {
296  EBdigis = EcalDigiEB.product();
297  LogDebug("DigiInfo") << "total # EBdigis: " << EBdigis->size();
298  if (EBdigis->empty())
299  isBarrel = false;
300  } else {
301  isBarrel = false;
302  }
303 
304  bool isEndcap = true;
305  e.getByToken(EEdigiCollectionToken_, EcalDigiEE);
306  if (EcalDigiEE.isValid()) {
307  EEdigis = EcalDigiEE.product();
308  LogDebug("DigiInfo") << "total # EEdigis: " << EEdigis->size();
309  if (EEdigis->empty())
310  isEndcap = false;
311  } else {
312  isEndcap = false;
313  }
314 
315  bool isPreshower = true;
316  e.getByToken(ESdigiCollectionToken_, EcalDigiES);
317  if (EcalDigiES.isValid()) {
318  ESdigis = EcalDigiES.product();
319  LogDebug("DigiInfo") << "total # ESdigis: " << ESdigis->size();
320  if (ESdigis->empty())
321  isPreshower = false;
322  } else {
323  isPreshower = false;
324  }
325 
326  double theGunEnergy = 0.;
327  if (!skipMC) {
328  for (HepMC::GenEvent::particle_const_iterator p = MCEvt->GetEvent()->particles_begin();
329  p != MCEvt->GetEvent()->particles_end();
330  ++p) {
331  theGunEnergy = (*p)->momentum().e();
332  }
333  }
334  // in case no HepMC available, assume an arbitrary average energy for an interesting "gun"
335  else {
336  edm::LogWarning("DigiInfo") << "No HepMC available, using 30 GeV as giun energy";
337  theGunEnergy = 30.;
338  }
339 
340  // BARREL
341 
342  // loop over simHits
343 
344  if (isBarrel) {
345  e.getByToken(crossingFramePCaloHitEBToken_, crossingFrame);
346  const MixCollection<PCaloHit> barrelHits(crossingFrame.product());
347 
348  MapType ebSignalSimMap;
349 
350  double ebSimThreshold = 0.5 * theGunEnergy;
351 
352  for (auto const& iHit : barrelHits) {
353  EBDetId ebid = EBDetId(iHit.id());
354 
355  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
356  << " DetID = " << iHit.id() << " EBDetId = " << ebid.ieta() << " " << ebid.iphi() << "\n"
357  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
358  << " Track Id = " << iHit.geantTrackId() << "\n"
359  << " Energy = " << iHit.energy();
360 
361  uint32_t crystid = ebid.rawId();
362 
363  if (iHit.eventId().rawId() == 0)
364  ebSignalSimMap[crystid] += iHit.energy();
365 
366  if (meEBbunchCrossing_)
367  meEBbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
368  }
369 
370  // loop over Digis
371 
372  const EBDigiCollection* barrelDigi = EcalDigiEB.product();
373 
374  std::vector<double> ebAnalogSignal;
375  std::vector<double> ebADCCounts;
376  std::vector<double> ebADCGains;
377  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
378  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
379  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
380 
381  for (unsigned int digis = 0; digis < EcalDigiEB->size(); ++digis) {
382  EBDataFrame ebdf = (*barrelDigi)[digis];
383  int nrSamples = ebdf.size();
384 
385  EBDetId ebid = ebdf.id();
386 
387  double Emax = 0.;
388  int Pmax = 0;
389 
390  for (int sample = 0; sample < nrSamples; ++sample) {
391  ebAnalogSignal[sample] = 0.;
392  ebADCCounts[sample] = 0.;
393  ebADCGains[sample] = -1.;
394  }
395 
396  for (int sample = 0; sample < nrSamples; ++sample) {
398 
399  ebADCCounts[sample] = (mySample.adc());
400  ebADCGains[sample] = (mySample.gainId());
401  ebAnalogSignal[sample] = (ebADCCounts[sample] * gainConv_[(int)ebADCGains[sample]] * barrelADCtoGeV_);
402  if (Emax < ebAnalogSignal[sample]) {
403  Emax = ebAnalogSignal[sample];
404  Pmax = sample;
405  }
406  LogDebug("DigiInfo") << "EB sample " << sample << " ADC counts = " << ebADCCounts[sample]
407  << " Gain Id = " << ebADCGains[sample] << " Analog eq = " << ebAnalogSignal[sample];
408  }
409  double pedestalPreSampleAnalog = 0.;
410  findPedestal(ebid, (int)ebADCGains[Pmax], pedestalPreSampleAnalog);
411  pedestalPreSampleAnalog *= gainConv_[(int)ebADCGains[Pmax]] * barrelADCtoGeV_;
412  double Erec = Emax - pedestalPreSampleAnalog;
413 
414  if (ebSignalSimMap[ebid.rawId()] != 0.) {
415  LogDebug("DigiInfo") << " Digi / Signal Hit = " << Erec << " / " << ebSignalSimMap[ebid.rawId()] << " gainConv "
416  << gainConv_[(int)ebADCGains[Pmax]];
417  if (Erec > 100. * barrelADCtoGeV_ && meEBDigiMixRatiogt100ADC_)
418  meEBDigiMixRatiogt100ADC_->Fill(Erec / ebSignalSimMap[ebid.rawId()]);
419  if (ebSignalSimMap[ebid.rawId()] > ebSimThreshold && meEBDigiMixRatioOriggt50pc_)
420  meEBDigiMixRatioOriggt50pc_->Fill(Erec / ebSignalSimMap[ebid.rawId()]);
421  if (ebSignalSimMap[ebid.rawId()] > ebSimThreshold && meEBShape_) {
422  for (int i = 0; i < 10; i++) {
423  pedestalPreSampleAnalog = 0.;
424  findPedestal(ebid, (int)ebADCGains[i], pedestalPreSampleAnalog);
425  pedestalPreSampleAnalog *= gainConv_[(int)ebADCGains[i]] * barrelADCtoGeV_;
426  meEBShape_->Fill(i, ebAnalogSignal[i] - pedestalPreSampleAnalog);
427  }
428  }
429  }
430  }
431 
432  EcalSubdetector thisDet = EcalBarrel;
433  computeSDBunchDigi(c, barrelHits, ebSignalSimMap, thisDet, ebSimThreshold, randomEngine(e.streamID()));
434  }
435 
436  // ENDCAP
437 
438  // loop over simHits
439 
440  if (isEndcap) {
441  e.getByToken(crossingFramePCaloHitEEToken_, crossingFrame);
442  const MixCollection<PCaloHit> endcapHits(crossingFrame.product());
443  MapType eeSignalSimMap;
444 
445  double eeSimThreshold = 0.4 * theGunEnergy;
446 
447  for (auto const& iHit : endcapHits) {
448  EEDetId eeid = EEDetId(iHit.id());
449 
450  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
451  << " DetID = " << iHit.id() << " EEDetId side = " << eeid.zside() << " = " << eeid.ix() << " "
452  << eeid.iy() << "\n"
453  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
454  << " Track Id = " << iHit.geantTrackId() << "\n"
455  << " Energy = " << iHit.energy();
456 
457  uint32_t crystid = eeid.rawId();
458 
459  if (iHit.eventId().rawId() == 0)
460  eeSignalSimMap[crystid] += iHit.energy();
461 
462  if (meEEbunchCrossing_)
463  meEEbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
464  }
465 
466  // loop over Digis
467 
468  const EEDigiCollection* endcapDigi = EcalDigiEE.product();
469 
470  std::vector<double> eeAnalogSignal;
471  std::vector<double> eeADCCounts;
472  std::vector<double> eeADCGains;
473  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
474  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
475  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
476 
477  for (unsigned int digis = 0; digis < EcalDigiEE->size(); ++digis) {
478  EEDataFrame eedf = (*endcapDigi)[digis];
479  int nrSamples = eedf.size();
480 
481  EEDetId eeid = eedf.id();
482 
483  double Emax = 0.;
484  int Pmax = 0;
485 
486  for (int sample = 0; sample < nrSamples; ++sample) {
487  eeAnalogSignal[sample] = 0.;
488  eeADCCounts[sample] = 0.;
489  eeADCGains[sample] = -1.;
490  }
491 
492  for (int sample = 0; sample < nrSamples; ++sample) {
494 
495  eeADCCounts[sample] = (mySample.adc());
496  eeADCGains[sample] = (mySample.gainId());
497  eeAnalogSignal[sample] = (eeADCCounts[sample] * gainConv_[(int)eeADCGains[sample]] * endcapADCtoGeV_);
498  if (Emax < eeAnalogSignal[sample]) {
499  Emax = eeAnalogSignal[sample];
500  Pmax = sample;
501  }
502  LogDebug("DigiInfo") << "EE sample " << sample << " ADC counts = " << eeADCCounts[sample]
503  << " Gain Id = " << eeADCGains[sample] << " Analog eq = " << eeAnalogSignal[sample];
504  }
505  double pedestalPreSampleAnalog = 0.;
506  findPedestal(eeid, (int)eeADCGains[Pmax], pedestalPreSampleAnalog);
507  pedestalPreSampleAnalog *= gainConv_[(int)eeADCGains[Pmax]] * endcapADCtoGeV_;
508  double Erec = Emax - pedestalPreSampleAnalog;
509 
510  if (eeSignalSimMap[eeid.rawId()] != 0.) {
511  LogDebug("DigiInfo") << " Digi / Signal Hit = " << Erec << " / " << eeSignalSimMap[eeid.rawId()] << " gainConv "
512  << gainConv_[(int)eeADCGains[Pmax]];
513  if (Erec > 100. * endcapADCtoGeV_ && meEEDigiMixRatiogt100ADC_)
514  meEEDigiMixRatiogt100ADC_->Fill(Erec / eeSignalSimMap[eeid.rawId()]);
515  if (eeSignalSimMap[eeid.rawId()] > eeSimThreshold && meEEDigiMixRatioOriggt40pc_)
516  meEEDigiMixRatioOriggt40pc_->Fill(Erec / eeSignalSimMap[eeid.rawId()]);
517  if (eeSignalSimMap[eeid.rawId()] > eeSimThreshold && meEBShape_) {
518  for (int i = 0; i < 10; i++) {
519  pedestalPreSampleAnalog = 0.;
520  findPedestal(eeid, (int)eeADCGains[i], pedestalPreSampleAnalog);
521  pedestalPreSampleAnalog *= gainConv_[(int)eeADCGains[i]] * endcapADCtoGeV_;
522  meEEShape_->Fill(i, eeAnalogSignal[i] - pedestalPreSampleAnalog);
523  }
524  }
525  }
526  }
527 
528  EcalSubdetector thisDet = EcalEndcap;
529  computeSDBunchDigi(c, endcapHits, eeSignalSimMap, thisDet, eeSimThreshold, randomEngine(e.streamID()));
530  }
531 
532  if (isPreshower) {
533  e.getByToken(crossingFramePCaloHitESToken_, crossingFrame);
534  const MixCollection<PCaloHit> preshowerHits(crossingFrame.product());
535 
536  MapType esSignalSimMap;
537 
538  for (auto const& iHit : preshowerHits) {
539  ESDetId esid = ESDetId(iHit.id());
540 
541  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
542  << " DetID = " << iHit.id() << "ESDetId: z side " << esid.zside() << " plane "
543  << esid.plane() << esid.six() << ',' << esid.siy() << ':' << esid.strip() << "\n"
544  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
545  << " Track Id = " << iHit.geantTrackId() << "\n"
546  << " Energy = " << iHit.energy();
547 
548  uint32_t stripid = esid.rawId();
549 
550  if (iHit.eventId().rawId() == 0)
551  esSignalSimMap[stripid] += iHit.energy();
552 
553  if (meESbunchCrossing_)
554  meESbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
555 
556  // loop over Digis
557 
558  const ESDigiCollection* preshowerDigi = EcalDigiES.product();
559 
560  std::vector<double> esADCCounts;
561  std::vector<double> esADCAnalogSignal;
562  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
563  esADCAnalogSignal.reserve(ESDataFrame::MAXSAMPLES);
564 
565  for (unsigned int digis = 0; digis < EcalDigiES->size(); ++digis) {
566  ESDataFrame esdf = (*preshowerDigi)[digis];
567  int nrSamples = esdf.size();
568 
569  ESDetId esid = esdf.id();
570 
571  for (int sample = 0; sample < nrSamples; ++sample) {
572  esADCCounts[sample] = 0.;
573  esADCAnalogSignal[sample] = 0.;
574  }
575 
576  for (int sample = 0; sample < nrSamples; ++sample) {
577  ESSample mySample = esdf[sample];
578 
579  esADCCounts[sample] = (mySample.adc());
580  esBaseline_ = m_ESpeds->find(esid)->getMean();
581  const double factor(esADCtokeV_ / (*(m_ESmips->getMap().find(esid))));
582  esThreshold_ = 3. * m_ESeffwei * ((*m_ESpeds->find(esid)).getRms()) / factor;
583  esADCAnalogSignal[sample] = (esADCCounts[sample] - esBaseline_) / factor;
584  }
585  LogDebug("DigiInfo") << "Preshower Digi for ESDetId: z side " << esid.zside() << " plane " << esid.plane()
586  << esid.six() << ',' << esid.siy() << ':' << esid.strip();
587  for (int i = 0; i < 3; i++) {
588  LogDebug("DigiInfo") << "sample " << i << " ADC = " << esADCCounts[i]
589  << " Analog eq = " << esADCAnalogSignal[i];
590  }
591 
592  if (esSignalSimMap[esid.rawId()] > esThreshold_ && meESShape_) {
593  for (int i = 0; i < 3; i++) {
594  meESShape_->Fill(i, esADCAnalogSignal[i]);
595  }
596  }
597  }
598  }
599 
600  EcalSubdetector thisDet = EcalPreshower;
601  computeSDBunchDigi(c, preshowerHits, esSignalSimMap, thisDet, esThreshold_, randomEngine(e.streamID()));
602  }
603 }

References barrelADCtoGeV_, HLT_2018_cff::barrelHits, HltBtagPostValidation_cff::c, checkPedestals(), computeSDBunchDigi(), crossingFramePCaloHitEBToken_, crossingFramePCaloHitEEToken_, crossingFramePCaloHitESToken_, MillePedeFileConverter_cfg::e, EBdigiCollectionToken_, EcalBarrel, EcalEndcap, EcalPreshower, EEdigiCollectionToken_, edm::DataFrameContainer::empty(), endcapADCtoGeV_, HLT_2018_cff::endcapHits, esADCtokeV_, esBaseline_, ESdigiCollectionToken_, esThreshold_, DQMScaleToClient_cfi::factor, dqm::impl::MonitorElement::Fill(), ESCondObjectContainer< T >::find(), findPedestal(), gainConv_, edm::HepMCProduct::GetEvent(), ESCondObjectContainer< T >::getMap(), HepMCToken_, mps_fire::i, ESDataFrame::id(), EEDataFrame::id(), EBDataFrame::id(), EBDetId::ieta(), createfilelist::int, EBDetId::iphi(), PixelPluginsPhase0_cfi::isBarrel, GeomDetEnumerators::isEndcap(), edm::HandleBase::isValid(), EEDetId::ix(), EEDetId::iy(), LogDebug, m_ESeffwei, m_ESmips, m_ESpeds, ESDataFrame::MAXSAMPLES, EcalDataFrame::MAXSAMPLES, meEBbunchCrossing_, meEBDigiMixRatiogt100ADC_, meEBDigiMixRatioOriggt50pc_, meEBShape_, meEEbunchCrossing_, meEEDigiMixRatiogt100ADC_, meEEDigiMixRatioOriggt40pc_, meEEShape_, meESbunchCrossing_, meESShape_, ecalTB2006H4_GenSimDigiReco_cfg::mySample, AlCaHLTBitMon_ParallelJobs::p, ESDetId::plane(), dataAnalyzerFineBiningParameters_cff::Pmax, gedPhotons_cfi::preshowerHits, edm::Handle< T >::product(), randomEngine(), DetId::rawId(), edm::DataFrameContainer::reserve(), simplePhotonAnalyzer_cfi::sample, ESDetId::six(), ESDetId::siy(), ESDataFrame::size(), EcalDataFrame::size(), edm::DataFrameContainer::size(), ESDetId::strip(), ESDetId::zside(), and EEDetId::zside().

◆ bookHistograms()

void EcalMixingModuleValidation::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
override

Definition at line 135 of file EcalMixingModuleValidation.cc.

135  {
136  Char_t histo[200];
137 
138  ibooker.setCurrentFolder("EcalDigisV/EcalDigiTask");
139 
140  sprintf(histo, "EcalDigiTask Barrel maximum Digi over sim signal ratio gt 100 ADC");
141  meEBDigiMixRatiogt100ADC_ = ibooker.book1D(histo, histo, 200, 0., 100.);
142 
143  sprintf(histo, "EcalDigiTask Endcap maximum Digi over sim signal ratio gt 100 ADC");
144  meEEDigiMixRatiogt100ADC_ = ibooker.book1D(histo, histo, 200, 0., 100.);
145 
146  sprintf(histo, "EcalDigiTask Barrel maximum Digi over sim signal ratio signal gt 50pc gun");
147  meEBDigiMixRatioOriggt50pc_ = ibooker.book1D(histo, histo, 200, 0., 100.);
148 
149  sprintf(histo, "EcalDigiTask Endcap maximum Digi over sim signal ratio signal gt 40pc gun");
150  meEEDigiMixRatioOriggt40pc_ = ibooker.book1D(histo, histo, 200, 0., 100.);
151 
152  sprintf(histo, "EcalDigiTask Barrel bunch crossing");
153  meEBbunchCrossing_ = ibooker.book1D(histo, histo, 20, -10., 10.);
154 
155  sprintf(histo, "EcalDigiTask Endcap bunch crossing");
156  meEEbunchCrossing_ = ibooker.book1D(histo, histo, 20, -10., 10.);
157 
158  sprintf(histo, "EcalDigiTask Preshower bunch crossing");
159  meESbunchCrossing_ = ibooker.book1D(histo, histo, 20, -10., 10.);
160 
161  for (int i = 0; i < nBunch; i++) {
162  sprintf(histo, "EcalDigiTask Barrel shape bunch crossing %02d", i - 10);
163  meEBBunchShape_[i] = ibooker.bookProfile(histo, histo, 10, 0, 10, 4000, 0., 400.);
164 
165  sprintf(histo, "EcalDigiTask Endcap shape bunch crossing %02d", i - 10);
166  meEEBunchShape_[i] = ibooker.bookProfile(histo, histo, 10, 0, 10, 4000, 0., 400.);
167 
168  sprintf(histo, "EcalDigiTask Preshower shape bunch crossing %02d", i - 10);
169  meESBunchShape_[i] = ibooker.bookProfile(histo, histo, 3, 0, 3, 4000, 0., 400.);
170  }
171 
172  sprintf(histo, "EcalDigiTask Barrel shape digi");
173  meEBShape_ = ibooker.bookProfile(histo, histo, 10, 0, 10, 4000, 0., 2000.);
174 
175  sprintf(histo, "EcalDigiTask Endcap shape digi");
176  meEEShape_ = ibooker.bookProfile(histo, histo, 10, 0, 10, 4000, 0., 2000.);
177 
178  sprintf(histo, "EcalDigiTask Preshower shape digi");
179  meESShape_ = ibooker.bookProfile(histo, histo, 3, 0, 3, 4000, 0., 2000.);
180 
181  sprintf(histo, "EcalDigiTask Barrel shape digi ratio");
182  meEBShapeRatio_ = ibooker.book1D(histo, histo, 10, 0, 10.);
183 
184  sprintf(histo, "EcalDigiTask Endcap shape digi ratio");
185  meEEShapeRatio_ = ibooker.book1D(histo, histo, 10, 0, 10.);
186 
187  sprintf(histo, "EcalDigiTask Preshower shape digi ratio");
188  meESShapeRatio_ = ibooker.book1D(histo, histo, 3, 0, 3.);
189 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), timingPdfMaker::histo, mps_fire::i, meEBbunchCrossing_, meEBBunchShape_, meEBDigiMixRatiogt100ADC_, meEBDigiMixRatioOriggt50pc_, meEBShape_, meEBShapeRatio_, meEEbunchCrossing_, meEEBunchShape_, meEEDigiMixRatiogt100ADC_, meEEDigiMixRatioOriggt40pc_, meEEShape_, meEEShapeRatio_, meESbunchCrossing_, meESBunchShape_, meESShape_, meESShapeRatio_, nBunch, and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ bunchSumTest()

void EcalMixingModuleValidation::bunchSumTest ( std::vector< MonitorElement * > &  theBunches,
MonitorElement *&  theTotal,
MonitorElement *&  theRatio,
int  nSample 
)
private

Definition at line 215 of file EcalMixingModuleValidation.cc.

218  {
219  std::vector<double> bunchSum;
220  bunchSum.reserve(nSample);
221  std::vector<double> bunchSumErro;
222  bunchSumErro.reserve(nSample);
223  std::vector<double> total;
224  total.reserve(nSample);
225  std::vector<double> totalErro;
226  totalErro.reserve(nSample);
227  std::vector<double> ratio;
228  ratio.reserve(nSample);
229  std::vector<double> ratioErro;
230  ratioErro.reserve(nSample);
231 
232  for (int iEl = 0; iEl < nSample; iEl++) {
233  bunchSum[iEl] = 0.;
234  bunchSumErro[iEl] = 0.;
235  total[iEl] = 0.;
236  totalErro[iEl] = 0.;
237  ratio[iEl] = 0.;
238  ratioErro[iEl] = 0.;
239  }
240 
241  for (int iSample = 0; iSample < nSample; iSample++) {
242  total[iSample] += theTotal->getBinContent(iSample + 1);
243  totalErro[iSample] += theTotal->getBinError(iSample + 1);
244 
245  for (int iBunch = theMinBunch; iBunch <= theMaxBunch; iBunch++) {
246  int iHisto = iBunch - theMinBunch;
247 
248  bunchSum[iSample] += theBunches[iHisto]->getBinContent(iSample + 1);
249  bunchSumErro[iSample] += pow(theBunches[iHisto]->getBinError(iSample + 1), 2);
250  }
251  bunchSumErro[iSample] = sqrt(bunchSumErro[iSample]);
252 
253  if (bunchSum[iSample] > 0.) {
254  ratio[iSample] = total[iSample] / bunchSum[iSample];
255  ratioErro[iSample] =
256  sqrt(pow(totalErro[iSample] / bunchSum[iSample], 2) +
257  pow((total[iSample] * bunchSumErro[iSample]) / (bunchSum[iSample] * bunchSum[iSample]), 2));
258  }
259 
260  std::cout << " Sample = " << iSample << " Total = " << total[iSample] << " +- " << totalErro[iSample] << "\n"
261  << " Sum = " << bunchSum[iSample] << " +- " << bunchSumErro[iSample] << "\n"
262  << " Ratio = " << ratio[iSample] << " +- " << ratioErro[iSample] << std::endl;
263 
264  theRatio->setBinContent(iSample + 1, (float)ratio[iSample]);
265  theRatio->setBinError(iSample + 1, (float)ratioErro[iSample]);
266  }
267 }

References gather_cfg::cout, dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getBinError(), funct::pow(), particleFlowDisplacedVertex_cfi::ratio, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinError(), mathSSE::sqrt(), theMaxBunch, theMinBunch, and dqmMemoryStats::total.

Referenced by dqmEndRun().

◆ checkCalibrations()

void EcalMixingModuleValidation::checkCalibrations ( edm::EventSetup const &  c)
private

Definition at line 605 of file EcalMixingModuleValidation.cc.

605  {
606  // ADC -> GeV Scale
608  eventSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
609  const EcalADCToGeVConstant* agc = pAgc.product();
610 
611  EcalMGPAGainRatio* defaultRatios = new EcalMGPAGainRatio();
612 
613  gainConv_[1] = 1.;
614  gainConv_[2] = defaultRatios->gain12Over6();
615  gainConv_[3] = gainConv_[2] * (defaultRatios->gain6Over1());
616  gainConv_[0] = gainConv_[2] * (defaultRatios->gain6Over1());
617 
618  LogDebug("EcalDigi") << " Gains conversions: "
619  << "\n"
620  << " g1 = " << gainConv_[1] << "\n"
621  << " g2 = " << gainConv_[2] << "\n"
622  << " g3 = " << gainConv_[3];
623 
624  delete defaultRatios;
625 
626  const double barrelADCtoGeV_ = agc->getEBValue();
627  LogDebug("EcalDigi") << " Barrel GeV/ADC = " << barrelADCtoGeV_;
628  const double endcapADCtoGeV_ = agc->getEEValue();
629  LogDebug("EcalDigi") << " Endcap GeV/ADC = " << endcapADCtoGeV_;
630 
631  // ES condition objects
632  edm::ESHandle<ESGain> esgain_;
634  edm::ESHandle<ESPedestals> esPedestals_;
636 
637  eventSetup.get<ESGainRcd>().get(esgain_);
638  eventSetup.get<ESMIPToGeVConstantRcd>().get(esMIPToGeV_);
639  eventSetup.get<ESPedestalsRcd>().get(esPedestals_);
640  eventSetup.get<ESIntercalibConstantsRcd>().get(esMIPs_);
641 
642  const ESGain* esgain = esgain_.product();
643  m_ESpeds = esPedestals_.product();
644  m_ESmips = esMIPs_.product();
645  const ESMIPToGeVConstant* esMipToGeV = esMIPToGeV_.product();
646  m_ESgain = (int)esgain->getESGain();
647  const double valESMIPToGeV = (m_ESgain == 1) ? esMipToGeV->getESValueLow() : esMipToGeV->getESValueHigh();
648 
650 
651  esADCtokeV_ = 1000000. * valESMIPToGeV;
652 
653  m_ESeffwei = (0 == m_ESgain ? 1.45 : (1 == m_ESgain ? 0.9066 : (2 == m_ESgain ? 0.8815 : 1.0)));
654 }

References barrelADCtoGeV_, endcapADCtoGeV_, esADCtokeV_, EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), gainConv_, edm::EventSetup::get(), get, EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), ESGain::getESGain(), ESMIPToGeVConstant::getESValueHigh(), ESMIPToGeVConstant::getESValueLow(), createfilelist::int, LogDebug, m_ESeffwei, m_ESgain, m_ESmips, m_ESpeds, edm::ESHandle< T >::product(), ESShape::setGain(), and theESShape.

Referenced by dqmBeginRun().

◆ checkPedestals()

void EcalMixingModuleValidation::checkPedestals ( const edm::EventSetup c)
private

Definition at line 656 of file EcalMixingModuleValidation.cc.

656  {
657  // Pedestals from event setup
658 
660  eventSetup.get<EcalPedestalsRcd>().get(dbPed);
661  thePedestals = dbPed.product();
662 }

References edm::EventSetup::get(), get, edm::ESHandle< T >::product(), and thePedestals.

Referenced by analyze().

◆ computeSDBunchDigi()

void EcalMixingModuleValidation::computeSDBunchDigi ( const edm::EventSetup eventSetup,
const MixCollection< PCaloHit > &  theHits,
MapType ebSignalSimMap,
const EcalSubdetector thisDet,
const double &  theSimThreshold,
CLHEP::HepRandomEngine *  engine 
)
private

Definition at line 695 of file EcalMixingModuleValidation.cc.

700  {
701  if (thisDet != EcalBarrel && thisDet != EcalEndcap && thisDet != EcalPreshower) {
702  edm::LogError("EcalMMValid") << "Invalid subdetector type";
703  return;
704  }
705  //bool isCrystal = true;
706  //if ( thisDet == EcalPreshower ) isCrystal = false;
707 
708  // load the geometry
709 
710  edm::ESHandle<CaloGeometry> hGeometry;
711  eventSetup.get<CaloGeometryRecord>().get(hGeometry);
712 
713  const CaloGeometry* pGeometry = &*hGeometry;
714 
715  // see if we need to update
716  if (pGeometry != theGeometry) {
717  theGeometry = pGeometry;
718  //theEcalResponse->setGeometry(theGeometry);
722  }
723 
724  // vector of DetId with energy above a fraction of the gun's energy
725 
726  const std::vector<DetId>& theSDId = theGeometry->getValidDetIds(DetId::Ecal, thisDet);
727 
728  std::vector<DetId> theOverThresholdId;
729  for (unsigned int i = 0; i < theSDId.size(); i++) {
730  int sdId = theSDId[i].rawId();
731  if (SignalSimMap[sdId] > theSimThreshold)
732  theOverThresholdId.push_back(theSDId[i]);
733  }
734 
736  if (thisDet == EcalPreshower)
738 
739  for (int iBunch = theMinBunch; iBunch <= theMaxBunch; iBunch++) {
740  //if ( isCrystal ) {
741  if (thisDet == EcalBarrel) {
742  theEBResponse->setBunchRange(iBunch, iBunch);
743  theEBResponse->clear();
744  theEBResponse->run(theHits, engine);
745  } else if (thisDet == EcalEndcap) {
746  theEEResponse->setBunchRange(iBunch, iBunch);
747  theEEResponse->clear();
748  theEEResponse->run(theHits, engine);
749  } else {
750  theESResponse->setBunchRange(iBunch, iBunch);
751  theESResponse->clear();
752  theESResponse->run(theHits, engine);
753  }
754 
755  int iHisto = iBunch - theMinBunch;
756 
757  for (std::vector<DetId>::const_iterator idItr = theOverThresholdId.begin(); idItr != theOverThresholdId.end();
758  ++idItr) {
759  CaloSamples* analogSignal;
760  //if ( isCrystal )
761  if (thisDet == EcalBarrel) {
762  analogSignal = theEBResponse->findSignal(*idItr);
763  } else if (thisDet == EcalEndcap) {
764  analogSignal = theEEResponse->findSignal(*idItr);
765  } else {
766  analogSignal = theESResponse->findSignal(*idItr);
767  }
768 
769  if (analogSignal) {
770  (*analogSignal) *= theParameterMap->simParameters(analogSignal->id()).photoelectronsToAnalog();
771 
772  for (int i = 0; i < limit; i++) {
773  if (thisDet == EcalBarrel) {
774  meEBBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
775  } else if (thisDet == EcalEndcap) {
776  meEEBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
777  } else if (thisDet == EcalPreshower) {
778  meESBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
779  }
780  }
781  }
782  }
783  }
784 }

References CaloHitResponse::clear(), DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, dqm::impl::MonitorElement::Fill(), CaloHitResponse::findSignal(), edm::EventSetup::get(), get, CaloGeometry::getValidDetIds(), mps_fire::i, CaloSamples::id(), remoteMonitoring_LED_IterMethod_cfg::limit, ESDataFrame::MAXSAMPLES, CaloSamples::MAXSAMPLES, meEBBunchShape_, meEEBunchShape_, meESBunchShape_, hcalSimParameters_cfi::photoelectronsToAnalog, CaloHitResponse::run(), CaloHitResponse::setBunchRange(), CaloHitResponse::setGeometry(), EcalSimParameterMap::simParameters(), theEBResponse, theEEResponse, theESResponse, theGeometry, bscTrigger_cfi::theHits, theMaxBunch, theMinBunch, and theParameterMap.

Referenced by analyze().

◆ dqmBeginRun()

void EcalMixingModuleValidation::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

◆ dqmEndRun()

void EcalMixingModuleValidation::dqmEndRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 191 of file EcalMixingModuleValidation.cc.

191  {
192  // add shapes for each bunch crossing and divide the digi by the result
193 
194  std::vector<MonitorElement*> theBunches;
195  for (int i = 0; i < nBunch; i++) {
196  theBunches.push_back(meEBBunchShape_[i]);
197  }
199 
200  theBunches.clear();
201 
202  for (int i = 0; i < nBunch; i++) {
203  theBunches.push_back(meEEBunchShape_[i]);
204  }
206 
207  theBunches.clear();
208 
209  for (int i = 0; i < nBunch; i++) {
210  theBunches.push_back(meESBunchShape_[i]);
211  }
213 }

References bunchSumTest(), mps_fire::i, ESDataFrame::MAXSAMPLES, EcalDataFrame::MAXSAMPLES, meEBBunchShape_, meEBShape_, meEBShapeRatio_, meEEBunchShape_, meEEShape_, meEEShapeRatio_, meESBunchShape_, meESShape_, meESShapeRatio_, and nBunch.

◆ findPedestal()

void EcalMixingModuleValidation::findPedestal ( const DetId detId,
int  gainId,
double &  ped 
) const
private

Definition at line 664 of file EcalMixingModuleValidation.cc.

664  {
666  // should I care if it doesn't get found?
667  if (mapItr == thePedestals->getMap().end()) {
668  edm::LogError("EcalMMValid") << "Could not find pedestal for " << detId.rawId() << " among the "
669  << thePedestals->getMap().size();
670  } else {
671  EcalPedestals::Item item = (*mapItr);
672 
673  switch (gainId) {
674  case 0:
675  ped = item.mean_x1;
676  break;
677  case 1:
678  ped = item.mean_x12;
679  break;
680  case 2:
681  ped = item.mean_x6;
682  break;
683  case 3:
684  ped = item.mean_x1;
685  break;
686  default:
687  edm::LogError("EcalMMValid") << "Bad Pedestal " << gainId;
688  break;
689  }
690  LogDebug("EcalMMValid") << "Pedestals for " << detId.rawId() << " gain range " << gainId << " : \n"
691  << "Mean = " << ped;
692  }
693 }

References EcalCondObjectContainer< T >::end(), EcalCondObjectContainer< T >::find(), ecalMGPA::gainId(), EcalCondObjectContainer< T >::getMap(), B2GTnPMonitor_cfi::item, LogDebug, DetId::rawId(), EcalCondObjectContainer< T >::size(), and thePedestals.

Referenced by analyze().

◆ randomEngine()

CLHEP::HepRandomEngine * EcalMixingModuleValidation::randomEngine ( edm::StreamID const &  streamID)
private

Definition at line 786 of file EcalMixingModuleValidation.cc.

786  {
787  unsigned int index = streamID.value();
788  if (index >= randomEngines_.size()) {
789  randomEngines_.resize(index + 1, nullptr);
790  }
791  CLHEP::HepRandomEngine* ptr = randomEngines_[index];
792  if (!ptr) {
794  ptr = &rng->getEngine(streamID);
795  randomEngines_[index] = ptr;
796  }
797  return ptr;
798 }

References edm::RandomNumberGenerator::getEngine(), randomEngines_, and edm::StreamID::value().

Referenced by analyze().

Member Data Documentation

◆ barrelADCtoGeV_

double EcalMixingModuleValidation::barrelADCtoGeV_
private

◆ crossingFramePCaloHitEBToken_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > EcalMixingModuleValidation::crossingFramePCaloHitEBToken_
private

Definition at line 110 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ crossingFramePCaloHitEEToken_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > EcalMixingModuleValidation::crossingFramePCaloHitEEToken_
private

Definition at line 110 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ crossingFramePCaloHitESToken_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > EcalMixingModuleValidation::crossingFramePCaloHitESToken_
private

Definition at line 110 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ EBdigiCollectionToken_

edm::EDGetTokenT<EBDigiCollection> EcalMixingModuleValidation::EBdigiCollectionToken_
private

Definition at line 106 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ EEdigiCollectionToken_

edm::EDGetTokenT<EEDigiCollection> EcalMixingModuleValidation::EEdigiCollectionToken_
private

Definition at line 107 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ endcapADCtoGeV_

double EcalMixingModuleValidation::endcapADCtoGeV_
private

◆ esADCtokeV_

double EcalMixingModuleValidation::esADCtokeV_
private

Definition at line 168 of file EcalMixingModuleValidation.h.

Referenced by analyze(), and checkCalibrations().

◆ esBaseline_

double EcalMixingModuleValidation::esBaseline_
private

Definition at line 167 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ ESdigiCollectionToken_

edm::EDGetTokenT<ESDigiCollection> EcalMixingModuleValidation::ESdigiCollectionToken_
private

Definition at line 108 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ esThreshold_

double EcalMixingModuleValidation::esThreshold_
private

Definition at line 169 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ gainConv_

std::map<int, double, std::less<int> > EcalMixingModuleValidation::gainConv_
private

◆ HepMCToken_

edm::EDGetTokenT<edm::HepMCProduct> EcalMixingModuleValidation::HepMCToken_
private

Definition at line 104 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ m_ESeffwei

double EcalMixingModuleValidation::m_ESeffwei
private

Definition at line 182 of file EcalMixingModuleValidation.h.

Referenced by analyze(), and checkCalibrations().

◆ m_ESgain

int EcalMixingModuleValidation::m_ESgain
private

Definition at line 179 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations().

◆ m_ESmips

const ESIntercalibConstants* EcalMixingModuleValidation::m_ESmips
private

Definition at line 181 of file EcalMixingModuleValidation.h.

Referenced by analyze(), and checkCalibrations().

◆ m_ESpeds

const ESPedestals* EcalMixingModuleValidation::m_ESpeds
private

Definition at line 180 of file EcalMixingModuleValidation.h.

Referenced by analyze(), and checkCalibrations().

◆ meEBbunchCrossing_

MonitorElement* EcalMixingModuleValidation::meEBbunchCrossing_
private

◆ meEBBunchShape_

MonitorElement* EcalMixingModuleValidation::meEBBunchShape_[nBunch]
private

◆ meEBDigiMixRatiogt100ADC_

MonitorElement* EcalMixingModuleValidation::meEBDigiMixRatiogt100ADC_
private

◆ meEBDigiMixRatioOriggt50pc_

MonitorElement* EcalMixingModuleValidation::meEBDigiMixRatioOriggt50pc_
private

◆ meEBShape_

MonitorElement* EcalMixingModuleValidation::meEBShape_
private

◆ meEBShapeRatio_

MonitorElement* EcalMixingModuleValidation::meEBShapeRatio_
private

◆ meEEbunchCrossing_

MonitorElement* EcalMixingModuleValidation::meEEbunchCrossing_
private

◆ meEEBunchShape_

MonitorElement* EcalMixingModuleValidation::meEEBunchShape_[nBunch]
private

◆ meEEDigiMixRatiogt100ADC_

MonitorElement* EcalMixingModuleValidation::meEEDigiMixRatiogt100ADC_
private

◆ meEEDigiMixRatioOriggt40pc_

MonitorElement* EcalMixingModuleValidation::meEEDigiMixRatioOriggt40pc_
private

◆ meEEShape_

MonitorElement* EcalMixingModuleValidation::meEEShape_
private

◆ meEEShapeRatio_

MonitorElement* EcalMixingModuleValidation::meEEShapeRatio_
private

◆ meESbunchCrossing_

MonitorElement* EcalMixingModuleValidation::meESbunchCrossing_
private

◆ meESBunchShape_

MonitorElement* EcalMixingModuleValidation::meESBunchShape_[nBunch]
private

◆ meESShape_

MonitorElement* EcalMixingModuleValidation::meESShape_
private

◆ meESShapeRatio_

MonitorElement* EcalMixingModuleValidation::meESShapeRatio_
private

◆ nBunch

const int EcalMixingModuleValidation::nBunch = 21
staticprivate

◆ outputFile_

std::string EcalMixingModuleValidation::outputFile_
private

Definition at line 102 of file EcalMixingModuleValidation.h.

◆ randomEngines_

std::vector<CLHEP::HepRandomEngine*> EcalMixingModuleValidation::randomEngines_
private

Definition at line 184 of file EcalMixingModuleValidation.h.

Referenced by randomEngine().

◆ theEBResponse

CaloHitResponse* EcalMixingModuleValidation::theEBResponse
private

Definition at line 150 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi(), and EcalMixingModuleValidation().

◆ theEBShape

EBShape* EcalMixingModuleValidation::theEBShape
private

Definition at line 145 of file EcalMixingModuleValidation.h.

Referenced by dqmBeginRun(), and EcalMixingModuleValidation().

◆ theEEResponse

CaloHitResponse* EcalMixingModuleValidation::theEEResponse
private

Definition at line 151 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi(), and EcalMixingModuleValidation().

◆ theEEShape

EEShape* EcalMixingModuleValidation::theEEShape
private

Definition at line 146 of file EcalMixingModuleValidation.h.

Referenced by dqmBeginRun(), and EcalMixingModuleValidation().

◆ theESResponse

CaloHitResponse* EcalMixingModuleValidation::theESResponse
private

Definition at line 149 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi(), and EcalMixingModuleValidation().

◆ theESShape

ESShape* EcalMixingModuleValidation::theESShape
private

Definition at line 144 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations(), and EcalMixingModuleValidation().

◆ theGeometry

const CaloGeometry* EcalMixingModuleValidation::theGeometry
private

Definition at line 174 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi().

◆ theMaxBunch

int EcalMixingModuleValidation::theMaxBunch
private

◆ theMinBunch

int EcalMixingModuleValidation::theMinBunch
private

◆ theParameterMap

const EcalSimParameterMap* EcalMixingModuleValidation::theParameterMap
private

Definition at line 142 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi(), and EcalMixingModuleValidation().

◆ thePedestals

const EcalPedestals* EcalMixingModuleValidation::thePedestals
private

Definition at line 177 of file EcalMixingModuleValidation.h.

Referenced by checkPedestals(), and findPedestal().

◆ verbose_

bool EcalMixingModuleValidation::verbose_
private

Definition at line 100 of file EcalMixingModuleValidation.h.

Referenced by EcalMixingModuleValidation().

EcalDataFrame::MAXSAMPLES
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
EcalCondObjectContainer::getMap
const self & getMap() const
Definition: EcalCondObjectContainer.h:80
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalCondObjectContainer::end
const_iterator end() const
Definition: EcalCondObjectContainer.h:76
ESPedestalsRcd
Definition: ESPedestalsRcd.h:5
ESGain
Definition: ESGain.h:7
EcalMixingModuleValidation::crossingFramePCaloHitEEToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEEToken_
Definition: EcalMixingModuleValidation.h:110
EcalShapeBase::setEventSetup
void setEventSetup(const edm::EventSetup &evtSetup)
Definition: EcalShapeBase.cc:19
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
mps_fire.i
i
Definition: mps_fire.py:355
EcalMixingModuleValidation::thePedestals
const EcalPedestals * thePedestals
Definition: EcalMixingModuleValidation.h:177
ecalSimParameterMap_cff.syncPhase
syncPhase
Definition: ecalSimParameterMap_cff.py:11
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalMixingModuleValidation::HepMCToken_
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
Definition: EcalMixingModuleValidation.h:104
ESGainRcd
Definition: ESGainRcd.h:5
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EBShape
Definition: EBShape.h:6
EcalMixingModuleValidation::meEEbunchCrossing_
MonitorElement * meEEbunchCrossing_
Definition: EcalMixingModuleValidation.h:125
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EBDetId
Definition: EBDetId.h:17
ESMIPToGeVConstantRcd
Definition: ESMIPToGeVConstantRcd.h:5
EBDataFrame
Definition: EBDataFrame.h:11
ecalSimParameterMap_cff.photoelectronsToAnalogEndcap
photoelectronsToAnalogEndcap
Definition: ecalSimParameterMap_cff.py:4
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ESDetId::strip
int strip() const
Definition: ESDetId.h:47
EcalMixingModuleValidation::computeSDBunchDigi
void computeSDBunchDigi(const edm::EventSetup &eventSetup, const MixCollection< PCaloHit > &theHits, MapType &ebSignalSimMap, const EcalSubdetector &thisDet, const double &theSimThreshold, CLHEP::HepRandomEngine *)
Definition: EcalMixingModuleValidation.cc:695
gather_cfg.cout
cout
Definition: gather_cfg.py:144
ecalSimParameterMap_cff.samplingFactor
samplingFactor
Definition: ecalSimParameterMap_cff.py:8
ESCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: ESCondObjectContainer.h:33
ESDataFrame::size
int size() const
Definition: ESDataFrame.h:21
EcalMixingModuleValidation::meEBDigiMixRatiogt100ADC_
MonitorElement * meEBDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:118
EcalMixingModuleValidation::theGeometry
const CaloGeometry * theGeometry
Definition: EcalMixingModuleValidation.h:174
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
EcalMixingModuleValidation::theESShape
ESShape * theESShape
Definition: EcalMixingModuleValidation.h:144
EcalMixingModuleValidation::meEEBunchShape_
MonitorElement * meEEBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:131
EcalADCToGeVConstant
Definition: EcalADCToGeVConstant.h:13
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EcalSubdetector
EcalSubdetector
Definition: EcalSubdetector.h:10
ESDetId
Definition: ESDetId.h:15
EcalCondObjectContainer::size
size_t size() const
Definition: EcalCondObjectContainer.h:82
EcalMixingModuleValidation::crossingFramePCaloHitESToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
Definition: EcalMixingModuleValidation.h:110
ecalSimParameterMap_cff.photoelectronsToAnalogBarrel
photoelectronsToAnalogBarrel
Definition: ecalSimParameterMap_cff.py:13
ESMIPToGeVConstant::getESValueHigh
float getESValueHigh() const
Definition: ESMIPToGeVConstant.h:15
CaloSamples::MAXSAMPLES
static const int MAXSAMPLES
Definition: CaloSamples.h:86
EEDetId::ix
int ix() const
Definition: EEDetId.h:77
edm::Handle< edm::HepMCProduct >
EcalBarrel
Definition: EcalSubdetector.h:10
EcalMixingModuleValidation::crossingFramePCaloHitEBToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEBToken_
Definition: EcalMixingModuleValidation.h:110
EBDataFrame::id
key_type id() const
Definition: EBDataFrame.h:28
EcalMixingModuleValidation::m_ESmips
const ESIntercalibConstants * m_ESmips
Definition: EcalMixingModuleValidation.h:181
ESDataFrame
Definition: ESDataFrame.h:10
HLT_2018_cff.barrelHits
barrelHits
Definition: HLT_2018_cff.py:78774
EcalMixingModuleValidation::m_ESpeds
const ESPedestals * m_ESpeds
Definition: EcalMixingModuleValidation.h:180
EcalMixingModuleValidation::meESbunchCrossing_
MonitorElement * meESbunchCrossing_
Definition: EcalMixingModuleValidation.h:126
EcalMixingModuleValidation::EBdigiCollectionToken_
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:106
CrossingFrame
Definition: CrossingFrame.h:38
CaloGeometry
Definition: CaloGeometry.h:21
EcalMixingModuleValidation::theMinBunch
int theMinBunch
Definition: EcalMixingModuleValidation.h:171
EcalMixingModuleValidation::EEdigiCollectionToken_
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:107
EcalMixingModuleValidation::meEBShapeRatio_
MonitorElement * meEBShapeRatio_
Definition: EcalMixingModuleValidation.h:138
EcalSimParameterMap
Definition: EcalSimParameterMap.h:11
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
EcalMixingModuleValidation::m_ESeffwei
double m_ESeffwei
Definition: EcalMixingModuleValidation.h:182
MixCollection
Definition: MixCollection.h:11
EcalMixingModuleValidation::esBaseline_
double esBaseline_
Definition: EcalMixingModuleValidation.h:167
edm::DataFrameContainer::empty
bool empty() const
Definition: DataFrameContainer.h:160
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
EcalMixingModuleValidation::meESShapeRatio_
MonitorElement * meESShapeRatio_
Definition: EcalMixingModuleValidation.h:140
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
edm::ESHandle< EcalADCToGeVConstant >
EEDataFrame::id
key_type id() const
Definition: EEDataFrame.h:24
EcalCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalCondObjectContainer.h:53
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
EEDetId::zside
int zside() const
Definition: EEDetId.h:71
EcalMixingModuleValidation::gainConv_
std::map< int, double, std::less< int > > gainConv_
Definition: EcalMixingModuleValidation.h:113
ESIntercalibConstantsRcd
Definition: ESIntercalibConstantsRcd.h:5
ESGain::getESGain
float getESGain() const
Definition: ESGain.h:13
EEShape
Definition: EEShape.h:6
EcalMixingModuleValidation::verbose_
bool verbose_
Definition: EcalMixingModuleValidation.h:100
EcalMixingModuleValidation::theEBResponse
CaloHitResponse * theEBResponse
Definition: EcalMixingModuleValidation.h:150
EcalMixingModuleValidation::bunchSumTest
void bunchSumTest(std::vector< MonitorElement * > &theBunches, MonitorElement *&theTotal, MonitorElement *&theRatio, int nSample)
Definition: EcalMixingModuleValidation.cc:215
EcalMixingModuleValidation::meEEShape_
MonitorElement * meEEShape_
Definition: EcalMixingModuleValidation.h:135
EcalMGPAGainRatio::gain12Over6
float gain12Over6() const
Definition: EcalMGPAGainRatio.h:19
particleFlowDisplacedVertex_cfi.ratio
ratio
Definition: particleFlowDisplacedVertex_cfi.py:93
edm::DataFrameContainer::reserve
void reserve(size_t isize)
Definition: DataFrameContainer.h:86
EEDetId
Definition: EEDetId.h:14
ESDigiCollection
Definition: EcalDigiCollections.h:58
EcalMixingModuleValidation::meESShape_
MonitorElement * meESShape_
Definition: EcalMixingModuleValidation.h:136
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
ESSample
Definition: ESSample.h:7
edm::LogWarning
Definition: MessageLogger.h:141
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
EcalMixingModuleValidation::m_ESgain
int m_ESgain
Definition: EcalMixingModuleValidation.h:179
EcalMixingModuleValidation::checkCalibrations
void checkCalibrations(edm::EventSetup const &c)
Definition: EcalMixingModuleValidation.cc:605
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
EcalADCToGeVConstant::getEEValue
float getEEValue() const
Definition: EcalADCToGeVConstant.h:21
edm::LogError
Definition: MessageLogger.h:183
EcalMixingModuleValidation::barrelADCtoGeV_
double barrelADCtoGeV_
Definition: EcalMixingModuleValidation.h:115
EcalMixingModuleValidation::findPedestal
void findPedestal(const DetId &detId, int gainId, double &ped) const
Definition: EcalMixingModuleValidation.cc:664
EBDigiCollection
Definition: EcalDigiCollections.h:32
EEDigiCollection
Definition: EcalDigiCollections.h:45
CaloHitResponse::setBunchRange
void setBunchRange(int minBunch, int maxBunch)
tells it which pileup bunches to do
Definition: CaloHitResponse.cc:53
EcalMixingModuleValidation::checkPedestals
void checkPedestals(const edm::EventSetup &c)
Definition: EcalMixingModuleValidation.cc:656
EcalMixingModuleValidation::theMaxBunch
int theMaxBunch
Definition: EcalMixingModuleValidation.h:172
EcalMixingModuleValidation::theEEShape
EEShape * theEEShape
Definition: EcalMixingModuleValidation.h:146
EcalPedestalsMapIterator
EcalPedestalsMap::const_iterator EcalPedestalsMapIterator
Definition: EcalPedestals.h:49
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
CaloSamples::id
DetId id() const
get the (generic) id
Definition: CaloSamples.h:21
edm::Service< edm::RandomNumberGenerator >
createfilelist.int
int
Definition: createfilelist.py:10
EcalMixingModuleValidation::meEEDigiMixRatioOriggt40pc_
MonitorElement * meEEDigiMixRatioOriggt40pc_
Definition: EcalMixingModuleValidation.h:122
EcalSimParameterMap::simParameters
const CaloSimParameters & simParameters(const DetId &id) const override
return the sim parameters relative to the right subdet
Definition: EcalSimParameterMap.cc:52
ecalSimParameterMap_cff.timePhase
timePhase
Definition: ecalSimParameterMap_cff.py:9
EcalMixingModuleValidation::meEEDigiMixRatiogt100ADC_
MonitorElement * meEEDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:119
ecalTB2006H4_GenSimDigiReco_cfg.mySample
mySample
Definition: ecalTB2006H4_GenSimDigiReco_cfg.py:5
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
ESMIPToGeVConstant
Definition: ESMIPToGeVConstant.h:7
CaloSamples
Definition: CaloSamples.h:14
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
DetId::Ecal
Definition: DetId.h:27
get
#define get
EcalMixingModuleValidation::randomEngine
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
Definition: EcalMixingModuleValidation.cc:786
EEDetId::iy
int iy() const
Definition: EEDetId.h:83
EcalMixingModuleValidation::meEEShapeRatio_
MonitorElement * meEEShapeRatio_
Definition: EcalMixingModuleValidation.h:139
EcalMGPASample
Definition: EcalMGPASample.h:22
EcalMixingModuleValidation::ESdigiCollectionToken_
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:108
ecalEBTriggerPrimitiveDigis_cfi.binOfMaximum
binOfMaximum
Definition: ecalEBTriggerPrimitiveDigis_cfi.py:9
EcalMixingModuleValidation::esThreshold_
double esThreshold_
Definition: EcalMixingModuleValidation.h:169
EcalMixingModuleValidation::randomEngines_
std::vector< CLHEP::HepRandomEngine * > randomEngines_
Definition: EcalMixingModuleValidation.h:184
EcalMixingModuleValidation::endcapADCtoGeV_
double endcapADCtoGeV_
Definition: EcalMixingModuleValidation.h:116
ecalSimParameterMap_cff.readoutFrameSize
readoutFrameSize
Definition: ecalSimParameterMap_cff.py:5
ESDetId::plane
int plane() const
Definition: ESDetId.h:41
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
EcalPreshower
Definition: EcalSubdetector.h:10
ecalSimParameterMap_cff.simHitToPhotoelectronsBarrel
simHitToPhotoelectronsBarrel
Definition: ecalSimParameterMap_cff.py:10
ESDetId::six
int six() const
Definition: ESDetId.h:43
ESMIPToGeVConstant::getESValueLow
float getESValueLow() const
Definition: ESMIPToGeVConstant.h:13
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
ecalSimParameterMap_cff.doPhotostatistics
doPhotostatistics
Definition: ecalSimParameterMap_cff.py:12
CaloGeometry::getValidDetIds
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:75
ESCondObjectContainer::getMap
const self & getMap() const
Definition: ESCondObjectContainer.h:41
dataAnalyzerFineBiningParameters_cff.Pmax
Pmax
Definition: dataAnalyzerFineBiningParameters_cff.py:10
bscTrigger_cfi.theHits
theHits
Definition: bscTrigger_cfi.py:18
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
EcalMixingModuleValidation::meESBunchShape_
MonitorElement * meESBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:132
EcalMixingModuleValidation::meEBShape_
MonitorElement * meEBShape_
Definition: EcalMixingModuleValidation.h:134
EcalMixingModuleValidation::meEBDigiMixRatioOriggt50pc_
MonitorElement * meEBDigiMixRatioOriggt50pc_
Definition: EcalMixingModuleValidation.h:121
EcalMixingModuleValidation::meEBBunchShape_
MonitorElement * meEBBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:130
EcalMixingModuleValidation::theParameterMap
const EcalSimParameterMap * theParameterMap
Definition: EcalMixingModuleValidation.h:142
EcalMGPAGainRatio::gain6Over1
float gain6Over1() const
Definition: EcalMGPAGainRatio.h:20
hcalSimParameters_cfi.photoelectronsToAnalog
photoelectronsToAnalog
Definition: hcalSimParameters_cfi.py:18
HLT_2018_cff.endcapHits
endcapHits
Definition: HLT_2018_cff.py:78759
EcalPedestal
Definition: EcalPedestals.h:8
dqm::impl::MonitorElement::setBinError
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
Definition: MonitorElement.cc:709
ESDetId::siy
int siy() const
Definition: ESDetId.h:45
EcalMixingModuleValidation::theESResponse
CaloHitResponse * theESResponse
Definition: EcalMixingModuleValidation.h:149
CaloHitResponse::findSignal
CaloSamples * findSignal(const DetId &detId)
users can look for the signal for a given cell
Definition: CaloHitResponse.cc:164
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EcalDataFrame::size
int size() const
Definition: EcalDataFrame.h:26
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
ecalMGPA::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalMGPASample.h:13
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
EcalPedestalsRcd
Definition: EcalPedestalsRcd.h:5
dqm::impl::MonitorElement::getBinError
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
Definition: MonitorElement.cc:610
EcalMixingModuleValidation::theEEResponse
CaloHitResponse * theEEResponse
Definition: EcalMixingModuleValidation.h:151
ESShape::setGain
void setGain(const int gain)
Definition: ESShape.h:23
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
EcalMixingModuleValidation::meEBbunchCrossing_
MonitorElement * meEBbunchCrossing_
Definition: EcalMixingModuleValidation.h:124
EEDataFrame
Definition: EEDataFrame.h:12
CaloHitResponse::clear
void clear()
frees up memory
Definition: CaloHitResponse.h:79
gedPhotons_cfi.preshowerHits
preshowerHits
Definition: gedPhotons_cfi.py:47
ESShape
Definition: ESShape.h:16
MapType
MapType
Definition: SiPixelTemplateDBObject_PayloadInspector.cc:51
GeomDetEnumerators::isEndcap
bool isEndcap(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:62
ecalSimParameterMap_cff.simHitToPhotoelectronsEndcap
simHitToPhotoelectronsEndcap
Definition: ecalSimParameterMap_cff.py:7
EcalADCToGeVConstant::getEBValue
float getEBValue() const
Definition: EcalADCToGeVConstant.h:20
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
EcalADCToGeVConstantRcd
Definition: EcalADCToGeVConstantRcd.h:5
EcalMixingModuleValidation::theEBShape
EBShape * theEBShape
Definition: EcalMixingModuleValidation.h:145
edm::InputTag
Definition: InputTag.h:15
ESDetId::zside
int zside() const
Definition: ESDetId.h:39
ESDataFrame::id
const ESDetId & id() const
Definition: ESDataFrame.h:19
CaloHitResponse::setGeometry
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
Definition: CaloHitResponse.h:49
EcalMixingModuleValidation::nBunch
static const int nBunch
Definition: EcalMixingModuleValidation.h:128
EcalMGPAGainRatio
Definition: EcalMGPAGainRatio.h:13
EcalMixingModuleValidation::esADCtokeV_
double esADCtokeV_
Definition: EcalMixingModuleValidation.h:168
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CaloHitResponse::run
virtual void run(const MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
Complete cell digitization.
Definition: CaloHitResponse.cc:58