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 hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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 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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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, hcalSimParameters_cfi::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 270 of file EcalMixingModuleValidation.cc.

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

References barrelADCtoGeV_, HLT_FULL_cff::barrelHits, HltBtagPostValidation_cff::c, checkPedestals(), computeSDBunchDigi(), crossingFramePCaloHitEBToken_, crossingFramePCaloHitEEToken_, crossingFramePCaloHitESToken_, MillePedeFileConverter_cfg::e, EBdigiCollectionToken_, EcalBarrel, EcalEndcap, EcalPreshower, EEdigiCollectionToken_, edm::DataFrameContainer::empty(), endcapADCtoGeV_, HLT_FULL_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 &   
)
overridevirtual

Implements DQMOneEDAnalyzer<>.

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 216 of file EcalMixingModuleValidation.cc.

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

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 606 of file EcalMixingModuleValidation.cc.

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

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 657 of file EcalMixingModuleValidation.cc.

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

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 696 of file EcalMixingModuleValidation.cc.

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

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  theBunches.reserve(nBunch);
196  for (int i = 0; i < nBunch; i++) {
197  theBunches.push_back(meEBBunchShape_[i]);
198  }
200 
201  theBunches.clear();
202 
203  for (int i = 0; i < nBunch; i++) {
204  theBunches.push_back(meEEBunchShape_[i]);
205  }
207 
208  theBunches.clear();
209 
210  for (int i = 0; i < nBunch; i++) {
211  theBunches.push_back(meESBunchShape_[i]);
212  }
214 }

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 665 of file EcalMixingModuleValidation.cc.

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

References EcalCondObjectContainer< T >::end(), EcalCondObjectContainer< T >::find(), ecalLiteDTU::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 787 of file EcalMixingModuleValidation.cc.

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

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
ecalLiteDTU::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalLiteDTUSample.h:14
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:428
EcalMixingModuleValidation::thePedestals
const EcalPedestals * thePedestals
Definition: EcalMixingModuleValidation.h:177
ecalSimParameterMap_cff.syncPhase
syncPhase
Definition: ecalSimParameterMap_cff.py:10
HLT_FULL_cff.endcapHits
endcapHits
Definition: HLT_FULL_cff.py:84477
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:696
gather_cfg.cout
cout
Definition: gather_cfg.py:144
ecalSimParameterMap_cff.samplingFactor
samplingFactor
Definition: ecalSimParameterMap_cff.py:7
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:12
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 >
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
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
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
hcalSimParameters_cfi.readoutFrameSize
readoutFrameSize
Definition: hcalSimParameters_cfi.py:14
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
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:216
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:82
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
HLT_FULL_cff.barrelHits
barrelHits
Definition: HLT_FULL_cff.py:84492
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:606
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
EcalADCToGeVConstant::getEEValue
float getEEValue() const
Definition: EcalADCToGeVConstant.h:21
EcalMixingModuleValidation::barrelADCtoGeV_
double barrelADCtoGeV_
Definition: EcalMixingModuleValidation.h:115
EcalCondObjectContainer::Item
T Item
Definition: EcalCondObjectContainer.h:15
EcalMixingModuleValidation::findPedestal
void findPedestal(const DetId &detId, int gainId, double &ped) const
Definition: EcalMixingModuleValidation.cc:665
EBDigiCollection
Definition: EcalDigiCollections.h:56
EEDigiCollection
Definition: EcalDigiCollections.h:69
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:657
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:8
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
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
get
#define get
EcalMixingModuleValidation::randomEngine
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
Definition: EcalMixingModuleValidation.cc:787
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
ESDetId::plane
int plane() const
Definition: ESDetId.h:41
EcalPreshower
Definition: EcalSubdetector.h:10
ecalSimParameterMap_cff.simHitToPhotoelectronsBarrel
simHitToPhotoelectronsBarrel
Definition: ecalSimParameterMap_cff.py:9
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:11
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
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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:29
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:153
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
GeomDetEnumerators::isEndcap
bool isEndcap(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:62
ecalSimParameterMap_cff.simHitToPhotoelectronsEndcap
simHitToPhotoelectronsEndcap
Definition: ecalSimParameterMap_cff.py:6
EcalADCToGeVConstant::getEBValue
float getEBValue() const
Definition: EcalADCToGeVConstant.h:20
EcalMixingModuleValidation::MapType
std::map< uint32_t, float, std::less< uint32_t > > MapType
Definition: EcalMixingModuleValidation.h:73
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