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
 
 EDProducer (const EDProducer &)=delete
 
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
 
const EDProduceroperator= (const EDProducer &)=delete
 
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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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::ESGetToken< EcalPedestals, EcalPedestalsRcddbPed
 
edm::EDGetTokenT< EBDigiCollectionEBdigiCollectionToken_
 
edm::EDGetTokenT< EEDigiCollectionEEdigiCollectionToken_
 
double endcapADCtoGeV_
 
double esADCtokeV_
 
double esBaseline_
 
edm::EDGetTokenT< ESDigiCollectionESdigiCollectionToken_
 
edm::ESGetToken< ESGain, ESGainRcdesgain_
 
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcdesMIPs_
 
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcdesMIPToGeV_
 
edm::ESGetToken< ESPedestals, ESPedestalsRcdesPedestals_
 
double esThreshold_
 
std::map< int, double, std::less< int > > gainConv_
 
edm::EDGetTokenT< edm::HepMCProductHepMCToken_
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordhGeometry
 
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_
 
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcdpAgc
 
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 75 of file EcalMixingModuleValidation.h.

Member Typedef Documentation

◆ MapType

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

Definition at line 76 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  edm::InputTag(std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsES")))),
30  pAgc(esConsumes<edm::Transition::BeginRun>()),
31  esgain_(esConsumes<edm::Transition::BeginRun>()),
32  esMIPToGeV_(esConsumes<edm::Transition::BeginRun>()),
33  esPedestals_(esConsumes<edm::Transition::BeginRun>()),
34  esMIPs_(esConsumes<edm::Transition::BeginRun>()),
35  dbPed(esConsumes()),
37  // needed for MixingModule checks
38 
39  double simHitToPhotoelectronsBarrel = ps.getParameter<double>("simHitToPhotoelectronsBarrel");
40  double simHitToPhotoelectronsEndcap = ps.getParameter<double>("simHitToPhotoelectronsEndcap");
41  double photoelectronsToAnalogBarrel = ps.getParameter<double>("photoelectronsToAnalogBarrel");
42  double photoelectronsToAnalogEndcap = ps.getParameter<double>("photoelectronsToAnalogEndcap");
43  double samplingFactor = ps.getParameter<double>("samplingFactor");
44  double timePhase = ps.getParameter<double>("timePhase");
45  int readoutFrameSize = ps.getParameter<int>("readoutFrameSize");
46  int binOfMaximum = ps.getParameter<int>("binOfMaximum");
47  bool doPhotostatistics = ps.getParameter<bool>("doPhotostatistics");
48  bool syncPhase = ps.getParameter<bool>("syncPhase");
49 
50  doPhotostatistics = false;
51 
57  timePhase,
61  syncPhase);
62  //theEcalShape = new EcalShape(timePhase);
63 
64  //theEcalResponse = new CaloHitResponse(theParameterMap, theEcalShape);
65 
66  /*
67  int ESGain = ps.getParameter<int>("ESGain");
68  double ESNoiseSigma = ps.getParameter<double> ("ESNoiseSigma");
69  int ESBaseline = ps.getParameter<int>("ESBaseline");
70  double ESMIPADC = ps.getParameter<double>("ESMIPADC");
71  double ESMIPkeV = ps.getParameter<double>("ESMIPkeV");
72 */
73 
74  theESShape = new ESShape();
75  theEBShape = new EBShape(true);
76  theEEShape = new EEShape(true);
77 
81 
82  // double effwei = 1.;
83 
84  /*
85  if (ESGain == 0)
86  effwei = 1.45;
87  else if (ESGain == 1)
88  effwei = 0.9066;
89  else if (ESGain == 2)
90  effwei = 0.8815;
91 
92  esBaseline_ = (double)ESBaseline;
93  esADCtokeV_ = 1000000.*ESMIPADC/ESMIPkeV;
94  esThreshold_ = 3.*effwei*ESNoiseSigma/esADCtokeV_;
95 */
96  theMinBunch = -10;
97  theMaxBunch = 10;
98 
99  // verbosity switch
100  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
101 
102  gainConv_[1] = 1.;
103  gainConv_[2] = 2.;
104  gainConv_[3] = 12.;
105  gainConv_[0] = 12.;
106  barrelADCtoGeV_ = 0.035;
107  endcapADCtoGeV_ = 0.06;
108 
109  meEBDigiMixRatiogt100ADC_ = nullptr;
110  meEEDigiMixRatiogt100ADC_ = nullptr;
111 
112  meEBDigiMixRatioOriggt50pc_ = nullptr;
113  meEEDigiMixRatioOriggt40pc_ = nullptr;
114 
115  meEBbunchCrossing_ = nullptr;
116  meEEbunchCrossing_ = nullptr;
117  meESbunchCrossing_ = nullptr;
118 
119  for (int i = 0; i < nBunch; i++) {
120  meEBBunchShape_[i] = nullptr;
121  meEEBunchShape_[i] = nullptr;
122  meESBunchShape_[i] = nullptr;
123  }
124 
125  meEBShape_ = nullptr;
126  meEEShape_ = nullptr;
127  meESShape_ = nullptr;
128 
129  meEBShapeRatio_ = nullptr;
130  meEEShapeRatio_ = nullptr;
131  meESShapeRatio_ = nullptr;
132 }

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

134 {}

Member Function Documentation

◆ analyze()

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

Analyze.

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 277 of file EcalMixingModuleValidation.cc.

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

References barrelADCtoGeV_, HLT_FULL_cff::barrelHits, 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 142 of file EcalMixingModuleValidation.cc.

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

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

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

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

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

References barrelADCtoGeV_, endcapADCtoGeV_, esADCtokeV_, esgain_, esMIPs_, esMIPToGeV_, esPedestals_, EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), gainConv_, edm::EventSetup::getData(), EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), ESGain::getESGain(), ESMIPToGeVConstant::getESValueHigh(), ESMIPToGeVConstant::getESValueLow(), createfilelist::int, LogDebug, m_ESeffwei, m_ESgain, m_ESmips, m_ESpeds, pAgc, ESShape::setGain(), and theESShape.

Referenced by dqmBeginRun().

◆ checkPedestals()

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

Definition at line 652 of file EcalMixingModuleValidation.cc.

652  {
653  // Pedestals from event setup
654 
655  thePedestals = &eventSetup.getData(dbPed);
656 }

References dbPed, edm::EventSetup::getData(), 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 689 of file EcalMixingModuleValidation.cc.

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

References CaloHitResponse::clear(), DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, dqm::impl::MonitorElement::Fill(), CaloHitResponse::findSignal(), edm::EventSetup::getHandle(), CaloGeometry::getValidDetIds(), hGeometry, 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

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 136 of file EcalMixingModuleValidation.cc.

136  {
140 }

References c, checkCalibrations(), EcalShapeBase::setEventSetup(), theEBShape, and theEEShape.

◆ dqmEndRun()

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

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 198 of file EcalMixingModuleValidation.cc.

198  {
199  // add shapes for each bunch crossing and divide the digi by the result
200 
201  std::vector<MonitorElement*> theBunches;
202  theBunches.reserve(nBunch);
203  for (int i = 0; i < nBunch; i++) {
204  theBunches.push_back(meEBBunchShape_[i]);
205  }
207 
208  theBunches.clear();
209 
210  for (int i = 0; i < nBunch; i++) {
211  theBunches.push_back(meEEBunchShape_[i]);
212  }
214 
215  theBunches.clear();
216 
217  for (int i = 0; i < nBunch; i++) {
218  theBunches.push_back(meESBunchShape_[i]);
219  }
221 }

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

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

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

778  {
779  unsigned int index = streamID.value();
780  if (index >= randomEngines_.size()) {
781  randomEngines_.resize(index + 1, nullptr);
782  }
783  CLHEP::HepRandomEngine* ptr = randomEngines_[index];
784  if (!ptr) {
786  ptr = &rng->getEngine(streamID);
787  randomEngines_[index] = ptr;
788  }
789  return ptr;
790 }

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 112 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ crossingFramePCaloHitEEToken_

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

Definition at line 112 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ crossingFramePCaloHitESToken_

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

Definition at line 112 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ dbPed

edm::ESGetToken<EcalPedestals, EcalPedestalsRcd> EcalMixingModuleValidation::dbPed
private

Definition at line 120 of file EcalMixingModuleValidation.h.

Referenced by checkPedestals().

◆ EBdigiCollectionToken_

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

Definition at line 109 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ EEdigiCollectionToken_

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

Definition at line 110 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ endcapADCtoGeV_

double EcalMixingModuleValidation::endcapADCtoGeV_
private

◆ esADCtokeV_

double EcalMixingModuleValidation::esADCtokeV_
private

Definition at line 178 of file EcalMixingModuleValidation.h.

Referenced by analyze(), and checkCalibrations().

◆ esBaseline_

double EcalMixingModuleValidation::esBaseline_
private

Definition at line 177 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ ESdigiCollectionToken_

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

Definition at line 111 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ esgain_

edm::ESGetToken<ESGain, ESGainRcd> EcalMixingModuleValidation::esgain_
private

Definition at line 116 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations().

◆ esMIPs_

edm::ESGetToken<ESIntercalibConstants, ESIntercalibConstantsRcd> EcalMixingModuleValidation::esMIPs_
private

Definition at line 119 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations().

◆ esMIPToGeV_

edm::ESGetToken<ESMIPToGeVConstant, ESMIPToGeVConstantRcd> EcalMixingModuleValidation::esMIPToGeV_
private

Definition at line 117 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations().

◆ esPedestals_

edm::ESGetToken<ESPedestals, ESPedestalsRcd> EcalMixingModuleValidation::esPedestals_
private

Definition at line 118 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations().

◆ esThreshold_

double EcalMixingModuleValidation::esThreshold_
private

Definition at line 179 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 107 of file EcalMixingModuleValidation.h.

Referenced by analyze().

◆ hGeometry

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> EcalMixingModuleValidation::hGeometry
private

Definition at line 121 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi().

◆ m_ESeffwei

double EcalMixingModuleValidation::m_ESeffwei
private

Definition at line 192 of file EcalMixingModuleValidation.h.

Referenced by analyze(), and checkCalibrations().

◆ m_ESgain

int EcalMixingModuleValidation::m_ESgain
private

Definition at line 189 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations().

◆ m_ESmips

const ESIntercalibConstants* EcalMixingModuleValidation::m_ESmips
private

Definition at line 191 of file EcalMixingModuleValidation.h.

Referenced by analyze(), and checkCalibrations().

◆ m_ESpeds

const ESPedestals* EcalMixingModuleValidation::m_ESpeds
private

Definition at line 190 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 105 of file EcalMixingModuleValidation.h.

◆ pAgc

edm::ESGetToken<EcalADCToGeVConstant, EcalADCToGeVConstantRcd> EcalMixingModuleValidation::pAgc
private

Definition at line 115 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations().

◆ randomEngines_

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

Definition at line 194 of file EcalMixingModuleValidation.h.

Referenced by randomEngine().

◆ theEBResponse

CaloHitResponse* EcalMixingModuleValidation::theEBResponse
private

Definition at line 160 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi(), and EcalMixingModuleValidation().

◆ theEBShape

EBShape* EcalMixingModuleValidation::theEBShape
private

Definition at line 155 of file EcalMixingModuleValidation.h.

Referenced by dqmBeginRun(), and EcalMixingModuleValidation().

◆ theEEResponse

CaloHitResponse* EcalMixingModuleValidation::theEEResponse
private

Definition at line 161 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi(), and EcalMixingModuleValidation().

◆ theEEShape

EEShape* EcalMixingModuleValidation::theEEShape
private

Definition at line 156 of file EcalMixingModuleValidation.h.

Referenced by dqmBeginRun(), and EcalMixingModuleValidation().

◆ theESResponse

CaloHitResponse* EcalMixingModuleValidation::theESResponse
private

Definition at line 159 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi(), and EcalMixingModuleValidation().

◆ theESShape

ESShape* EcalMixingModuleValidation::theESShape
private

Definition at line 154 of file EcalMixingModuleValidation.h.

Referenced by checkCalibrations(), and EcalMixingModuleValidation().

◆ theGeometry

const CaloGeometry* EcalMixingModuleValidation::theGeometry
private

Definition at line 184 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 152 of file EcalMixingModuleValidation.h.

Referenced by computeSDBunchDigi(), and EcalMixingModuleValidation().

◆ thePedestals

const EcalPedestals* EcalMixingModuleValidation::thePedestals
private

Definition at line 187 of file EcalMixingModuleValidation.h.

Referenced by checkPedestals(), and findPedestal().

◆ verbose_

bool EcalMixingModuleValidation::verbose_
private

Definition at line 103 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:78
EcalCondObjectContainer::end
const_iterator end() const
Definition: EcalCondObjectContainer.h:74
ESGain
Definition: ESGain.h:7
EcalMixingModuleValidation::crossingFramePCaloHitEEToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEEToken_
Definition: EcalMixingModuleValidation.h:112
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:187
ecalSimParameterMap_cff.syncPhase
syncPhase
Definition: ecalSimParameterMap_cff.py:10
HLT_FULL_cff.endcapHits
endcapHits
Definition: HLT_FULL_cff.py:84485
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalMixingModuleValidation::HepMCToken_
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
Definition: EcalMixingModuleValidation.h:107
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EBShape
Definition: EBShape.h:6
EcalMixingModuleValidation::meEEbunchCrossing_
MonitorElement * meEEbunchCrossing_
Definition: EcalMixingModuleValidation.h:135
EBDetId
Definition: EBDetId.h:17
EBDataFrame
Definition: EBDataFrame.h:11
ecalSimParameterMap_cff.photoelectronsToAnalogEndcap
photoelectronsToAnalogEndcap
Definition: ecalSimParameterMap_cff.py:4
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:689
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:128
EcalMixingModuleValidation::theGeometry
const CaloGeometry * theGeometry
Definition: EcalMixingModuleValidation.h:184
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:278
EcalMixingModuleValidation::theESShape
ESShape * theESShape
Definition: EcalMixingModuleValidation.h:154
EcalMixingModuleValidation::meEEBunchShape_
MonitorElement * meEEBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:141
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:80
EcalMixingModuleValidation::crossingFramePCaloHitESToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
Definition: EcalMixingModuleValidation.h:112
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
EcalMixingModuleValidation::esgain_
edm::ESGetToken< ESGain, ESGainRcd > esgain_
Definition: EcalMixingModuleValidation.h:116
EcalBarrel
Definition: EcalSubdetector.h:10
EcalMixingModuleValidation::crossingFramePCaloHitEBToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEBToken_
Definition: EcalMixingModuleValidation.h:112
EBDataFrame::id
key_type id() const
Definition: EBDataFrame.h:28
EcalMixingModuleValidation::m_ESmips
const ESIntercalibConstants * m_ESmips
Definition: EcalMixingModuleValidation.h:191
ESDataFrame
Definition: ESDataFrame.h:10
EcalMixingModuleValidation::m_ESpeds
const ESPedestals * m_ESpeds
Definition: EcalMixingModuleValidation.h:190
EcalMixingModuleValidation::meESbunchCrossing_
MonitorElement * meESbunchCrossing_
Definition: EcalMixingModuleValidation.h:136
EcalMixingModuleValidation::EBdigiCollectionToken_
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:109
CrossingFrame
Definition: CrossingFrame.h:37
CaloGeometry
Definition: CaloGeometry.h:21
EcalMixingModuleValidation::theMinBunch
int theMinBunch
Definition: EcalMixingModuleValidation.h:181
EcalMixingModuleValidation::EEdigiCollectionToken_
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:110
EcalMixingModuleValidation::meEBShapeRatio_
MonitorElement * meEBShapeRatio_
Definition: EcalMixingModuleValidation.h:148
EcalSimParameterMap
Definition: EcalSimParameterMap.h:11
hcalSimParameters_cfi.readoutFrameSize
readoutFrameSize
Definition: hcalSimParameters_cfi.py:14
EcalMixingModuleValidation::m_ESeffwei
double m_ESeffwei
Definition: EcalMixingModuleValidation.h:192
MixCollection
Definition: MixCollection.h:10
EcalMixingModuleValidation::esBaseline_
double esBaseline_
Definition: EcalMixingModuleValidation.h:177
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:150
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
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:123
EcalMixingModuleValidation::pAgc
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > pAgc
Definition: EcalMixingModuleValidation.h:115
ESGain::getESGain
float getESGain() const
Definition: ESGain.h:13
EEShape
Definition: EEShape.h:6
EcalMixingModuleValidation::verbose_
bool verbose_
Definition: EcalMixingModuleValidation.h:103
EcalMixingModuleValidation::theEBResponse
CaloHitResponse * theEBResponse
Definition: EcalMixingModuleValidation.h:160
EcalMixingModuleValidation::bunchSumTest
void bunchSumTest(std::vector< MonitorElement * > &theBunches, MonitorElement *&theTotal, MonitorElement *&theRatio, int nSample)
Definition: EcalMixingModuleValidation.cc:223
EcalMixingModuleValidation::meEEShape_
MonitorElement * meEEShape_
Definition: EcalMixingModuleValidation.h:145
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:146
EcalMixingModuleValidation::dbPed
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > dbPed
Definition: EcalMixingModuleValidation.h:120
EcalEndcap
Definition: EcalSubdetector.h:10
ESSample
Definition: ESSample.h:7
HLT_FULL_cff.barrelHits
barrelHits
Definition: HLT_FULL_cff.py:84484
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
EcalMixingModuleValidation::m_ESgain
int m_ESgain
Definition: EcalMixingModuleValidation.h:189
EcalMixingModuleValidation::checkCalibrations
void checkCalibrations(edm::EventSetup const &c)
Definition: EcalMixingModuleValidation.cc:613
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
EcalADCToGeVConstant::getEEValue
float getEEValue() const
Definition: EcalADCToGeVConstant.h:21
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EcalMixingModuleValidation::barrelADCtoGeV_
double barrelADCtoGeV_
Definition: EcalMixingModuleValidation.h:125
EcalCondObjectContainer::Item
T Item
Definition: EcalCondObjectContainer.h:15
EcalMixingModuleValidation::findPedestal
void findPedestal(const DetId &detId, int gainId, double &ped) const
Definition: EcalMixingModuleValidation.cc:658
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:652
EcalMixingModuleValidation::theMaxBunch
int theMaxBunch
Definition: EcalMixingModuleValidation.h:182
EcalMixingModuleValidation::theEEShape
EEShape * theEEShape
Definition: EcalMixingModuleValidation.h:156
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:132
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::esMIPs_
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcd > esMIPs_
Definition: EcalMixingModuleValidation.h:119
EcalMixingModuleValidation::meEEDigiMixRatiogt100ADC_
MonitorElement * meEEDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:129
ecalTB2006H4_GenSimDigiReco_cfg.mySample
mySample
Definition: ecalTB2006H4_GenSimDigiReco_cfg.py:5
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
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:37
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
EcalMixingModuleValidation::randomEngine
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
Definition: EcalMixingModuleValidation.cc:778
EEDetId::iy
int iy() const
Definition: EEDetId.h:83
EcalMixingModuleValidation::meEEShapeRatio_
MonitorElement * meEEShapeRatio_
Definition: EcalMixingModuleValidation.h:149
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalMGPASample
Definition: EcalMGPASample.h:22
EcalMixingModuleValidation::ESdigiCollectionToken_
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:111
ecalEBTriggerPrimitiveDigis_cfi.binOfMaximum
binOfMaximum
Definition: ecalEBTriggerPrimitiveDigis_cfi.py:9
EcalMixingModuleValidation::esThreshold_
double esThreshold_
Definition: EcalMixingModuleValidation.h:179
EcalMixingModuleValidation::randomEngines_
std::vector< CLHEP::HepRandomEngine * > randomEngines_
Definition: EcalMixingModuleValidation.h:194
EcalMixingModuleValidation::endcapADCtoGeV_
double endcapADCtoGeV_
Definition: EcalMixingModuleValidation.h:126
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:682
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:142
EcalMixingModuleValidation::meEBShape_
MonitorElement * meEBShape_
Definition: EcalMixingModuleValidation.h:144
EcalMixingModuleValidation::meEBDigiMixRatioOriggt50pc_
MonitorElement * meEBDigiMixRatioOriggt50pc_
Definition: EcalMixingModuleValidation.h:131
EcalMixingModuleValidation::meEBBunchShape_
MonitorElement * meEBBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:140
EcalMixingModuleValidation::theParameterMap
const EcalSimParameterMap * theParameterMap
Definition: EcalMixingModuleValidation.h:152
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:700
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:159
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
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition: EDConsumerBase.h:206
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
EcalMixingModuleValidation::esMIPToGeV_
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcd > esMIPToGeV_
Definition: EcalMixingModuleValidation.h:117
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:159
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
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:601
EcalMixingModuleValidation::theEEResponse
CaloHitResponse * theEEResponse
Definition: EcalMixingModuleValidation.h:161
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:134
EEDataFrame
Definition: EEDataFrame.h:12
CaloHitResponse::clear
void clear()
frees up memory
Definition: CaloHitResponse.h:79
gedPhotons_cfi.preshowerHits
preshowerHits
Definition: gedPhotons_cfi.py:48
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:76
EcalMixingModuleValidation::hGeometry
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > hGeometry
Definition: EcalMixingModuleValidation.h:121
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:583
EcalMixingModuleValidation::theEBShape
EBShape * theEBShape
Definition: EcalMixingModuleValidation.h:155
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:138
EcalMixingModuleValidation::esPedestals_
edm::ESGetToken< ESPedestals, ESPedestalsRcd > esPedestals_
Definition: EcalMixingModuleValidation.h:118
EcalMGPAGainRatio
Definition: EcalMGPAGainRatio.h:13
EcalMixingModuleValidation::esADCtokeV_
double esADCtokeV_
Definition: EcalMixingModuleValidation.h:178
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