CMS 3D CMS Logo

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

#include <GlobalDigisAnalyzer.h>

Inheritance diagram for GlobalDigisAnalyzer:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

typedef std::vector< double > DoubleVector
 
typedef std::vector< float > FloatVector
 
typedef std::vector< int > IntVector
 
typedef std::map< uint32_t, float, std::less< uint32_t > > MapType
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 GlobalDigisAnalyzer (const edm::ParameterSet &)
 
 ~GlobalDigisAnalyzer () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
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
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

void fillECal (const edm::Event &, const edm::EventSetup &)
 
void fillHCal (const edm::Event &, const edm::EventSetup &)
 
void fillMuon (const edm::Event &, const edm::EventSetup &)
 
void fillTrk (const edm::Event &, const edm::EventSetup &)
 

Private Attributes

unsigned int count
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
 
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcdecalADCtoGevToken_
 
double ECalbarrelADCtoGeV_
 
edm::InputTag ECalEBSrc_
 
edm::EDGetTokenT< EBDigiCollectionECalEBSrc_Token_
 
edm::InputTag ECalEESrc_
 
edm::EDGetTokenT< EEDigiCollectionECalEESrc_Token_
 
double ECalendcapADCtoGeV_
 
edm::InputTag ECalESSrc_
 
edm::EDGetTokenT< ESDigiCollectionECalESSrc_Token_
 
std::map< int, double, std::less< int > > ECalgainConv_
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
 
std::string fName
 
int frequency
 
bool getAllProvenances
 
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > HBHEDigi_Token_
 
edm::ESGetToken< HcalDbService, HcalDbRecordhcaldbToken_
 
edm::InputTag HCalDigi_
 
edm::InputTag HCalSrc_
 
edm::EDGetTokenT< edm::PCaloHitContainerHCalSrc_Token_
 
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > HFDigi_Token_
 
std::string hitsProducer
 
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > HODigi_Token_
 
std::string label
 
MonitorElementmehCSCStripADC
 
MonitorElementmehCSCStripn
 
MonitorElementmehCSCWiren
 
MonitorElementmehCSCWireTime
 
MonitorElementmehDtMuonLayer [4]
 
MonitorElementmehDtMuonn [4]
 
MonitorElementmehDtMuonTime [4]
 
MonitorElementmehDtMuonTimevLayer [4]
 
MonitorElementmehEcalAEE [2]
 
MonitorElementmehEcalMaxPos [2]
 
MonitorElementmehEcalMultvAEE [2]
 
MonitorElementmehEcaln [2]
 
MonitorElementmehEcalSHE [2]
 
MonitorElementmehEcalSHEvAEESHE [2]
 
MonitorElementmehEScalADC [3]
 
MonitorElementmehEScaln
 
MonitorElementmehHcalAEE [4]
 
MonitorElementmehHcalAEESHE [4]
 
MonitorElementmehHcaln [4]
 
MonitorElementmehHcalSHE [4]
 
MonitorElementmehHcalSHEvAEE [4]
 
MonitorElementmehRPCMuonn
 
MonitorElementmehRPCRes [5]
 
MonitorElementmehSiPixelADC [7]
 
MonitorElementmehSiPixelCol [7]
 
MonitorElementmehSiPixeln [7]
 
MonitorElementmehSiPixelRow [7]
 
MonitorElementmehSiStripADC [19]
 
MonitorElementmehSiStripn [19]
 
MonitorElementmehSiStripStrip [19]
 
edm::InputTag MuCSCStripSrc_
 
edm::EDGetTokenT< CSCStripDigiCollectionMuCSCStripSrc_Token_
 
edm::InputTag MuCSCWireSrc_
 
edm::EDGetTokenT< CSCWireDigiCollectionMuCSCWireSrc_Token_
 
edm::InputTag MuDTSrc_
 
edm::EDGetTokenT< DTDigiCollectionMuDTSrc_Token_
 
edm::InputTag MuRPCSrc_
 
edm::EDGetTokenT< RPCDigiCollectionMuRPCSrc_Token_
 
bool printProvenanceInfo
 
edm::ESGetToken< RPCGeometry, MuonGeometryRecordrpcGeomToken_
 
edm::EDGetTokenT< edm::PSimHitContainerRPCSimHit_Token_
 
edm::InputTag SiPxlSrc_
 
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > SiPxlSrc_Token_
 
edm::InputTag SiStripSrc_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripSrc_Token_
 
int theCSCStripPedestalCount
 
float theCSCStripPedestalSum
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
int verbosity
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 106 of file GlobalDigisAnalyzer.h.

Member Typedef Documentation

◆ DoubleVector

typedef std::vector<double> GlobalDigisAnalyzer::DoubleVector

Definition at line 109 of file GlobalDigisAnalyzer.h.

◆ FloatVector

typedef std::vector<float> GlobalDigisAnalyzer::FloatVector

Definition at line 108 of file GlobalDigisAnalyzer.h.

◆ IntVector

typedef std::vector<int> GlobalDigisAnalyzer::IntVector

Definition at line 110 of file GlobalDigisAnalyzer.h.

◆ MapType

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

Definition at line 111 of file GlobalDigisAnalyzer.h.

Constructor & Destructor Documentation

◆ GlobalDigisAnalyzer()

GlobalDigisAnalyzer::GlobalDigisAnalyzer ( const edm::ParameterSet iPSet)
explicit

Definition at line 14 of file GlobalDigisAnalyzer.cc.

References EBHits_Token_, ecalADCtoGevToken_, ECalbarrelADCtoGeV_, ECalEBSrc_, ECalEBSrc_Token_, ECalEESrc_, ECalEESrc_Token_, ECalendcapADCtoGeV_, ECalESSrc_, ECalESSrc_Token_, ECalgainConv_, EEHits_Token_, deDxTools::esConsumes(), ESHits_Token_, fName, frequency, EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), getAllProvenances, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HBHEDigi_Token_, hcaldbToken_, HCalDigi_, HCalSrc_, HCalSrc_Token_, HFDigi_Token_, hitsProducer, HODigi_Token_, HLT_2022v12_cff::InputTag, edm::InputTag::instance(), edm::InputTag::label(), MuCSCStripSrc_, MuCSCStripSrc_Token_, MuCSCWireSrc_, MuCSCWireSrc_Token_, MuDTSrc_, MuDTSrc_Token_, MuRPCSrc_, MuRPCSrc_Token_, printProvenanceInfo, rpcGeomToken_, RPCSimHit_Token_, SiPxlSrc_, SiPxlSrc_Token_, SiStripSrc_, SiStripSrc_Token_, AlCaHLTBitMon_QueryRunRegistry::string, tTopoToken_, and verbosity.

15  : fName(""),
16  verbosity(0),
17  frequency(0),
18  label(""),
19  getAllProvenances(false),
20  printProvenanceInfo(false),
21  hitsProducer(""),
24  count(0) {
25  std::string MsgLoggerCat = "GlobalDigisAnalyzer_GlobalDigisAnalyzer";
26 
27  // get information from parameter set
28  fName = iPSet.getUntrackedParameter<std::string>("Name");
29  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
30  frequency = iPSet.getUntrackedParameter<int>("Frequency");
31  edm::ParameterSet m_Prov = iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
32  getAllProvenances = m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
33  printProvenanceInfo = m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
34  hitsProducer = iPSet.getParameter<std::string>("hitsProducer");
35 
36  // get Labels to use to extract information
37  ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc");
38  ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc");
39  ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc");
40  HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc");
41  HCalDigi_ = iPSet.getParameter<edm::InputTag>("HCalDigi");
42  SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc");
43  SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc");
44  MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc");
45  MuCSCStripSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCStripSrc");
46  MuCSCWireSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCWireSrc");
47  MuRPCSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSrc");
48 
49  ECalEBSrc_Token_ = consumes<EBDigiCollection>(iPSet.getParameter<edm::InputTag>("ECalEBSrc"));
50  ECalEESrc_Token_ = consumes<EEDigiCollection>(iPSet.getParameter<edm::InputTag>("ECalEESrc"));
51  ECalESSrc_Token_ = consumes<ESDigiCollection>(iPSet.getParameter<edm::InputTag>("ECalESSrc"));
52  HCalSrc_Token_ = consumes<edm::PCaloHitContainer>(iPSet.getParameter<edm::InputTag>("HCalSrc"));
53  HBHEDigi_Token_ = consumes<edm::SortedCollection<HBHEDataFrame>>(iPSet.getParameter<edm::InputTag>("HCalDigi"));
54  HODigi_Token_ = consumes<edm::SortedCollection<HODataFrame>>(iPSet.getParameter<edm::InputTag>("HCalDigi"));
55  HFDigi_Token_ = consumes<edm::SortedCollection<HFDataFrame>>(iPSet.getParameter<edm::InputTag>("HCalDigi"));
56  SiStripSrc_Token_ = consumes<edm::DetSetVector<SiStripDigi>>(iPSet.getParameter<edm::InputTag>("SiStripSrc"));
57  SiPxlSrc_Token_ = consumes<edm::DetSetVector<PixelDigi>>(iPSet.getParameter<edm::InputTag>("SiPxlSrc"));
58  MuDTSrc_Token_ = consumes<DTDigiCollection>(iPSet.getParameter<edm::InputTag>("MuDTSrc"));
59  MuCSCStripSrc_Token_ = consumes<CSCStripDigiCollection>(iPSet.getParameter<edm::InputTag>("MuCSCStripSrc"));
60  MuCSCWireSrc_Token_ = consumes<CSCWireDigiCollection>(iPSet.getParameter<edm::InputTag>("MuCSCWireSrc"));
61  MuRPCSrc_Token_ = consumes<RPCDigiCollection>(iPSet.getParameter<edm::InputTag>("MuRPCSrc"));
62  //
63  const std::string barrelHitsName(hitsProducer + "EcalHitsEB");
64  const std::string endcapHitsName(hitsProducer + "EcalHitsEE");
65  const std::string preshowerHitsName(hitsProducer + "EcalHitsES");
66  EBHits_Token_ = consumes<CrossingFrame<PCaloHit>>(edm::InputTag(std::string("mix"), std::string("barrelHitsName")));
67  EEHits_Token_ = consumes<CrossingFrame<PCaloHit>>(edm::InputTag(std::string("mix"), std::string("endcapHitsName")));
69  consumes<CrossingFrame<PCaloHit>>(edm::InputTag(std::string("mix"), std::string("preshowerHitsName")));
70 
72  consumes<edm::PSimHitContainer>(edm::InputTag(std::string("g4SimHits"), std::string("MuonRPCHits")));
73 
78 
79  // use value of first digit to determine default output level (inclusive)
80  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
81  verbosity %= 10;
82 
83  // print out Parameter Set information being used
84  if (verbosity >= 0) {
85  edm::LogInfo(MsgLoggerCat) << "\n===============================\n"
86  << "Initialized as EDAnalyzer with parameter values:\n"
87  << " Name = " << fName << "\n"
88  << " Verbosity = " << verbosity << "\n"
89  << " Frequency = " << frequency << "\n"
90  << " GetProv = " << getAllProvenances << "\n"
91  << " PrintProv = " << printProvenanceInfo << "\n"
92  << " ECalEBSrc = " << ECalEBSrc_.label() << ":" << ECalEBSrc_.instance() << "\n"
93  << " ECalEESrc = " << ECalEESrc_.label() << ":" << ECalEESrc_.instance() << "\n"
94  << " ECalESSrc = " << ECalESSrc_.label() << ":" << ECalESSrc_.instance() << "\n"
95  << " HCalSrc = " << HCalSrc_.label() << ":" << HCalSrc_.instance() << "\n"
96  << " HCalDigi = " << HCalDigi_.label() << ":" << HCalDigi_.instance() << "\n"
97  << " SiStripSrc = " << SiStripSrc_.label() << ":" << SiStripSrc_.instance() << "\n"
98  << " SiPixelSrc = " << SiPxlSrc_.label() << ":" << SiPxlSrc_.instance() << "\n"
99  << " MuDTSrc = " << MuDTSrc_.label() << ":" << MuDTSrc_.instance() << "\n"
100  << " MuCSCStripSrc = " << MuCSCStripSrc_.label() << ":" << MuCSCStripSrc_.instance()
101  << "\n"
102  << " MuCSCWireSrc = " << MuCSCWireSrc_.label() << ":" << MuCSCWireSrc_.instance()
103  << "\n"
104  << " MuRPCSrc = " << MuRPCSrc_.label() << ":" << MuRPCSrc_.instance() << "\n"
105  << "===============================\n";
106  }
107 
108  // set default constants
109  // ECal
110 
111  ECalbarrelADCtoGeV_ = 0.035;
112  ECalendcapADCtoGeV_ = 0.06;
113 
114  EcalMGPAGainRatio defaultRatios;
115  ECalgainConv_[0] = 0.;
116  ECalgainConv_[1] = 1.;
117  ECalgainConv_[2] = defaultRatios.gain12Over6();
118  ECalgainConv_[3] = ECalgainConv_[2] * (defaultRatios.gain6Over1());
119 
120  if (verbosity >= 0) {
121  edm::LogInfo(MsgLoggerCat) << "Modified Calorimeter gain constants: g0 = " << ECalgainConv_[0]
122  << ", g1 = " << ECalgainConv_[1] << ", g2 = " << ECalgainConv_[2]
123  << ", g3 = " << ECalgainConv_[3];
124  }
125 }
edm::ESGetToken< HcalDbService, HcalDbRecord > hcaldbToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::string const & instance() const
Definition: InputTag.h:37
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
edm::EDGetTokenT< CSCStripDigiCollection > MuCSCStripSrc_Token_
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< EEDigiCollection > ECalEESrc_Token_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
edm::EDGetTokenT< edm::PSimHitContainer > RPCSimHit_Token_
edm::InputTag MuCSCStripSrc_
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > HFDigi_Token_
edm::EDGetTokenT< CSCWireDigiCollection > MuCSCWireSrc_Token_
std::map< int, double, std::less< int > > ECalgainConv_
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > HODigi_Token_
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripSrc_Token_
Log< level::Info, false > LogInfo
float gain12Over6() const
edm::EDGetTokenT< EBDigiCollection > ECalEBSrc_Token_
edm::EDGetTokenT< ESDigiCollection > ECalESSrc_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
float gain6Over1() const
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > HBHEDigi_Token_
edm::EDGetTokenT< RPCDigiCollection > MuRPCSrc_Token_
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > SiPxlSrc_Token_
edm::EDGetTokenT< DTDigiCollection > MuDTSrc_Token_
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > ecalADCtoGevToken_

◆ ~GlobalDigisAnalyzer()

GlobalDigisAnalyzer::~GlobalDigisAnalyzer ( )
override

Definition at line 127 of file GlobalDigisAnalyzer.cc.

127 {}

Member Function Documentation

◆ analyze()

void GlobalDigisAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 427 of file GlobalDigisAnalyzer.cc.

References count, ecalADCtoGevToken_, ECalbarrelADCtoGeV_, ECalendcapADCtoGeV_, fillECal(), fillHCal(), fillMuon(), fillTrk(), frequency, getAllProvenances, edm::EventSetup::getData(), EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), mps_fire::i, iEvent, nevt, printProvenanceInfo, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

427  {
428  std::string MsgLoggerCat = "GlobalDigisAnalyzer_analyze";
429 
430  // keep track of number of events processed
431  ++count;
432 
433  // THIS BLOCK MIGRATED HERE FROM beginJob:
434  // setup calorimeter constants from service
435  const EcalADCToGeVConstant *agc = &iSetup.getData(ecalADCtoGevToken_);
438  if (verbosity >= 0) {
439  edm::LogInfo(MsgLoggerCat) << "Modified Calorimeter ADCtoGeV constants: barrel = " << ECalbarrelADCtoGeV_
440  << ", endcap = " << ECalendcapADCtoGeV_;
441  }
442 
443  // get event id information
444  edm::RunNumber_t nrun = iEvent.id().run();
445  edm::EventNumber_t nevt = iEvent.id().event();
446 
447  if (verbosity > 0) {
448  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count << " events total)";
449  } else if (verbosity == 0) {
450  if (nevt % frequency == 0 || nevt == 1) {
451  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count
452  << " events total)";
453  }
454  }
455 
456  // look at information available in the event
457  if (getAllProvenances) {
458  std::vector<const edm::StableProvenance *> AllProv;
459  iEvent.getAllStableProvenance(AllProv);
460 
461  if (verbosity >= 0)
462  edm::LogInfo(MsgLoggerCat) << "Number of Provenances = " << AllProv.size();
463 
464  if (printProvenanceInfo && (verbosity >= 0)) {
465  TString eventout("\nProvenance info:\n");
466 
467  for (unsigned int i = 0; i < AllProv.size(); ++i) {
468  eventout += "\n ******************************";
469  eventout += "\n Module : ";
470  eventout += AllProv[i]->moduleLabel();
471  eventout += "\n ProductID : ";
472  eventout += AllProv[i]->productID().id();
473  eventout += "\n ClassName : ";
474  eventout += AllProv[i]->className();
475  eventout += "\n InstanceName : ";
476  eventout += AllProv[i]->productInstanceName();
477  eventout += "\n BranchName : ";
478  eventout += AllProv[i]->branchName();
479  }
480  eventout += "\n ******************************\n";
481  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
482  printProvenanceInfo = false;
483  }
484  getAllProvenances = false;
485  }
486 
487  // call fill functions
488  // gather Ecal information from event
489  fillECal(iEvent, iSetup);
490  // gather Hcal information from event
491  fillHCal(iEvent, iSetup);
492  // gather Track information from event
493  fillTrk(iEvent, iSetup);
494  // gather Muon information from event
495  fillMuon(iEvent, iSetup);
496 
497  if (verbosity > 0)
498  edm::LogInfo(MsgLoggerCat) << "Done gathering data from event.";
499 
500  if (verbosity > 2)
501  edm::LogInfo(MsgLoggerCat) << "Saving event contents:";
502 
503  return;
504 }
void fillECal(const edm::Event &, const edm::EventSetup &)
unsigned long long EventNumber_t
int iEvent
Definition: GenABIO.cc:224
bool getData(T &iHolder) const
Definition: EventSetup.h:122
void fillHCal(const edm::Event &, const edm::EventSetup &)
Log< level::Info, false > LogInfo
void fillMuon(const edm::Event &, const edm::EventSetup &)
unsigned int RunNumber_t
void fillTrk(const edm::Event &, const edm::EventSetup &)
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > ecalADCtoGevToken_

◆ bookHistograms()

void GlobalDigisAnalyzer::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 129 of file GlobalDigisAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), mps_fire::i, dqmiolumiharvest::j, mehCSCStripADC, mehCSCStripn, mehCSCWiren, mehCSCWireTime, mehDtMuonLayer, mehDtMuonn, mehDtMuonTime, mehDtMuonTimevLayer, mehEcalAEE, mehEcalMaxPos, mehEcalMultvAEE, mehEcaln, mehEcalSHE, mehEcalSHEvAEESHE, mehEScalADC, mehEScaln, mehHcalAEE, mehHcalAEESHE, mehHcaln, mehHcalSHE, mehHcalSHEvAEE, mehRPCMuonn, mehRPCRes, mehSiPixelADC, mehSiPixelCol, mehSiPixeln, mehSiPixelRow, mehSiStripADC, mehSiStripn, mehSiStripStrip, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

129  {
130  // Si Strip
131  std::string SiStripString[19] = {"TECW1",
132  "TECW2",
133  "TECW3",
134  "TECW4",
135  "TECW5",
136  "TECW6",
137  "TECW7",
138  "TECW8",
139  "TIBL1",
140  "TIBL2",
141  "TIBL3",
142  "TIBL4",
143  "TIDW1",
144  "TIDW2",
145  "TIDW3",
146  "TOBL1",
147  "TOBL2",
148  "TOBL3",
149  "TOBL4"};
150  for (int i = 0; i < 19; ++i) {
151  mehSiStripn[i] = nullptr;
152  mehSiStripADC[i] = nullptr;
153  mehSiStripStrip[i] = nullptr;
154  }
155  std::string hcharname, hchartitle;
156  iBooker.setCurrentFolder("GlobalDigisV/SiStrips");
157  for (int amend = 0; amend < 19; ++amend) {
158  hcharname = "hSiStripn_" + SiStripString[amend];
159  hchartitle = SiStripString[amend] + " Digis";
160  mehSiStripn[amend] = iBooker.book1D(hcharname, hchartitle, 5000, 0., 10000.);
161  mehSiStripn[amend]->setAxisTitle("Number of Digis", 1);
162  mehSiStripn[amend]->setAxisTitle("Count", 2);
163 
164  hcharname = "hSiStripADC_" + SiStripString[amend];
165  hchartitle = SiStripString[amend] + " ADC";
166  mehSiStripADC[amend] = iBooker.book1D(hcharname, hchartitle, 150, 0.0, 300.);
167  mehSiStripADC[amend]->setAxisTitle("ADC", 1);
168  mehSiStripADC[amend]->setAxisTitle("Count", 2);
169 
170  hcharname = "hSiStripStripADC_" + SiStripString[amend];
171  hchartitle = SiStripString[amend] + " Strip";
172  mehSiStripStrip[amend] = iBooker.book1D(hcharname, hchartitle, 200, 0.0, 800.);
173  mehSiStripStrip[amend]->setAxisTitle("Strip Number", 1);
174  mehSiStripStrip[amend]->setAxisTitle("Count", 2);
175  }
176 
177  // HCal
178  std::string HCalString[4] = {"HB", "HE", "HO", "HF"};
179  float calnUpper[4] = {30000., 30000., 30000., 20000.};
180  float calnLower[4] = {0., 0., 0., 0.};
181  float SHEUpper[4] = {1., 1., 1., 1.};
182  float SHEvAEEUpper[4] = {5000, 5000, 5000, 5000};
183  float SHEvAEELower[4] = {-5000, -5000, -5000, -5000};
184  int SHEvAEEnBins[4] = {200, 200, 200, 200};
185  double ProfileUpper[4] = {1., 1., 1., 1.};
186 
187  for (int i = 0; i < 4; ++i) {
188  mehHcaln[i] = nullptr;
189  mehHcalAEE[i] = nullptr;
190  mehHcalSHE[i] = nullptr;
191  mehHcalAEESHE[i] = nullptr;
192  mehHcalSHEvAEE[i] = nullptr;
193  }
194  iBooker.setCurrentFolder("GlobalDigisV/HCals");
195 
196  for (int amend = 0; amend < 4; ++amend) {
197  hcharname = "hHcaln_" + HCalString[amend];
198  hchartitle = HCalString[amend] + " digis";
199  mehHcaln[amend] = iBooker.book1D(hcharname, hchartitle, 10000, calnLower[amend], calnUpper[amend]);
200  mehHcaln[amend]->setAxisTitle("Number of Digis", 1);
201  mehHcaln[amend]->setAxisTitle("Count", 2);
202 
203  hcharname = "hHcalAEE_" + HCalString[amend];
204  hchartitle = HCalString[amend] + "Cal AEE";
205  mehHcalAEE[amend] = iBooker.book1D(hcharname, hchartitle, 60, -10., 50.);
206  mehHcalAEE[amend]->setAxisTitle("Analog Equivalent Energy", 1);
207  mehHcalAEE[amend]->setAxisTitle("Count", 2);
208 
209  hcharname = "hHcalSHE_" + HCalString[amend];
210  hchartitle = HCalString[amend] + "Cal SHE";
211  mehHcalSHE[amend] = iBooker.book1D(hcharname, hchartitle, 1000, 0.0, SHEUpper[amend]);
212  mehHcalSHE[amend]->setAxisTitle("Simulated Hit Energy", 1);
213  mehHcalSHE[amend]->setAxisTitle("Count", 2);
214 
215  hcharname = "hHcalAEESHE_" + HCalString[amend];
216  hchartitle = HCalString[amend] + "Cal AEE/SHE";
217  mehHcalAEESHE[amend] =
218  iBooker.book1D(hcharname, hchartitle, SHEvAEEnBins[amend], SHEvAEELower[amend], SHEvAEEUpper[amend]);
219  mehHcalAEESHE[amend]->setAxisTitle("ADC / SHE", 1);
220  mehHcalAEESHE[amend]->setAxisTitle("Count", 2);
221 
222  hcharname = "hHcalSHEvAEE_" + HCalString[amend];
223  hchartitle = HCalString[amend] + "Cal SHE vs. AEE";
224  mehHcalSHEvAEE[amend] =
225  iBooker.bookProfile(hcharname, hchartitle, 60, -10., 50., 100, 0., (float)ProfileUpper[amend], "");
226  mehHcalSHEvAEE[amend]->setAxisTitle("AEE / SHE", 1);
227  mehHcalSHEvAEE[amend]->setAxisTitle("SHE", 2);
228  }
229 
230  // Ecal
231  std::string ECalString[2] = {"EB", "EE"};
232 
233  for (int i = 0; i < 2; ++i) {
234  mehEcaln[i] = nullptr;
235  mehEcalAEE[i] = nullptr;
236  mehEcalSHE[i] = nullptr;
237  mehEcalMaxPos[i] = nullptr;
238  mehEcalMultvAEE[i] = nullptr;
239  mehEcalSHEvAEESHE[i] = nullptr;
240  }
241  iBooker.setCurrentFolder("GlobalDigisV/ECals");
242 
243  for (int amend = 0; amend < 2; ++amend) {
244  hcharname = "hEcaln_" + ECalString[amend];
245  hchartitle = ECalString[amend] + " digis";
246  mehEcaln[amend] = iBooker.book1D(hcharname, hchartitle, 3000, 0., 40000.);
247  mehEcaln[amend]->setAxisTitle("Number of Digis", 1);
248  mehEcaln[amend]->setAxisTitle("Count", 2);
249 
250  hcharname = "hEcalAEE_" + ECalString[amend];
251  hchartitle = ECalString[amend] + "Cal AEE";
252  mehEcalAEE[amend] = iBooker.book1D(hcharname, hchartitle, 1000, 0., 100.);
253  mehEcalAEE[amend]->setAxisTitle("Analog Equivalent Energy", 1);
254  mehEcalAEE[amend]->setAxisTitle("Count", 2);
255 
256  hcharname = "hEcalSHE_" + ECalString[amend];
257  hchartitle = ECalString[amend] + "Cal SHE";
258  mehEcalSHE[amend] = iBooker.book1D(hcharname, hchartitle, 500, 0., 50.);
259  mehEcalSHE[amend]->setAxisTitle("Simulated Hit Energy", 1);
260  mehEcalSHE[amend]->setAxisTitle("Count", 2);
261 
262  hcharname = "hEcalMaxPos_" + ECalString[amend];
263  hchartitle = ECalString[amend] + "Cal MaxPos";
264  mehEcalMaxPos[amend] = iBooker.book1D(hcharname, hchartitle, 10, 0., 10.);
265  mehEcalMaxPos[amend]->setAxisTitle("Maximum Position", 1);
266  mehEcalMaxPos[amend]->setAxisTitle("Count", 2);
267 
268  hcharname = "hEcalSHEvAEESHE_" + ECalString[amend];
269  hchartitle = ECalString[amend] + "Cal SHE vs. AEE/SHE";
270  mehEcalSHEvAEESHE[amend] = iBooker.bookProfile(hcharname, hchartitle, 1000, 0., 100., 500, 0., 50., "");
271  mehEcalSHEvAEESHE[amend]->setAxisTitle("AEE / SHE", 1);
272  mehEcalSHEvAEESHE[amend]->setAxisTitle("SHE", 2);
273 
274  hcharname = "hEcalMultvAEE_" + ECalString[amend];
275  hchartitle = ECalString[amend] + "Cal Multi vs. AEE";
276  mehEcalMultvAEE[amend] = iBooker.bookProfile(hcharname, hchartitle, 1000, 0., 100., 4000, 0., 40000., "");
277  mehEcalMultvAEE[amend]->setAxisTitle("Analog Equivalent Energy", 1);
278  mehEcalMultvAEE[amend]->setAxisTitle("Number of Digis", 2);
279  }
280  mehEScaln = nullptr;
281 
282  hcharname = "hEcaln_ES";
283  hchartitle = "ESCAL digis";
284  mehEScaln = iBooker.book1D(hcharname, hchartitle, 1000, 0., 5000.);
285  mehEScaln->setAxisTitle("Number of Digis", 1);
286  mehEScaln->setAxisTitle("Count", 2);
287 
288  std::string ADCNumber[3] = {"0", "1", "2"};
289  for (int i = 0; i < 3; ++i) {
290  mehEScalADC[i] = nullptr;
291  hcharname = "hEcalADC" + ADCNumber[i] + "_ES";
292  hchartitle = "ESCAL ADC" + ADCNumber[i];
293  mehEScalADC[i] = iBooker.book1D(hcharname, hchartitle, 1500, 0., 1500.);
294  mehEScalADC[i]->setAxisTitle("ADC" + ADCNumber[i], 1);
295  mehEScalADC[i]->setAxisTitle("Count", 2);
296  }
297 
298  // Si Pixels ***DONE***
299  std::string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p", "FWD2n", "FWD2p"};
300  for (int j = 0; j < 7; ++j) {
301  mehSiPixeln[j] = nullptr;
302  mehSiPixelADC[j] = nullptr;
303  mehSiPixelRow[j] = nullptr;
304  mehSiPixelCol[j] = nullptr;
305  }
306 
307  iBooker.setCurrentFolder("GlobalDigisV/SiPixels");
308  for (int amend = 0; amend < 7; ++amend) {
309  hcharname = "hSiPixeln_" + SiPixelString[amend];
310  hchartitle = SiPixelString[amend] + " Digis";
311  if (amend < 3)
312  mehSiPixeln[amend] = iBooker.book1D(hcharname, hchartitle, 500, 0., 1000.);
313  else
314  mehSiPixeln[amend] = iBooker.book1D(hcharname, hchartitle, 500, 0., 1000.);
315  mehSiPixeln[amend]->setAxisTitle("Number of Digis", 1);
316  mehSiPixeln[amend]->setAxisTitle("Count", 2);
317 
318  hcharname = "hSiPixelADC_" + SiPixelString[amend];
319  hchartitle = SiPixelString[amend] + " ADC";
320  mehSiPixelADC[amend] = iBooker.book1D(hcharname, hchartitle, 150, 0.0, 300.);
321  mehSiPixelADC[amend]->setAxisTitle("ADC", 1);
322  mehSiPixelADC[amend]->setAxisTitle("Count", 2);
323 
324  hcharname = "hSiPixelRow_" + SiPixelString[amend];
325  hchartitle = SiPixelString[amend] + " Row";
326  mehSiPixelRow[amend] = iBooker.book1D(hcharname, hchartitle, 100, 0.0, 100.);
327  mehSiPixelRow[amend]->setAxisTitle("Row Number", 1);
328  mehSiPixelRow[amend]->setAxisTitle("Count", 2);
329 
330  hcharname = "hSiPixelColumn_" + SiPixelString[amend];
331  hchartitle = SiPixelString[amend] + " Column";
332  mehSiPixelCol[amend] = iBooker.book1D(hcharname, hchartitle, 200, 0.0, 500.);
333  mehSiPixelCol[amend]->setAxisTitle("Column Number", 1);
334  mehSiPixelCol[amend]->setAxisTitle("Count", 2);
335  }
336 
337  // Muons
338  iBooker.setCurrentFolder("GlobalDigisV/Muons");
339 
340  // DT
341  std::string MuonString[4] = {"MB1", "MB2", "MB3", "MB4"};
342 
343  for (int i = 0; i < 4; ++i) {
344  mehDtMuonn[i] = nullptr;
345  mehDtMuonLayer[i] = nullptr;
346  mehDtMuonTime[i] = nullptr;
347  mehDtMuonTimevLayer[i] = nullptr;
348  }
349 
350  for (int j = 0; j < 4; ++j) {
351  hcharname = "hDtMuonn_" + MuonString[j];
352  hchartitle = MuonString[j] + " digis";
353  mehDtMuonn[j] = iBooker.book1D(hcharname, hchartitle, 250, 0., 500.);
354  mehDtMuonn[j]->setAxisTitle("Number of Digis", 1);
355  mehDtMuonn[j]->setAxisTitle("Count", 2);
356 
357  hcharname = "hDtLayer_" + MuonString[j];
358  hchartitle = MuonString[j] + " Layer";
359  mehDtMuonLayer[j] = iBooker.book1D(hcharname, hchartitle, 12, 1., 13.);
360  mehDtMuonLayer[j]->setAxisTitle("4 * (SuperLayer - 1) + Layer", 1);
361  mehDtMuonLayer[j]->setAxisTitle("Count", 2);
362 
363  hcharname = "hDtMuonTime_" + MuonString[j];
364  hchartitle = MuonString[j] + " Time";
365  mehDtMuonTime[j] = iBooker.book1D(hcharname, hchartitle, 300, 400., 1000.);
366  mehDtMuonTime[j]->setAxisTitle("Time", 1);
367  mehDtMuonTime[j]->setAxisTitle("Count", 2);
368 
369  hcharname = "hDtMuonTimevLayer_" + MuonString[j];
370  hchartitle = MuonString[j] + " Time vs. Layer";
371  mehDtMuonTimevLayer[j] = iBooker.bookProfile(hcharname, hchartitle, 12, 1., 13., 300, 400., 1000., "");
372  mehDtMuonTimevLayer[j]->setAxisTitle("4 * (SuperLayer - 1) + Layer", 1);
373  mehDtMuonTimevLayer[j]->setAxisTitle("Time", 2);
374  }
375 
376  // CSC
377  mehCSCStripn = nullptr;
378  hcharname = "hCSCStripn";
379  hchartitle = "CSC Strip digis";
380  mehCSCStripn = iBooker.book1D(hcharname, hchartitle, 250, 0., 500.);
381  mehCSCStripn->setAxisTitle("Number of Digis", 1);
382  mehCSCStripn->setAxisTitle("Count", 2);
383 
384  mehCSCStripADC = nullptr;
385  hcharname = "hCSCStripADC";
386  hchartitle = "CSC Strip ADC";
387  mehCSCStripADC = iBooker.book1D(hcharname, hchartitle, 110, 0., 1100.);
388  mehCSCStripADC->setAxisTitle("ADC", 1);
389  mehCSCStripADC->setAxisTitle("Count", 2);
390 
391  mehCSCWiren = nullptr;
392  hcharname = "hCSCWiren";
393  hchartitle = "CSC Wire digis";
394  mehCSCWiren = iBooker.book1D(hcharname, hchartitle, 250, 0., 500.);
395  mehCSCWiren->setAxisTitle("Number of Digis", 1);
396  mehCSCWiren->setAxisTitle("Count", 2);
397 
398  mehCSCWireTime = nullptr;
399  hcharname = "hCSCWireTime";
400  hchartitle = "CSC Wire Time";
401  mehCSCWireTime = iBooker.book1D(hcharname, hchartitle, 10, 0., 10.);
402  mehCSCWireTime->setAxisTitle("Time", 1);
403  mehCSCWireTime->setAxisTitle("Count", 2);
404 
405  // RPC
406  mehRPCMuonn = nullptr;
407  hcharname = "hRPCMuonn";
408  hchartitle = "RPC digis";
409  mehCSCStripn = iBooker.book1D(hcharname, hchartitle, 250, 0., 500.);
410  mehCSCStripn->setAxisTitle("Number of Digis", 1);
411  mehCSCStripn->setAxisTitle("Count", 2);
412 
413  std::string MuonRPCString[5] = {"Wmin2", "Wmin1", "W0", "Wpu1", "Wpu2"};
414  for (int i = 0; i < 5; ++i) {
415  mehRPCRes[i] = nullptr;
416  }
417 
418  for (int j = 0; j < 5; ++j) {
419  hcharname = "hRPCRes_" + MuonRPCString[j];
420  hchartitle = MuonRPCString[j] + " Digi - Sim";
421  mehRPCRes[j] = iBooker.book1D(hcharname, hchartitle, 200, -8., 8.);
422  mehRPCRes[j]->setAxisTitle("Digi - Sim center of strip x", 1);
423  mehRPCRes[j]->setAxisTitle("Count", 2);
424  }
425 }
MonitorElement * mehEScalADC[3]
MonitorElement * mehDtMuonLayer[4]
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * mehEcaln[2]
MonitorElement * mehEScaln
MonitorElement * mehSiPixelRow[7]
MonitorElement * mehRPCRes[5]
MonitorElement * mehSiStripADC[19]
MonitorElement * mehDtMuonTimevLayer[4]
MonitorElement * mehSiStripn[19]
MonitorElement * mehCSCWireTime
MonitorElement * mehEcalMaxPos[2]
MonitorElement * mehDtMuonTime[4]
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
MonitorElement * mehHcalAEE[4]
MonitorElement * mehRPCMuonn
MonitorElement * mehEcalSHE[2]
MonitorElement * mehEcalAEE[2]
MonitorElement * mehHcalSHEvAEE[4]
MonitorElement * mehCSCStripn
MonitorElement * mehCSCStripADC
MonitorElement * mehSiPixelCol[7]
MonitorElement * mehHcaln[4]
MonitorElement * mehHcalAEESHE[4]
MonitorElement * mehEcalSHEvAEESHE[2]
MonitorElement * mehHcalSHE[4]
MonitorElement * mehCSCWiren
MonitorElement * mehEcalMultvAEE[2]
MonitorElement * mehSiPixeln[7]
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * mehSiStripStrip[19]
MonitorElement * mehSiPixelADC[7]
MonitorElement * mehDtMuonn[4]
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ fillECal()

void GlobalDigisAnalyzer::fillECal ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 506 of file GlobalDigisAnalyzer.cc.

References ESSample::adc(), EcalMGPASample::adc(), HLT_2022v12_cff::barrelHits, EBHits_Token_, ECalbarrelADCtoGeV_, ECalEBSrc_Token_, ECalEESrc_Token_, ECalESSrc_Token_, ECalgainConv_, EEHits_Token_, edm::DataFrameContainer::empty(), HLT_2022v12_cff::endcapHits, ESHits_Token_, dqm::impl::MonitorElement::Fill(), EcalMGPASample::gainId(), mps_fire::i, EEDataFrame::id(), EBDataFrame::id(), iEvent, createfilelist::int, PixelPluginsPhase0_cfi::isBarrel, edm::HandleBase::isValid(), LogDebug, ESDataFrame::MAXSAMPLES, EcalDataFrame::MAXSAMPLES, mehEcalAEE, mehEcalMaxPos, mehEcalMultvAEE, mehEcaln, mehEcalSHE, mehEcalSHEvAEESHE, mehEScalADC, mehEScaln, dataAnalyzerFineBiningParameters_cff::Pmax, gedPhotons_cfi::preshowerHits, edm::Handle< T >::product(), DetId::rawId(), edm::DataFrameContainer::reserve(), ecalGpuTask_cfi::sample, ESDataFrame::size(), EcalDataFrame::size(), edm::DataFrameContainer::size(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by analyze().

506  {
507  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillECal";
508 
509  TString eventout;
510  if (verbosity > 0)
511  eventout = "\nGathering info:";
512 
513  // extract crossing frame from event
515 
517  // extract EB information
519  bool isBarrel = true;
521  iEvent.getByToken(ECalEBSrc_Token_, EcalDigiEB);
522  bool validDigiEB = true;
523  if (!EcalDigiEB.isValid()) {
524  LogDebug(MsgLoggerCat) << "Unable to find EcalDigiEB in event!";
525  validDigiEB = false;
526  }
527  if (validDigiEB) {
528  if (EcalDigiEB->empty())
529  isBarrel = false;
530 
531  if (isBarrel) {
532  // loop over simhits
533  MapType ebSimMap;
534  iEvent.getByToken(EBHits_Token_, crossingFrame);
535  bool validXFrame = true;
536  if (!crossingFrame.isValid()) {
537  LogDebug(MsgLoggerCat) << "Unable to find cal barrel crossingFrame in event!";
538  validXFrame = false;
539  }
540  if (validXFrame) {
541  const MixCollection<PCaloHit> barrelHits(crossingFrame.product());
542 
543  // keep track of sum of simhit energy in each crystal
544  for (auto const &iHit : barrelHits) {
545  EBDetId ebid = EBDetId(iHit.id());
546 
547  uint32_t crystid = ebid.rawId();
548  ebSimMap[crystid] += iHit.energy();
549  }
550  }
551 
552  // loop over digis
553  const EBDigiCollection *barrelDigi = EcalDigiEB.product();
554 
555  std::vector<double> ebAnalogSignal;
556  std::vector<double> ebADCCounts;
557  std::vector<double> ebADCGains;
558  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
559  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
560  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
561 
562  int i = 0;
563  for (unsigned int digis = 0; digis < EcalDigiEB->size(); ++digis) {
564  ++i;
565 
566  EBDataFrame ebdf = (*barrelDigi)[digis];
567  int nrSamples = ebdf.size();
568 
569  EBDetId ebid = ebdf.id();
570 
571  double Emax = 0;
572  int Pmax = 0;
573  double pedestalPreSample = 0.;
574  double pedestalPreSampleAnalog = 0.;
575 
576  for (int sample = 0; sample < nrSamples; ++sample) {
577  ebAnalogSignal[sample] = 0.;
578  ebADCCounts[sample] = 0.;
579  ebADCGains[sample] = -1.;
580  }
581 
582  // calculate maximum energy and pedestal
583  for (int sample = 0; sample < nrSamples; ++sample) {
584  EcalMGPASample thisSample = ebdf[sample];
585  ebADCCounts[sample] = (thisSample.adc());
586  ebADCGains[sample] = (thisSample.gainId());
587  ebAnalogSignal[sample] = (ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]] * ECalbarrelADCtoGeV_);
588  if (Emax < ebAnalogSignal[sample]) {
589  Emax = ebAnalogSignal[sample];
590  Pmax = sample;
591  }
592  if (sample < 3) {
593  pedestalPreSample += ebADCCounts[sample];
594  pedestalPreSampleAnalog +=
595  ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]] * ECalbarrelADCtoGeV_;
596  }
597  }
598  pedestalPreSample /= 3.;
599  pedestalPreSampleAnalog /= 3.;
600 
601  // calculate pedestal subtracted digi energy in the crystal
602  double Erec = Emax - pedestalPreSampleAnalog * ECalgainConv_[(int)ebADCGains[Pmax]];
603 
604  // gather necessary information
605  mehEcalMaxPos[0]->Fill(Pmax);
606  mehEcalSHE[0]->Fill(ebSimMap[ebid.rawId()]);
607  mehEcalAEE[0]->Fill(Erec);
608  // Adding protection against FPE
609  if (ebSimMap[ebid.rawId()] != 0) {
610  mehEcalSHEvAEESHE[0]->Fill(Erec / ebSimMap[ebid.rawId()], ebSimMap[ebid.rawId()]);
611  }
612  // else {
613  // std::cout<<"Would have been an FPE! with
614  // ebSimMap[ebid.rawId()]==0\n";
615  //}
616 
617  mehEcalMultvAEE[0]->Fill(Pmax, (float)i);
618  }
619 
620  if (verbosity > 1) {
621  eventout += "\n Number of EBDigis collected:.............. ";
622  eventout += i;
623  }
624  mehEcaln[0]->Fill((float)i);
625  }
626  }
627 
629  // extract EE information
631  bool isEndCap = true;
633  iEvent.getByToken(ECalEESrc_Token_, EcalDigiEE);
634  bool validDigiEE = true;
635  if (!EcalDigiEE.isValid()) {
636  LogDebug(MsgLoggerCat) << "Unable to find EcalDigiEE in event!";
637  validDigiEE = false;
638  }
639  if (validDigiEE) {
640  if (EcalDigiEE->empty())
641  isEndCap = false;
642 
643  if (isEndCap) {
644  // loop over simhits
645  MapType eeSimMap;
646  iEvent.getByToken(EEHits_Token_, crossingFrame);
647  bool validXFrame = true;
648  if (!crossingFrame.isValid()) {
649  LogDebug(MsgLoggerCat) << "Unable to find cal endcap crossingFrame in event!";
650  validXFrame = false;
651  }
652  if (validXFrame) {
653  const MixCollection<PCaloHit> endcapHits(crossingFrame.product());
654 
655  // keep track of sum of simhit energy in each crystal
656  for (auto const &iHit : endcapHits) {
657  EEDetId eeid = EEDetId(iHit.id());
658 
659  uint32_t crystid = eeid.rawId();
660  eeSimMap[crystid] += iHit.energy();
661  }
662  }
663 
664  // loop over digis
665  const EEDigiCollection *endcapDigi = EcalDigiEE.product();
666 
667  std::vector<double> eeAnalogSignal;
668  std::vector<double> eeADCCounts;
669  std::vector<double> eeADCGains;
670  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
671  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
672  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
673 
674  int inc = 0;
675  for (unsigned int digis = 0; digis < EcalDigiEE->size(); ++digis) {
676  ++inc;
677 
678  EEDataFrame eedf = (*endcapDigi)[digis];
679  int nrSamples = eedf.size();
680 
681  EEDetId eeid = eedf.id();
682 
683  double Emax = 0;
684  int Pmax = 0;
685  double pedestalPreSample = 0.;
686  double pedestalPreSampleAnalog = 0.;
687 
688  for (int sample = 0; sample < nrSamples; ++sample) {
689  eeAnalogSignal[sample] = 0.;
690  eeADCCounts[sample] = 0.;
691  eeADCGains[sample] = -1.;
692  }
693 
694  // calculate maximum enery and pedestal
695  for (int sample = 0; sample < nrSamples; ++sample) {
696  EcalMGPASample thisSample = eedf[sample];
697 
698  eeADCCounts[sample] = (thisSample.adc());
699  eeADCGains[sample] = (thisSample.gainId());
700  eeAnalogSignal[sample] = (eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]] * ECalbarrelADCtoGeV_);
701  if (Emax < eeAnalogSignal[sample]) {
702  Emax = eeAnalogSignal[sample];
703  Pmax = sample;
704  }
705  if (sample < 3) {
706  pedestalPreSample += eeADCCounts[sample];
707  pedestalPreSampleAnalog +=
708  eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]] * ECalbarrelADCtoGeV_;
709  }
710  }
711  pedestalPreSample /= 3.;
712  pedestalPreSampleAnalog /= 3.;
713 
714  // calculate pedestal subtracted digi energy in the crystal
715  double Erec = Emax - pedestalPreSampleAnalog * ECalgainConv_[(int)eeADCGains[Pmax]];
716 
717  // gather necessary information
718  mehEcalMaxPos[1]->Fill(Pmax);
719  mehEcalSHE[1]->Fill(eeSimMap[eeid.rawId()]);
720  mehEcalAEE[1]->Fill(Erec);
721  // Adding protection against FPE
722  if (eeSimMap[eeid.rawId()] != 0) {
723  mehEcalSHEvAEESHE[1]->Fill(Erec / eeSimMap[eeid.rawId()], eeSimMap[eeid.rawId()]);
724  }
725  // else{
726  // std::cout<<"Would have been an FPE! with
727  // eeSimMap[eeid.rawId()]==0\n";
728  //}
729  mehEcalMultvAEE[1]->Fill(Pmax, (float)inc);
730  }
731 
732  if (verbosity > 1) {
733  eventout += "\n Number of EEDigis collected:.............. ";
734  eventout += inc;
735  }
736 
737  mehEcaln[1]->Fill((float)inc);
738  }
739  }
740 
742  // extract ES information
744  bool isPreshower = true;
746  iEvent.getByToken(ECalESSrc_Token_, EcalDigiES);
747  bool validDigiES = true;
748  if (!EcalDigiES.isValid()) {
749  LogDebug(MsgLoggerCat) << "Unable to find EcalDigiES in event!";
750  validDigiES = false;
751  }
752 
753  // ONLY WHILE GEOMETRY IS REMOVED
754  validDigiES = false;
755 
756  if (validDigiES) {
757  if (EcalDigiES->empty())
758  isPreshower = false;
759 
760  if (isPreshower) {
761  // loop over simhits
762  iEvent.getByToken(ESHits_Token_, crossingFrame);
763  bool validXFrame = true;
764  if (!crossingFrame.isValid()) {
765  LogDebug(MsgLoggerCat) << "Unable to find cal preshower crossingFrame in event!";
766  validXFrame = false;
767  }
768  if (validXFrame) {
769  const MixCollection<PCaloHit> preshowerHits(crossingFrame.product());
770 
771  // keep track of sum of simhit energy in each crystal
772  MapType esSimMap;
773  for (auto const &iHit : preshowerHits) {
774  ESDetId esid = ESDetId(iHit.id());
775 
776  uint32_t crystid = esid.rawId();
777  esSimMap[crystid] += iHit.energy();
778  }
779  }
780 
781  // loop over digis
782  const ESDigiCollection *preshowerDigi = EcalDigiES.product();
783 
784  std::vector<double> esADCCounts;
785  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
786 
787  int i = 0;
788  for (unsigned int digis = 0; digis < EcalDigiES->size(); ++digis) {
789  ++i;
790 
791  ESDataFrame esdf = (*preshowerDigi)[digis];
792  int nrSamples = esdf.size();
793 
794  for (int sample = 0; sample < nrSamples; ++sample) {
795  esADCCounts[sample] = 0.;
796  }
797 
798  // gether ADC counts
799  for (int sample = 0; sample < nrSamples; ++sample) {
800  ESSample thisSample = esdf[sample];
801  esADCCounts[sample] = (thisSample.adc());
802  }
803 
804  mehEScalADC[0]->Fill(esADCCounts[0]);
805  mehEScalADC[1]->Fill(esADCCounts[1]);
806  mehEScalADC[2]->Fill(esADCCounts[2]);
807  }
808 
809  if (verbosity > 1) {
810  eventout += "\n Number of ESDigis collected:.............. ";
811  eventout += i;
812  }
813 
814  mehEScaln->Fill((float)i);
815  }
816  }
817  if (verbosity > 0)
818  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
819 
820  return;
821 }
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
MonitorElement * mehEScalADC[3]
int size() const
Definition: ESDataFrame.h:21
MonitorElement * mehEcaln[2]
MonitorElement * mehEScaln
T const * product() const
Definition: Handle.h:70
key_type id() const
Definition: EBDataFrame.h:28
key_type id() const
Definition: EEDataFrame.h:24
int size() const
Definition: EcalDataFrame.h:26
edm::EDGetTokenT< EEDigiCollection > ECalEESrc_Token_
void Fill(long long x)
int adc() const
get the ADC sample (singed 16 bits)
Definition: ESSample.h:16
MonitorElement * mehEcalMaxPos[2]
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
int iEvent
Definition: GenABIO.cc:224
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
std::map< int, double, std::less< int > > ECalgainConv_
MonitorElement * mehEcalSHE[2]
std::map< uint32_t, float, std::less< uint32_t > > MapType
void reserve(size_t isize)
Log< level::Info, false > LogInfo
MonitorElement * mehEcalAEE[2]
edm::EDGetTokenT< EBDigiCollection > ECalEBSrc_Token_
edm::EDGetTokenT< ESDigiCollection > ECalESSrc_Token_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * mehEcalSHEvAEESHE[2]
int adc() const
get the ADC sample (12 bits)
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
MonitorElement * mehEcalMultvAEE[2]
int gainId() const
get the gainId (2 bits)
#define LogDebug(id)

◆ fillHCal()

void GlobalDigisAnalyzer::fillHCal ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 823 of file GlobalDigisAnalyzer.cc.

References HcalCoderDb::adc2fC(), AlignmentProducer_cff::calibrations, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getHandle(), photonIsolationHIProducer_cfi::hbhe, HBHEDigi_Token_, hcaldbToken_, HCalSrc_Token_, photonIsolationHIProducer_cfi::hf, HFDigi_Token_, photonIsolationHIProducer_cfi::ho, HODigi_Token_, iEvent, cuy::ii, edm::HandleBase::isValid(), LogDebug, mehHcalAEE, mehHcalAEESHE, mehHcaln, mehHcalSHE, mehHcalSHEvAEE, edm::Handle< T >::product(), DetId::rawId(), sdHcalBrl, sdHcalEC, sdHcalFwd, sdHcalOut, HLTBitAnalyser_cfi::simhits, CaloSamples::size(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by analyze().

823  {
824  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillHCal";
825 
826  TString eventout;
827  if (verbosity > 0)
828  eventout = "\nGathering info:";
829 
830  // get calibration info
831  const auto &HCalconditions = iSetup.getHandle(hcaldbToken_);
832  if (!HCalconditions.isValid()) {
833  edm::LogWarning(MsgLoggerCat) << "Unable to find HCalconditions in event!";
834  return;
835  }
836  // HcalCalibrations calibrations;
837  CaloSamples tool;
838 
840  // extract simhit info
843  iEvent.getByToken(HCalSrc_Token_, hcalHits);
844  bool validhcalHits = true;
845  if (!hcalHits.isValid()) {
846  LogDebug(MsgLoggerCat) << "Unable to find hcalHits in event!";
847  validhcalHits = false;
848  }
849  MapType fHBEnergySimHits;
850  MapType fHEEnergySimHits;
851  MapType fHOEnergySimHits;
852  MapType fHFEnergySimHits;
853  if (validhcalHits) {
854  const edm::PCaloHitContainer *simhitResult = hcalHits.product();
855 
856  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end();
857  ++simhits) {
858  HcalDetId detId(simhits->id());
859  uint32_t cellid = detId.rawId();
860 
861  if (detId.subdet() == sdHcalBrl) {
862  fHBEnergySimHits[cellid] += simhits->energy();
863  }
864  if (detId.subdet() == sdHcalEC) {
865  fHEEnergySimHits[cellid] += simhits->energy();
866  }
867  if (detId.subdet() == sdHcalOut) {
868  fHOEnergySimHits[cellid] += simhits->energy();
869  }
870  if (detId.subdet() == sdHcalFwd) {
871  fHFEnergySimHits[cellid] += simhits->energy();
872  }
873  }
874  }
875 
877  // get HBHE information
880  iEvent.getByToken(HBHEDigi_Token_, hbhe);
881  bool validHBHE = true;
882  if (!hbhe.isValid()) {
883  LogDebug(MsgLoggerCat) << "Unable to find HBHEDataFrame in event!";
884  validHBHE = false;
885  }
886 
887  if (validHBHE) {
889 
890  int iHB = 0;
891  int iHE = 0;
892  for (ihbhe = hbhe->begin(); ihbhe != hbhe->end(); ++ihbhe) {
893  HcalDetId cell(ihbhe->id());
894 
895  if ((cell.subdet() == sdHcalBrl) || (cell.subdet() == sdHcalEC)) {
896  // HCalconditions->makeHcalCalibration(cell, &calibrations);
897  const HcalCalibrations &calibrations = HCalconditions->getHcalCalibrations(cell);
898  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
899  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
900  HcalCoderDb coder(*channelCoder, *shape);
901  coder.adc2fC(*ihbhe, tool);
902 
903  // get HB info
904  if (cell.subdet() == sdHcalBrl) {
905  ++iHB;
906  float fDigiSum = 0.0;
907  for (int ii = 0; ii < tool.size(); ++ii) {
908  // default ped is 4.5
909  int capid = (*ihbhe)[ii].capid();
910  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
911  }
912 
913  mehHcalSHE[0]->Fill(fHFEnergySimHits[cell.rawId()]);
914  mehHcalAEE[0]->Fill(fDigiSum);
915  // Adding protection against FPE
916  if (fHFEnergySimHits[cell.rawId()] != 0) {
917  mehHcalAEESHE[0]->Fill(fDigiSum / fHFEnergySimHits[cell.rawId()]);
918  }
919  // else {
920  // std::cout<<"It would have been an FPE! with
921  // fHFEnergySimHits[cell.rawId()]==0!\n";
922  //}
923  mehHcalSHEvAEE[0]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
924  }
925 
926  // get HE info
927  if (cell.subdet() == sdHcalEC) {
928  ++iHE;
929  float fDigiSum = 0.0;
930  for (int ii = 0; ii < tool.size(); ++ii) {
931  int capid = (*ihbhe)[ii].capid();
932  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
933  }
934 
935  mehHcalSHE[1]->Fill(fHFEnergySimHits[cell.rawId()]);
936  mehHcalAEE[1]->Fill(fDigiSum);
937  // Adding protection against FPE
938  if (fHFEnergySimHits[cell.rawId()] != 0) {
939  mehHcalAEESHE[1]->Fill(fDigiSum / fHFEnergySimHits[cell.rawId()]);
940  }
941  // else{
942  // std::cout<<"It would have been an FPE! with
943  // fHFEnergySimHits[cell.rawId()]==0!\n";
944  //}
945  mehHcalSHEvAEE[1]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
946  }
947  }
948  }
949 
950  if (verbosity > 1) {
951  eventout += "\n Number of HBDigis collected:.............. ";
952  eventout += iHB;
953  }
954  mehHcaln[0]->Fill((float)iHB);
955 
956  if (verbosity > 1) {
957  eventout += "\n Number of HEDigis collected:.............. ";
958  eventout += iHE;
959  }
960  mehHcaln[1]->Fill((float)iHE);
961  }
962 
964  // get HO information
967  iEvent.getByToken(HODigi_Token_, ho);
968  bool validHO = true;
969  if (!ho.isValid()) {
970  LogDebug(MsgLoggerCat) << "Unable to find HODataFrame in event!";
971  validHO = false;
972  }
973  if (validHO) {
975 
976  int iHO = 0;
977  for (iho = ho->begin(); iho != ho->end(); ++iho) {
978  HcalDetId cell(iho->id());
979 
980  if (cell.subdet() == sdHcalOut) {
981  // HCalconditions->makeHcalCalibration(cell, &calibrations);
982  const HcalCalibrations &calibrations = HCalconditions->getHcalCalibrations(cell);
983  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
984  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
985  HcalCoderDb coder(*channelCoder, *shape);
986  coder.adc2fC(*iho, tool);
987 
988  ++iHO;
989  float fDigiSum = 0.0;
990  for (int ii = 0; ii < tool.size(); ++ii) {
991  // default ped is 4.5
992  int capid = (*iho)[ii].capid();
993  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
994  }
995 
996  mehHcalSHE[2]->Fill(fHFEnergySimHits[cell.rawId()]);
997  mehHcalAEE[2]->Fill(fDigiSum);
998  // Adding protection against FPE
999  if (fHFEnergySimHits[cell.rawId()] != 0) {
1000  mehHcalAEESHE[2]->Fill(fDigiSum / fHFEnergySimHits[cell.rawId()]);
1001  }
1002  // else{
1003  // std::cout<<"It would have been an FPE! with
1004  // fHFEnergySimHits[cell.rawId()]==0!\n";
1005  //}
1006  mehHcalSHEvAEE[2]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1007  }
1008  }
1009 
1010  if (verbosity > 1) {
1011  eventout += "\n Number of HODigis collected:.............. ";
1012  eventout += iHO;
1013  }
1014  mehHcaln[2]->Fill((float)iHO);
1015  }
1016 
1018  // get HF information
1021  iEvent.getByToken(HFDigi_Token_, hf);
1022  bool validHF = true;
1023  if (!hf.isValid()) {
1024  LogDebug(MsgLoggerCat) << "Unable to find HFDataFrame in event!";
1025  validHF = false;
1026  }
1027  if (validHF) {
1029 
1030  int iHF = 0;
1031  for (ihf = hf->begin(); ihf != hf->end(); ++ihf) {
1032  HcalDetId cell(ihf->id());
1033 
1034  if (cell.subdet() == sdHcalFwd) {
1035  // HCalconditions->makeHcalCalibration(cell, &calibrations);
1036  const HcalCalibrations &calibrations = HCalconditions->getHcalCalibrations(cell);
1037  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1038  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1039  HcalCoderDb coder(*channelCoder, *shape);
1040  coder.adc2fC(*ihf, tool);
1041 
1042  ++iHF;
1043  float fDigiSum = 0.0;
1044  for (int ii = 0; ii < tool.size(); ++ii) {
1045  // default ped is 1.73077
1046  int capid = (*ihf)[ii].capid();
1047  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1048  }
1049 
1050  mehHcalSHE[3]->Fill(fHFEnergySimHits[cell.rawId()]);
1051  mehHcalAEE[3]->Fill(fDigiSum);
1052  // Adding protection against FPE
1053  if (fHFEnergySimHits[cell.rawId()] != 0) {
1054  mehHcalAEESHE[3]->Fill(fDigiSum / fHFEnergySimHits[cell.rawId()]);
1055  }
1056  // else{
1057  // std::cout<<"It would have been an FPE! with
1058  // fHFEnergySimHits[cell.rawId()]==0!\n";
1059  //}
1060  mehHcalSHEvAEE[3]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1061  }
1062  }
1063 
1064  if (verbosity > 1) {
1065  eventout += "\n Number of HFDigis collected:.............. ";
1066  eventout += iHF;
1067  }
1068  mehHcaln[3]->Fill((float)iHF);
1069  }
1070 
1071  if (verbosity > 0)
1072  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1073 
1074  return;
1075 }
edm::ESGetToken< HcalDbService, HcalDbRecord > hcaldbToken_
std::vector< PCaloHit > PCaloHitContainer
int size() const
get the size
Definition: CaloSamples.h:24
static const int sdHcalOut
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
T const * product() const
Definition: Handle.h:70
std::vector< T >::const_iterator const_iterator
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > HFDigi_Token_
MonitorElement * mehHcalAEE[4]
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > HODigi_Token_
ii
Definition: cuy.py:589
std::map< uint32_t, float, std::less< uint32_t > > MapType
Log< level::Info, false > LogInfo
MonitorElement * mehHcalSHEvAEE[4]
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
static const int sdHcalFwd
static const int sdHcalBrl
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * mehHcaln[4]
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > HBHEDigi_Token_
MonitorElement * mehHcalAEESHE[4]
MonitorElement * mehHcalSHE[4]
Log< level::Warning, false > LogWarning
static const int sdHcalEC
#define LogDebug(id)

◆ fillMuon()

void GlobalDigisAnalyzer::fillMuon ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 1322 of file GlobalDigisAnalyzer.cc.

References RPCRoll::centreOfStrip(), dqm::impl::MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::getHandle(), iEvent, edm::HandleBase::isValid(), dqmiolumiharvest::j, dqmdumpme::last, phase1PixelTopology::layer, LogDebug, mehCSCStripADC, mehCSCStripn, mehCSCWiren, mehCSCWireTime, mehDtMuonLayer, mehDtMuonn, mehDtMuonTime, mehDtMuonTimevLayer, mehRPCMuonn, mehRPCRes, MuCSCStripSrc_Token_, MuCSCWireSrc_Token_, MuDTSrc_Token_, MuRPCSrc_Token_, me0TriggerPseudoDigis_cff::nStrips, EcalCondDBWriter_cfi::pedestal, OfflineHarvestingSequence_cosmic::ptype, FastTimerService_cff::range, RPCDetId::region(), RPCDetId::ring(), rpcGeomToken_, RPCSimHit_Token_, AlCaHLTBitMon_QueryRunRegistry::string, DigiDM_cff::strips, theCSCStripPedestalCount, theCSCStripPedestalSum, verbosity, DigiDM_cff::wires, and x.

Referenced by analyze().

1322  {
1323  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillMuon";
1324 
1325  TString eventout;
1326  if (verbosity > 0)
1327  eventout = "\nGathering info:";
1328 
1329  // get DT information
1331  iEvent.getByToken(MuDTSrc_Token_, dtDigis);
1332  bool validdtDigis = true;
1333  if (!dtDigis.isValid()) {
1334  LogDebug(MsgLoggerCat) << "Unable to find dtDigis in event!";
1335  validdtDigis = false;
1336  }
1337  if (validdtDigis) {
1338  int nDt0 = 0;
1339  int nDt1 = 0;
1340  int nDt2 = 0;
1341  int nDt3 = 0;
1342  int nDt = 0;
1344  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end(); ++detUnitIt) {
1345  const DTLayerId &id = (*detUnitIt).first;
1346  const DTDigiCollection::Range &range = (*detUnitIt).second;
1347  for (DTDigiCollection::const_iterator digiIt = range.first; digiIt != range.second; ++digiIt) {
1348  ++nDt;
1349 
1350  DTWireId wireId(id, (*digiIt).wire());
1351  if (wireId.station() == 1) {
1352  mehDtMuonLayer[0]->Fill(id.layer());
1353  mehDtMuonTime[0]->Fill((*digiIt).time());
1354  mehDtMuonTimevLayer[0]->Fill(id.layer(), (*digiIt).time());
1355  ++nDt0;
1356  }
1357  if (wireId.station() == 2) {
1358  mehDtMuonLayer[1]->Fill(id.layer());
1359  mehDtMuonTime[1]->Fill((*digiIt).time());
1360  mehDtMuonTimevLayer[1]->Fill(id.layer(), (*digiIt).time());
1361  ++nDt1;
1362  }
1363  if (wireId.station() == 3) {
1364  mehDtMuonLayer[2]->Fill(id.layer());
1365  mehDtMuonTime[2]->Fill((*digiIt).time());
1366  mehDtMuonTimevLayer[2]->Fill(id.layer(), (*digiIt).time());
1367  ++nDt2;
1368  }
1369  if (wireId.station() == 4) {
1370  mehDtMuonLayer[3]->Fill(id.layer());
1371  mehDtMuonTime[3]->Fill((*digiIt).time());
1372  mehDtMuonTimevLayer[3]->Fill(id.layer(), (*digiIt).time());
1373  ++nDt3;
1374  }
1375  }
1376  }
1377  mehDtMuonn[0]->Fill((float)nDt0);
1378  mehDtMuonn[1]->Fill((float)nDt1);
1379  mehDtMuonn[2]->Fill((float)nDt2);
1380  mehDtMuonn[3]->Fill((float)nDt3);
1381 
1382  if (verbosity > 1) {
1383  eventout += "\n Number of DtMuonDigis collected:.......... ";
1384  eventout += nDt;
1385  }
1386  }
1387 
1388  // get CSC Strip information
1390  iEvent.getByToken(MuCSCStripSrc_Token_, strips);
1391  bool validstrips = true;
1392  if (!strips.isValid()) {
1393  LogDebug(MsgLoggerCat) << "Unable to find muon strips in event!";
1394  validstrips = false;
1395  }
1396 
1397  if (validstrips) {
1398  int nStrips = 0;
1399  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin(); j != strips->end(); ++j) {
1400  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
1401  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
1402 
1403  for (; digiItr != last; ++digiItr) {
1404  ++nStrips;
1405 
1406  // average pedestals
1407  std::vector<int> adcCounts = digiItr->getADCCounts();
1408  theCSCStripPedestalSum += adcCounts[0];
1409  theCSCStripPedestalSum += adcCounts[1];
1411 
1412  // if there are enough pedestal statistics
1413  if (theCSCStripPedestalCount > 100) {
1415  if (adcCounts[5] > (pedestal + 100))
1416  mehCSCStripADC->Fill(adcCounts[4] - pedestal);
1417  }
1418  }
1419  }
1420 
1421  if (verbosity > 1) {
1422  eventout += "\n Number of CSCStripDigis collected:........ ";
1423  eventout += nStrips;
1424  }
1425  mehCSCStripn->Fill((float)nStrips);
1426  }
1427 
1428  // get CSC Wire information
1430  iEvent.getByToken(MuCSCWireSrc_Token_, wires);
1431  bool validwires = true;
1432  if (!wires.isValid()) {
1433  LogDebug(MsgLoggerCat) << "Unable to find muon wires in event!";
1434  validwires = false;
1435  }
1436 
1437  if (validwires) {
1438  int nWires = 0;
1439  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin(); j != wires->end(); ++j) {
1440  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
1441  std::vector<CSCWireDigi>::const_iterator endDigi = (*j).second.second;
1442 
1443  for (; digiItr != endDigi; ++digiItr) {
1444  ++nWires;
1445  mehCSCWireTime->Fill(digiItr->getTimeBin());
1446  }
1447  }
1448 
1449  if (verbosity > 1) {
1450  eventout += "\n Number of CSCWireDigis collected:......... ";
1451  eventout += nWires;
1452  }
1453  mehCSCWiren->Fill((float)nWires);
1454  }
1455 
1456  // get RPC information
1457  // Get the RPC Geometry
1458  const auto &rpcGeom = iSetup.getHandle(rpcGeomToken_);
1459  if (!rpcGeom.isValid()) {
1460  edm::LogWarning(MsgLoggerCat) << "Unable to find RPCGeometryRecord in event!";
1461  return;
1462  }
1463 
1465  iEvent.getByToken(RPCSimHit_Token_, rpcsimHit);
1466  bool validrpcsim = true;
1467  if (!rpcsimHit.isValid()) {
1468  LogDebug(MsgLoggerCat) << "Unable to find rpcsimHit in event!";
1469  validrpcsim = false;
1470  }
1471 
1473  iEvent.getByToken(MuRPCSrc_Token_, rpcDigis);
1474  bool validrpcdigi = true;
1475  if (!rpcDigis.isValid()) {
1476  LogDebug(MsgLoggerCat) << "Unable to find rpcDigis in event!";
1477  validrpcdigi = false;
1478  }
1479 
1480  // ONLY UNTIL PROBLEM WITH RPC DIGIS IS FIGURED OUT
1481  validrpcdigi = false;
1482 
1483  // Loop on simhits
1484  edm::PSimHitContainer::const_iterator rpcsimIt;
1485  std::map<RPCDetId, std::vector<double>> allsims;
1486 
1487  if (validrpcsim) {
1488  for (rpcsimIt = rpcsimHit->begin(); rpcsimIt != rpcsimHit->end(); rpcsimIt++) {
1489  RPCDetId Rsid = (RPCDetId)(*rpcsimIt).detUnitId();
1490  int ptype = rpcsimIt->particleType();
1491 
1492  if (ptype == 13 || ptype == -13) {
1493  std::vector<double> buff;
1494  if (allsims.find(Rsid) != allsims.end()) {
1495  buff = allsims[Rsid];
1496  }
1497  buff.push_back(rpcsimIt->localPosition().x());
1498  allsims[Rsid] = buff;
1499  }
1500  }
1501  }
1502 
1503  // CRASH HAPPENS SOMEWHERE HERE IN FOR DECLARATION
1504  // WHAT IS WRONG WITH rpcDigis?????
1505  if (validrpcdigi) {
1506  int nRPC = 0;
1508  for (rpcdetUnitIt = rpcDigis->begin(); rpcdetUnitIt != rpcDigis->end(); ++rpcdetUnitIt) {
1509  const RPCDetId Rsid = (*rpcdetUnitIt).first;
1510  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(Rsid));
1511  const RPCDigiCollection::Range &range = (*rpcdetUnitIt).second;
1512 
1513  std::vector<double> sims;
1514  if (allsims.find(Rsid) != allsims.end()) {
1515  sims = allsims[Rsid];
1516  }
1517 
1518  int ndigi = 0;
1519  for (RPCDigiCollection::const_iterator rpcdigiIt = range.first; rpcdigiIt != range.second; ++rpcdigiIt) {
1520  ++ndigi;
1521  ++nRPC;
1522  }
1523 
1524  if (sims.size() == 1 && ndigi == 1) {
1525  double dis = roll->centreOfStrip(range.first->strip()).x() - sims[0];
1526 
1527  if (Rsid.region() == 0) {
1528  if (Rsid.ring() == -2)
1529  mehRPCRes[0]->Fill((float)dis);
1530  else if (Rsid.ring() == -1)
1531  mehRPCRes[1]->Fill((float)dis);
1532  else if (Rsid.ring() == 0)
1533  mehRPCRes[2]->Fill((float)dis);
1534  else if (Rsid.ring() == 1)
1535  mehRPCRes[3]->Fill((float)dis);
1536  else if (Rsid.ring() == 2)
1537  mehRPCRes[4]->Fill((float)dis);
1538  }
1539  }
1540  }
1541 
1542  if (verbosity > 1) {
1543  eventout += "\n Number of RPCDigis collected:.............. ";
1544  eventout += nRPC;
1545  }
1546  mehRPCMuonn->Fill(float(nRPC));
1547  }
1548 
1549  if (verbosity > 0)
1550  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1551 
1552  return;
1553 }
MonitorElement * mehDtMuonLayer[4]
MonitorElement * mehRPCRes[5]
int ring() const
Definition: RPCDetId.h:59
edm::EDGetTokenT< CSCStripDigiCollection > MuCSCStripSrc_Token_
MonitorElement * mehDtMuonTimevLayer[4]
MonitorElement * mehCSCWireTime
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
constexpr std::array< uint8_t, layerIndexSize > layer
void Fill(long long x)
edm::EDGetTokenT< edm::PSimHitContainer > RPCSimHit_Token_
MonitorElement * mehDtMuonTime[4]
int iEvent
Definition: GenABIO.cc:224
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::EDGetTokenT< CSCWireDigiCollection > MuCSCWireSrc_Token_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
MonitorElement * mehRPCMuonn
Log< level::Info, false > LogInfo
MonitorElement * mehCSCStripn
MonitorElement * mehCSCStripADC
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
bool isValid() const
Definition: HandleBase.h:70
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
MonitorElement * mehCSCWiren
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
Definition: DigiDM_cff.py:32
edm::EDGetTokenT< RPCDigiCollection > MuRPCSrc_Token_
Log< level::Warning, false > LogWarning
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
edm::EDGetTokenT< DTDigiCollection > MuDTSrc_Token_
MonitorElement * mehDtMuonn[4]
#define LogDebug(id)
LocalPoint centreOfStrip(int strip) const
Definition: RPCRoll.cc:26

◆ fillTrk()

void GlobalDigisAnalyzer::fillTrk ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 1077 of file GlobalDigisAnalyzer.cc.

References edm::DetSetVector< T >::begin(), edm::DetSetVector< T >::end(), mps_fire::end, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getData(), mps_fire::i, iEvent, edm::HandleBase::isValid(), LogDebug, mehSiPixelADC, mehSiPixelCol, mehSiPixeln, mehSiPixelRow, mehSiStripADC, mehSiStripn, mehSiStripStrip, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), sdPxlBrl, sdPxlFwd, sdSiTEC, sdSiTIB, sdSiTID, sdSiTOB, SiPxlSrc_Token_, SiStripSrc_Token_, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), TrackerTopology::tecWheel(), TrackerTopology::tibLayer(), TrackerTopology::tidWheel(), TrackerTopology::tobLayer(), tTopoToken_, and verbosity.

Referenced by analyze().

1077  {
1078  // Retrieve tracker topology from geometry
1079  const TrackerTopology *const tTopo = &iSetup.getData(tTopoToken_);
1080  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillTrk";
1081  TString eventout;
1082  if (verbosity > 0)
1083  eventout = "\nGathering info:";
1084 
1085  // get strip information
1087  iEvent.getByToken(SiStripSrc_Token_, stripDigis);
1088  bool validstripDigis = true;
1089  if (!stripDigis.isValid()) {
1090  LogDebug(MsgLoggerCat) << "Unable to find stripDigis in event!";
1091  validstripDigis = false;
1092  }
1093 
1094  if (validstripDigis) {
1095  int nStripBrl = 0, nStripFwd = 0;
1097  for (DSViter = stripDigis->begin(); DSViter != stripDigis->end(); ++DSViter) {
1098  unsigned int id = DSViter->id;
1099  DetId detId(id);
1100  edm::DetSet<SiStripDigi>::const_iterator begin = DSViter->data.begin();
1103 
1104  // get TIB
1105  if (detId.subdetId() == sdSiTIB) {
1106  for (iter = begin; iter != end; ++iter) {
1107  ++nStripBrl;
1108  if (tTopo->tibLayer(id) == 1) {
1109  mehSiStripADC[0]->Fill((*iter).adc());
1110  mehSiStripStrip[0]->Fill((*iter).strip());
1111  }
1112  if (tTopo->tibLayer(id) == 2) {
1113  mehSiStripADC[1]->Fill((*iter).adc());
1114  mehSiStripStrip[1]->Fill((*iter).strip());
1115  }
1116  if (tTopo->tibLayer(id) == 3) {
1117  mehSiStripADC[2]->Fill((*iter).adc());
1118  mehSiStripStrip[2]->Fill((*iter).strip());
1119  }
1120  if (tTopo->tibLayer(id) == 4) {
1121  mehSiStripADC[3]->Fill((*iter).adc());
1122  mehSiStripStrip[3]->Fill((*iter).strip());
1123  }
1124  }
1125  }
1126 
1127  // get TOB
1128  if (detId.subdetId() == sdSiTOB) {
1129  for (iter = begin; iter != end; ++iter) {
1130  ++nStripBrl;
1131  if (tTopo->tobLayer(id) == 1) {
1132  mehSiStripADC[4]->Fill((*iter).adc());
1133  mehSiStripStrip[4]->Fill((*iter).strip());
1134  }
1135  if (tTopo->tobLayer(id) == 2) {
1136  mehSiStripADC[5]->Fill((*iter).adc());
1137  mehSiStripStrip[5]->Fill((*iter).strip());
1138  }
1139  if (tTopo->tobLayer(id) == 3) {
1140  mehSiStripADC[6]->Fill((*iter).adc());
1141  mehSiStripStrip[6]->Fill((*iter).strip());
1142  }
1143  if (tTopo->tobLayer(id) == 4) {
1144  mehSiStripADC[7]->Fill((*iter).adc());
1145  mehSiStripStrip[7]->Fill((*iter).strip());
1146  }
1147  }
1148  }
1149 
1150  // get TID
1151  if (detId.subdetId() == sdSiTID) {
1152  for (iter = begin; iter != end; ++iter) {
1153  ++nStripFwd;
1154  if (tTopo->tidWheel(id) == 1) {
1155  mehSiStripADC[8]->Fill((*iter).adc());
1156  mehSiStripStrip[8]->Fill((*iter).strip());
1157  }
1158  if (tTopo->tidWheel(id) == 2) {
1159  mehSiStripADC[9]->Fill((*iter).adc());
1160  mehSiStripStrip[9]->Fill((*iter).strip());
1161  }
1162  if (tTopo->tidWheel(id) == 3) {
1163  mehSiStripADC[10]->Fill((*iter).adc());
1164  mehSiStripStrip[10]->Fill((*iter).strip());
1165  }
1166  }
1167  }
1168 
1169  // get TEC
1170  if (detId.subdetId() == sdSiTEC) {
1171  for (iter = begin; iter != end; ++iter) {
1172  ++nStripFwd;
1173  if (tTopo->tecWheel(id) == 1) {
1174  mehSiStripADC[11]->Fill((*iter).adc());
1175  mehSiStripStrip[11]->Fill((*iter).strip());
1176  }
1177  if (tTopo->tecWheel(id) == 2) {
1178  mehSiStripADC[12]->Fill((*iter).adc());
1179  mehSiStripStrip[12]->Fill((*iter).strip());
1180  }
1181  if (tTopo->tecWheel(id) == 3) {
1182  mehSiStripADC[13]->Fill((*iter).adc());
1183  mehSiStripStrip[13]->Fill((*iter).strip());
1184  }
1185  if (tTopo->tecWheel(id) == 4) {
1186  mehSiStripADC[14]->Fill((*iter).adc());
1187  mehSiStripStrip[14]->Fill((*iter).strip());
1188  }
1189  if (tTopo->tecWheel(id) == 5) {
1190  mehSiStripADC[15]->Fill((*iter).adc());
1191  mehSiStripStrip[15]->Fill((*iter).strip());
1192  }
1193  if (tTopo->tecWheel(id) == 6) {
1194  mehSiStripADC[16]->Fill((*iter).adc());
1195  mehSiStripStrip[16]->Fill((*iter).strip());
1196  }
1197  if (tTopo->tecWheel(id) == 7) {
1198  mehSiStripADC[17]->Fill((*iter).adc());
1199  mehSiStripStrip[17]->Fill((*iter).strip());
1200  }
1201  if (tTopo->tecWheel(id) == 8) {
1202  mehSiStripADC[18]->Fill((*iter).adc());
1203  mehSiStripStrip[18]->Fill((*iter).strip());
1204  }
1205  }
1206  }
1207  } // end loop over DataSetVector
1208 
1209  if (verbosity > 1) {
1210  eventout += "\n Number of BrlStripDigis collected:........ ";
1211  eventout += nStripBrl;
1212  }
1213  for (int i = 0; i < 8; ++i) {
1214  mehSiStripn[i]->Fill((float)nStripBrl);
1215  }
1216 
1217  if (verbosity > 1) {
1218  eventout += "\n Number of FrwdStripDigis collected:....... ";
1219  eventout += nStripFwd;
1220  }
1221  for (int i = 8; i < 19; ++i) {
1222  mehSiStripn[i]->Fill((float)nStripFwd);
1223  }
1224  }
1225 
1226  // get pixel information
1228  iEvent.getByToken(SiPxlSrc_Token_, pixelDigis);
1229  bool validpixelDigis = true;
1230  if (!pixelDigis.isValid()) {
1231  LogDebug(MsgLoggerCat) << "Unable to find pixelDigis in event!";
1232  validpixelDigis = false;
1233  }
1234  if (validpixelDigis) {
1235  int nPxlBrl = 0, nPxlFwd = 0;
1237  for (DPViter = pixelDigis->begin(); DPViter != pixelDigis->end(); ++DPViter) {
1238  unsigned int id = DPViter->id;
1239  DetId detId(id);
1240  edm::DetSet<PixelDigi>::const_iterator begin = DPViter->data.begin();
1243 
1244  // get Barrel pixels
1245  if (detId.subdetId() == sdPxlBrl) {
1246  for (iter = begin; iter != end; ++iter) {
1247  ++nPxlBrl;
1248  if (tTopo->pxbLayer(id) == 1) {
1249  mehSiPixelADC[0]->Fill((*iter).adc());
1250  mehSiPixelRow[0]->Fill((*iter).row());
1251  mehSiPixelCol[0]->Fill((*iter).column());
1252  }
1253  if (tTopo->pxbLayer(id) == 2) {
1254  mehSiPixelADC[1]->Fill((*iter).adc());
1255  mehSiPixelRow[1]->Fill((*iter).row());
1256  mehSiPixelCol[1]->Fill((*iter).column());
1257  }
1258  if (tTopo->pxbLayer(id) == 3) {
1259  mehSiPixelADC[2]->Fill((*iter).adc());
1260  mehSiPixelRow[2]->Fill((*iter).row());
1261  mehSiPixelCol[2]->Fill((*iter).column());
1262  }
1263  }
1264  }
1265 
1266  // get Forward pixels
1267  if (detId.subdetId() == sdPxlFwd) {
1268  for (iter = begin; iter != end; ++iter) {
1269  ++nPxlFwd;
1270  if (tTopo->pxfDisk(id) == 1) {
1271  if (tTopo->pxfSide(id) == 1) {
1272  mehSiPixelADC[4]->Fill((*iter).adc());
1273  mehSiPixelRow[4]->Fill((*iter).row());
1274  mehSiPixelCol[4]->Fill((*iter).column());
1275  }
1276  if (tTopo->pxfSide(id) == 2) {
1277  mehSiPixelADC[3]->Fill((*iter).adc());
1278  mehSiPixelRow[3]->Fill((*iter).row());
1279  mehSiPixelCol[3]->Fill((*iter).column());
1280  }
1281  }
1282  if (tTopo->pxfDisk(id) == 2) {
1283  if (tTopo->pxfSide(id) == 1) {
1284  mehSiPixelADC[6]->Fill((*iter).adc());
1285  mehSiPixelRow[6]->Fill((*iter).row());
1286  mehSiPixelCol[6]->Fill((*iter).column());
1287  }
1288  if (tTopo->pxfSide(id) == 2) {
1289  mehSiPixelADC[5]->Fill((*iter).adc());
1290  mehSiPixelRow[5]->Fill((*iter).row());
1291  mehSiPixelCol[5]->Fill((*iter).column());
1292  }
1293  }
1294  }
1295  }
1296  }
1297 
1298  if (verbosity > 1) {
1299  eventout += "\n Number of BrlPixelDigis collected:........ ";
1300  eventout += nPxlBrl;
1301  }
1302  for (int i = 0; i < 3; ++i) {
1303  mehSiPixeln[i]->Fill((float)nPxlBrl);
1304  }
1305 
1306  if (verbosity > 1) {
1307  eventout += "\n Number of FrwdPixelDigis collected:....... ";
1308  eventout += nPxlFwd;
1309  }
1310 
1311  for (int i = 3; i < 7; ++i) {
1312  mehSiPixeln[i]->Fill((float)nPxlFwd);
1313  }
1314  }
1315 
1316  if (verbosity > 0)
1317  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1318 
1319  return;
1320 }
unsigned int tobLayer(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
unsigned int tidWheel(const DetId &id) const
static const int sdSiTID
unsigned int tecWheel(const DetId &id) const
MonitorElement * mehSiPixelRow[7]
MonitorElement * mehSiStripADC[19]
MonitorElement * mehSiStripn[19]
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
static const int sdSiTIB
static const int sdPxlBrl
unsigned int pxfDisk(const DetId &id) const
static const int sdSiTOB
bool getData(T &iHolder) const
Definition: EventSetup.h:122
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripSrc_Token_
Log< level::Info, false > LogInfo
Definition: DetId.h:17
unsigned int pxfSide(const DetId &id) const
MonitorElement * mehSiPixelCol[7]
bool isValid() const
Definition: HandleBase.h:70
static const int sdSiTEC
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
unsigned int tibLayer(const DetId &id) const
static const int sdPxlFwd
MonitorElement * mehSiPixeln[7]
MonitorElement * mehSiStripStrip[19]
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > SiPxlSrc_Token_
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
MonitorElement * mehSiPixelADC[7]
#define LogDebug(id)

Member Data Documentation

◆ count

unsigned int GlobalDigisAnalyzer::count
private

Definition at line 245 of file GlobalDigisAnalyzer.h.

Referenced by analyze().

◆ EBHits_Token_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > GlobalDigisAnalyzer::EBHits_Token_
private

Definition at line 239 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

◆ ecalADCtoGevToken_

edm::ESGetToken<EcalADCToGeVConstant, EcalADCToGeVConstantRcd> GlobalDigisAnalyzer::ecalADCtoGevToken_
private

Definition at line 158 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

◆ ECalbarrelADCtoGeV_

double GlobalDigisAnalyzer::ECalbarrelADCtoGeV_
private

Definition at line 164 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), fillECal(), and GlobalDigisAnalyzer().

◆ ECalEBSrc_

edm::InputTag GlobalDigisAnalyzer::ECalEBSrc_
private

Definition at line 155 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ ECalEBSrc_Token_

edm::EDGetTokenT<EBDigiCollection> GlobalDigisAnalyzer::ECalEBSrc_Token_
private

Definition at line 226 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

◆ ECalEESrc_

edm::InputTag GlobalDigisAnalyzer::ECalEESrc_
private

Definition at line 156 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ ECalEESrc_Token_

edm::EDGetTokenT<EEDigiCollection> GlobalDigisAnalyzer::ECalEESrc_Token_
private

Definition at line 227 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

◆ ECalendcapADCtoGeV_

double GlobalDigisAnalyzer::ECalendcapADCtoGeV_
private

Definition at line 165 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

◆ ECalESSrc_

edm::InputTag GlobalDigisAnalyzer::ECalESSrc_
private

Definition at line 157 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ ECalESSrc_Token_

edm::EDGetTokenT<ESDigiCollection> GlobalDigisAnalyzer::ECalESSrc_Token_
private

Definition at line 228 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

◆ ECalgainConv_

std::map<int, double, std::less<int> > GlobalDigisAnalyzer::ECalgainConv_
private

Definition at line 163 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

◆ EEHits_Token_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > GlobalDigisAnalyzer::EEHits_Token_
private

Definition at line 240 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

◆ ESHits_Token_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > GlobalDigisAnalyzer::ESHits_Token_
private

Definition at line 241 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

◆ fName

std::string GlobalDigisAnalyzer::fName
private

Definition at line 135 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ frequency

int GlobalDigisAnalyzer::frequency
private

Definition at line 137 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

◆ getAllProvenances

bool GlobalDigisAnalyzer::getAllProvenances
private

Definition at line 139 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

◆ HBHEDigi_Token_

edm::EDGetTokenT<edm::SortedCollection<HBHEDataFrame> > GlobalDigisAnalyzer::HBHEDigi_Token_
private

Definition at line 230 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

◆ hcaldbToken_

edm::ESGetToken<HcalDbService, HcalDbRecord> GlobalDigisAnalyzer::hcaldbToken_
private

Definition at line 161 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

◆ HCalDigi_

edm::InputTag GlobalDigisAnalyzer::HCalDigi_
private

Definition at line 176 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ HCalSrc_

edm::InputTag GlobalDigisAnalyzer::HCalSrc_
private

Definition at line 175 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ HCalSrc_Token_

edm::EDGetTokenT<edm::PCaloHitContainer> GlobalDigisAnalyzer::HCalSrc_Token_
private

Definition at line 229 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

◆ HFDigi_Token_

edm::EDGetTokenT<edm::SortedCollection<HFDataFrame> > GlobalDigisAnalyzer::HFDigi_Token_
private

Definition at line 232 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

◆ hitsProducer

std::string GlobalDigisAnalyzer::hitsProducer
private

Definition at line 141 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ HODigi_Token_

edm::EDGetTokenT<edm::SortedCollection<HODataFrame> > GlobalDigisAnalyzer::HODigi_Token_
private

Definition at line 231 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

◆ label

std::string GlobalDigisAnalyzer::label
private

Definition at line 138 of file GlobalDigisAnalyzer.h.

◆ mehCSCStripADC

MonitorElement* GlobalDigisAnalyzer::mehCSCStripADC
private

Definition at line 209 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehCSCStripn

MonitorElement* GlobalDigisAnalyzer::mehCSCStripn
private

Definition at line 208 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehCSCWiren

MonitorElement* GlobalDigisAnalyzer::mehCSCWiren
private

Definition at line 210 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehCSCWireTime

MonitorElement* GlobalDigisAnalyzer::mehCSCWireTime
private

Definition at line 211 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehDtMuonLayer

MonitorElement* GlobalDigisAnalyzer::mehDtMuonLayer[4]
private

Definition at line 200 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehDtMuonn

MonitorElement* GlobalDigisAnalyzer::mehDtMuonn[4]
private

Definition at line 199 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehDtMuonTime

MonitorElement* GlobalDigisAnalyzer::mehDtMuonTime[4]
private

Definition at line 201 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehDtMuonTimevLayer

MonitorElement* GlobalDigisAnalyzer::mehDtMuonTimevLayer[4]
private

Definition at line 202 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehEcalAEE

MonitorElement* GlobalDigisAnalyzer::mehEcalAEE[2]
private

Definition at line 148 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEcalMaxPos

MonitorElement* GlobalDigisAnalyzer::mehEcalMaxPos[2]
private

Definition at line 150 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEcalMultvAEE

MonitorElement* GlobalDigisAnalyzer::mehEcalMultvAEE[2]
private

Definition at line 151 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEcaln

MonitorElement* GlobalDigisAnalyzer::mehEcaln[2]
private

Definition at line 146 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEcalSHE

MonitorElement* GlobalDigisAnalyzer::mehEcalSHE[2]
private

Definition at line 149 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEcalSHEvAEESHE

MonitorElement* GlobalDigisAnalyzer::mehEcalSHEvAEESHE[2]
private

Definition at line 152 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEScalADC

MonitorElement* GlobalDigisAnalyzer::mehEScalADC[3]
private

Definition at line 153 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEScaln

MonitorElement* GlobalDigisAnalyzer::mehEScaln
private

Definition at line 147 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehHcalAEE

MonitorElement* GlobalDigisAnalyzer::mehHcalAEE[4]
private

Definition at line 170 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehHcalAEESHE

MonitorElement* GlobalDigisAnalyzer::mehHcalAEESHE[4]
private

Definition at line 172 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehHcaln

MonitorElement* GlobalDigisAnalyzer::mehHcaln[4]
private

Definition at line 169 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehHcalSHE

MonitorElement* GlobalDigisAnalyzer::mehHcalSHE[4]
private

Definition at line 171 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehHcalSHEvAEE

MonitorElement* GlobalDigisAnalyzer::mehHcalSHEvAEE[4]
private

Definition at line 173 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehRPCMuonn

MonitorElement* GlobalDigisAnalyzer::mehRPCMuonn
private

Definition at line 220 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehRPCRes

MonitorElement* GlobalDigisAnalyzer::mehRPCRes[5]
private

Definition at line 221 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehSiPixelADC

MonitorElement* GlobalDigisAnalyzer::mehSiPixelADC[7]
private

Definition at line 190 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiPixelCol

MonitorElement* GlobalDigisAnalyzer::mehSiPixelCol[7]
private

Definition at line 192 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiPixeln

MonitorElement* GlobalDigisAnalyzer::mehSiPixeln[7]
private

Definition at line 189 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiPixelRow

MonitorElement* GlobalDigisAnalyzer::mehSiPixelRow[7]
private

Definition at line 191 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripADC

MonitorElement* GlobalDigisAnalyzer::mehSiStripADC[19]
private

Definition at line 182 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripn

MonitorElement* GlobalDigisAnalyzer::mehSiStripn[19]
private

Definition at line 181 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripStrip

MonitorElement* GlobalDigisAnalyzer::mehSiStripStrip[19]
private

Definition at line 183 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ MuCSCStripSrc_

edm::InputTag GlobalDigisAnalyzer::MuCSCStripSrc_
private

Definition at line 213 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ MuCSCStripSrc_Token_

edm::EDGetTokenT<CSCStripDigiCollection> GlobalDigisAnalyzer::MuCSCStripSrc_Token_
private

Definition at line 236 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

◆ MuCSCWireSrc_

edm::InputTag GlobalDigisAnalyzer::MuCSCWireSrc_
private

Definition at line 217 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ MuCSCWireSrc_Token_

edm::EDGetTokenT<CSCWireDigiCollection> GlobalDigisAnalyzer::MuCSCWireSrc_Token_
private

Definition at line 237 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

◆ MuDTSrc_

edm::InputTag GlobalDigisAnalyzer::MuDTSrc_
private

Definition at line 204 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ MuDTSrc_Token_

edm::EDGetTokenT<DTDigiCollection> GlobalDigisAnalyzer::MuDTSrc_Token_
private

Definition at line 235 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

◆ MuRPCSrc_

edm::InputTag GlobalDigisAnalyzer::MuRPCSrc_
private

Definition at line 223 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ MuRPCSrc_Token_

edm::EDGetTokenT<RPCDigiCollection> GlobalDigisAnalyzer::MuRPCSrc_Token_
private

Definition at line 238 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

◆ printProvenanceInfo

bool GlobalDigisAnalyzer::printProvenanceInfo
private

Definition at line 140 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

◆ rpcGeomToken_

edm::ESGetToken<RPCGeometry, MuonGeometryRecord> GlobalDigisAnalyzer::rpcGeomToken_
private

Definition at line 159 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

◆ RPCSimHit_Token_

edm::EDGetTokenT<edm::PSimHitContainer> GlobalDigisAnalyzer::RPCSimHit_Token_
private

Definition at line 242 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

◆ SiPxlSrc_

edm::InputTag GlobalDigisAnalyzer::SiPxlSrc_
private

Definition at line 194 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ SiPxlSrc_Token_

edm::EDGetTokenT<edm::DetSetVector<PixelDigi> > GlobalDigisAnalyzer::SiPxlSrc_Token_
private

Definition at line 234 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

◆ SiStripSrc_

edm::InputTag GlobalDigisAnalyzer::SiStripSrc_
private

Definition at line 185 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

◆ SiStripSrc_Token_

edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > GlobalDigisAnalyzer::SiStripSrc_Token_
private

Definition at line 233 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

◆ theCSCStripPedestalCount

int GlobalDigisAnalyzer::theCSCStripPedestalCount
private

Definition at line 215 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon().

◆ theCSCStripPedestalSum

float GlobalDigisAnalyzer::theCSCStripPedestalSum
private

Definition at line 214 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> GlobalDigisAnalyzer::tTopoToken_
private

Definition at line 160 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

◆ verbosity

int GlobalDigisAnalyzer::verbosity
private