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_, ProducerED_cfi::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:307
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 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void fillECal(const edm::Event &, const edm::EventSetup &)
unsigned long long EventNumber_t
int iEvent
Definition: GenABIO.cc:224
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:36
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_2024v12_cff::barrelHits, EBHits_Token_, ECalbarrelADCtoGeV_, ECalEBSrc_Token_, ECalEESrc_Token_, ECalESSrc_Token_, ECalgainConv_, EEHits_Token_, edm::DataFrameContainer::empty(), HLT_2024v12_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, ElectronMcFakeValidator_cfi::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 pedestalPreSampleAnalog = 0.;
574 
575  for (int sample = 0; sample < nrSamples; ++sample) {
576  ebAnalogSignal[sample] = 0.;
577  ebADCCounts[sample] = 0.;
578  ebADCGains[sample] = -1.;
579  }
580 
581  // calculate maximum energy and pedestal
582  for (int sample = 0; sample < nrSamples; ++sample) {
583  EcalMGPASample thisSample = ebdf[sample];
584  ebADCCounts[sample] = (thisSample.adc());
585  ebADCGains[sample] = (thisSample.gainId());
586  ebAnalogSignal[sample] = (ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]] * ECalbarrelADCtoGeV_);
587  if (Emax < ebAnalogSignal[sample]) {
588  Emax = ebAnalogSignal[sample];
589  Pmax = sample;
590  }
591  if (sample < 3) {
592  pedestalPreSampleAnalog +=
593  ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]] * ECalbarrelADCtoGeV_;
594  }
595  }
596  pedestalPreSampleAnalog /= 3.;
597 
598  // calculate pedestal subtracted digi energy in the crystal
599  double Erec = Emax - pedestalPreSampleAnalog * ECalgainConv_[(int)ebADCGains[Pmax]];
600 
601  // gather necessary information
602  mehEcalMaxPos[0]->Fill(Pmax);
603  mehEcalSHE[0]->Fill(ebSimMap[ebid.rawId()]);
604  mehEcalAEE[0]->Fill(Erec);
605  // Adding protection against FPE
606  if (ebSimMap[ebid.rawId()] != 0) {
607  mehEcalSHEvAEESHE[0]->Fill(Erec / ebSimMap[ebid.rawId()], ebSimMap[ebid.rawId()]);
608  }
609  // else {
610  // std::cout<<"Would have been an FPE! with
611  // ebSimMap[ebid.rawId()]==0\n";
612  //}
613 
614  mehEcalMultvAEE[0]->Fill(Pmax, (float)i);
615  }
616 
617  if (verbosity > 1) {
618  eventout += "\n Number of EBDigis collected:.............. ";
619  eventout += i;
620  }
621  mehEcaln[0]->Fill((float)i);
622  }
623  }
624 
626  // extract EE information
628  bool isEndCap = true;
630  iEvent.getByToken(ECalEESrc_Token_, EcalDigiEE);
631  bool validDigiEE = true;
632  if (!EcalDigiEE.isValid()) {
633  LogDebug(MsgLoggerCat) << "Unable to find EcalDigiEE in event!";
634  validDigiEE = false;
635  }
636  if (validDigiEE) {
637  if (EcalDigiEE->empty())
638  isEndCap = false;
639 
640  if (isEndCap) {
641  // loop over simhits
642  MapType eeSimMap;
643  iEvent.getByToken(EEHits_Token_, crossingFrame);
644  bool validXFrame = true;
645  if (!crossingFrame.isValid()) {
646  LogDebug(MsgLoggerCat) << "Unable to find cal endcap crossingFrame in event!";
647  validXFrame = false;
648  }
649  if (validXFrame) {
650  const MixCollection<PCaloHit> endcapHits(crossingFrame.product());
651 
652  // keep track of sum of simhit energy in each crystal
653  for (auto const &iHit : endcapHits) {
654  EEDetId eeid = EEDetId(iHit.id());
655 
656  uint32_t crystid = eeid.rawId();
657  eeSimMap[crystid] += iHit.energy();
658  }
659  }
660 
661  // loop over digis
662  const EEDigiCollection *endcapDigi = EcalDigiEE.product();
663 
664  std::vector<double> eeAnalogSignal;
665  std::vector<double> eeADCCounts;
666  std::vector<double> eeADCGains;
667  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
668  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
669  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
670 
671  int inc = 0;
672  for (unsigned int digis = 0; digis < EcalDigiEE->size(); ++digis) {
673  ++inc;
674 
675  EEDataFrame eedf = (*endcapDigi)[digis];
676  int nrSamples = eedf.size();
677 
678  EEDetId eeid = eedf.id();
679 
680  double Emax = 0;
681  int Pmax = 0;
682  double pedestalPreSampleAnalog = 0.;
683 
684  for (int sample = 0; sample < nrSamples; ++sample) {
685  eeAnalogSignal[sample] = 0.;
686  eeADCCounts[sample] = 0.;
687  eeADCGains[sample] = -1.;
688  }
689 
690  // calculate maximum enery and pedestal
691  for (int sample = 0; sample < nrSamples; ++sample) {
692  EcalMGPASample thisSample = eedf[sample];
693 
694  eeADCCounts[sample] = (thisSample.adc());
695  eeADCGains[sample] = (thisSample.gainId());
696  eeAnalogSignal[sample] = (eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]] * ECalbarrelADCtoGeV_);
697  if (Emax < eeAnalogSignal[sample]) {
698  Emax = eeAnalogSignal[sample];
699  Pmax = sample;
700  }
701  if (sample < 3) {
702  pedestalPreSampleAnalog +=
703  eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]] * ECalbarrelADCtoGeV_;
704  }
705  }
706  pedestalPreSampleAnalog /= 3.;
707 
708  // calculate pedestal subtracted digi energy in the crystal
709  double Erec = Emax - pedestalPreSampleAnalog * ECalgainConv_[(int)eeADCGains[Pmax]];
710 
711  // gather necessary information
712  mehEcalMaxPos[1]->Fill(Pmax);
713  mehEcalSHE[1]->Fill(eeSimMap[eeid.rawId()]);
714  mehEcalAEE[1]->Fill(Erec);
715  // Adding protection against FPE
716  if (eeSimMap[eeid.rawId()] != 0) {
717  mehEcalSHEvAEESHE[1]->Fill(Erec / eeSimMap[eeid.rawId()], eeSimMap[eeid.rawId()]);
718  }
719  // else{
720  // std::cout<<"Would have been an FPE! with
721  // eeSimMap[eeid.rawId()]==0\n";
722  //}
723  mehEcalMultvAEE[1]->Fill(Pmax, (float)inc);
724  }
725 
726  if (verbosity > 1) {
727  eventout += "\n Number of EEDigis collected:.............. ";
728  eventout += inc;
729  }
730 
731  mehEcaln[1]->Fill((float)inc);
732  }
733  }
734 
736  // extract ES information
738  bool isPreshower = true;
740  iEvent.getByToken(ECalESSrc_Token_, EcalDigiES);
741  bool validDigiES = true;
742  if (!EcalDigiES.isValid()) {
743  LogDebug(MsgLoggerCat) << "Unable to find EcalDigiES in event!";
744  validDigiES = false;
745  }
746 
747  // ONLY WHILE GEOMETRY IS REMOVED
748  validDigiES = false;
749 
750  if (validDigiES) {
751  if (EcalDigiES->empty())
752  isPreshower = false;
753 
754  if (isPreshower) {
755  // loop over simhits
756  iEvent.getByToken(ESHits_Token_, crossingFrame);
757  bool validXFrame = true;
758  if (!crossingFrame.isValid()) {
759  LogDebug(MsgLoggerCat) << "Unable to find cal preshower crossingFrame in event!";
760  validXFrame = false;
761  }
762  if (validXFrame) {
763  const MixCollection<PCaloHit> preshowerHits(crossingFrame.product());
764 
765  // keep track of sum of simhit energy in each crystal
766  MapType esSimMap;
767  for (auto const &iHit : preshowerHits) {
768  ESDetId esid = ESDetId(iHit.id());
769 
770  uint32_t crystid = esid.rawId();
771  esSimMap[crystid] += iHit.energy();
772  }
773  }
774 
775  // loop over digis
776  const ESDigiCollection *preshowerDigi = EcalDigiES.product();
777 
778  std::vector<double> esADCCounts;
779  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
780 
781  int i = 0;
782  for (unsigned int digis = 0; digis < EcalDigiES->size(); ++digis) {
783  ++i;
784 
785  ESDataFrame esdf = (*preshowerDigi)[digis];
786  int nrSamples = esdf.size();
787 
788  for (int sample = 0; sample < nrSamples; ++sample) {
789  esADCCounts[sample] = 0.;
790  }
791 
792  // gether ADC counts
793  for (int sample = 0; sample < nrSamples; ++sample) {
794  ESSample thisSample = esdf[sample];
795  esADCCounts[sample] = (thisSample.adc());
796  }
797 
798  mehEScalADC[0]->Fill(esADCCounts[0]);
799  mehEScalADC[1]->Fill(esADCCounts[1]);
800  mehEScalADC[2]->Fill(esADCCounts[2]);
801  }
802 
803  if (verbosity > 1) {
804  eventout += "\n Number of ESDigis collected:.............. ";
805  eventout += i;
806  }
807 
808  mehEScaln->Fill((float)i);
809  }
810  }
811  if (verbosity > 0)
812  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
813 
814  return;
815 }
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 817 of file GlobalDigisAnalyzer.cc.

References HcalCoderDb::adc2fC(), AlignmentProducer_cff::calibrations, hcalRecHitTable_cff::detId, 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(), sdHcalBrl, sdHcalEC, sdHcalFwd, sdHcalOut, l1trig_cff::shape, HLTBitAnalyser_cfi::simhits, CaloSamples::size(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by analyze().

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

References dqm::impl::MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::getHandle(), iEvent, edm::HandleBase::isValid(), dqmiolumiharvest::j, dqmdumpme::last, nano_mu_digi_cff::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, DigiTask_cfi::ptype, FastTimerService_cff::range, RPCDetId::region(), RPCDetId::ring(), nano_mu_digi_cff::roll, rpcGeomToken_, RPCSimHit_Token_, AlCaHLTBitMon_QueryRunRegistry::string, DigiDM_cff::strips, theCSCStripPedestalCount, theCSCStripPedestalSum, verbosity, DigiDM_cff::wires, and x.

Referenced by analyze().

1316  {
1317  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillMuon";
1318 
1319  TString eventout;
1320  if (verbosity > 0)
1321  eventout = "\nGathering info:";
1322 
1323  // get DT information
1325  iEvent.getByToken(MuDTSrc_Token_, dtDigis);
1326  bool validdtDigis = true;
1327  if (!dtDigis.isValid()) {
1328  LogDebug(MsgLoggerCat) << "Unable to find dtDigis in event!";
1329  validdtDigis = false;
1330  }
1331  if (validdtDigis) {
1332  int nDt0 = 0;
1333  int nDt1 = 0;
1334  int nDt2 = 0;
1335  int nDt3 = 0;
1336  int nDt = 0;
1338  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end(); ++detUnitIt) {
1339  const DTLayerId &id = (*detUnitIt).first;
1340  const DTDigiCollection::Range &range = (*detUnitIt).second;
1341  for (DTDigiCollection::const_iterator digiIt = range.first; digiIt != range.second; ++digiIt) {
1342  ++nDt;
1343 
1344  DTWireId wireId(id, (*digiIt).wire());
1345  if (wireId.station() == 1) {
1346  mehDtMuonLayer[0]->Fill(id.layer());
1347  mehDtMuonTime[0]->Fill((*digiIt).time());
1348  mehDtMuonTimevLayer[0]->Fill(id.layer(), (*digiIt).time());
1349  ++nDt0;
1350  }
1351  if (wireId.station() == 2) {
1352  mehDtMuonLayer[1]->Fill(id.layer());
1353  mehDtMuonTime[1]->Fill((*digiIt).time());
1354  mehDtMuonTimevLayer[1]->Fill(id.layer(), (*digiIt).time());
1355  ++nDt1;
1356  }
1357  if (wireId.station() == 3) {
1358  mehDtMuonLayer[2]->Fill(id.layer());
1359  mehDtMuonTime[2]->Fill((*digiIt).time());
1360  mehDtMuonTimevLayer[2]->Fill(id.layer(), (*digiIt).time());
1361  ++nDt2;
1362  }
1363  if (wireId.station() == 4) {
1364  mehDtMuonLayer[3]->Fill(id.layer());
1365  mehDtMuonTime[3]->Fill((*digiIt).time());
1366  mehDtMuonTimevLayer[3]->Fill(id.layer(), (*digiIt).time());
1367  ++nDt3;
1368  }
1369  }
1370  }
1371  mehDtMuonn[0]->Fill((float)nDt0);
1372  mehDtMuonn[1]->Fill((float)nDt1);
1373  mehDtMuonn[2]->Fill((float)nDt2);
1374  mehDtMuonn[3]->Fill((float)nDt3);
1375 
1376  if (verbosity > 1) {
1377  eventout += "\n Number of DtMuonDigis collected:.......... ";
1378  eventout += nDt;
1379  }
1380  }
1381 
1382  // get CSC Strip information
1384  iEvent.getByToken(MuCSCStripSrc_Token_, strips);
1385  bool validstrips = true;
1386  if (!strips.isValid()) {
1387  LogDebug(MsgLoggerCat) << "Unable to find muon strips in event!";
1388  validstrips = false;
1389  }
1390 
1391  if (validstrips) {
1392  int nStrips = 0;
1393  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin(); j != strips->end(); ++j) {
1394  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
1395  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
1396 
1397  for (; digiItr != last; ++digiItr) {
1398  ++nStrips;
1399 
1400  // average pedestals
1401  std::vector<int> adcCounts = digiItr->getADCCounts();
1402  theCSCStripPedestalSum += adcCounts[0];
1403  theCSCStripPedestalSum += adcCounts[1];
1405 
1406  // if there are enough pedestal statistics
1407  if (theCSCStripPedestalCount > 100) {
1409  if (adcCounts[5] > (pedestal + 100))
1410  mehCSCStripADC->Fill(adcCounts[4] - pedestal);
1411  }
1412  }
1413  }
1414 
1415  if (verbosity > 1) {
1416  eventout += "\n Number of CSCStripDigis collected:........ ";
1417  eventout += nStrips;
1418  }
1419  mehCSCStripn->Fill((float)nStrips);
1420  }
1421 
1422  // get CSC Wire information
1424  iEvent.getByToken(MuCSCWireSrc_Token_, wires);
1425  bool validwires = true;
1426  if (!wires.isValid()) {
1427  LogDebug(MsgLoggerCat) << "Unable to find muon wires in event!";
1428  validwires = false;
1429  }
1430 
1431  if (validwires) {
1432  int nWires = 0;
1433  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin(); j != wires->end(); ++j) {
1434  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
1435  std::vector<CSCWireDigi>::const_iterator endDigi = (*j).second.second;
1436 
1437  for (; digiItr != endDigi; ++digiItr) {
1438  ++nWires;
1439  mehCSCWireTime->Fill(digiItr->getTimeBin());
1440  }
1441  }
1442 
1443  if (verbosity > 1) {
1444  eventout += "\n Number of CSCWireDigis collected:......... ";
1445  eventout += nWires;
1446  }
1447  mehCSCWiren->Fill((float)nWires);
1448  }
1449 
1450  // get RPC information
1451  // Get the RPC Geometry
1452  const auto &rpcGeom = iSetup.getHandle(rpcGeomToken_);
1453  if (!rpcGeom.isValid()) {
1454  edm::LogWarning(MsgLoggerCat) << "Unable to find RPCGeometryRecord in event!";
1455  return;
1456  }
1457 
1459  iEvent.getByToken(RPCSimHit_Token_, rpcsimHit);
1460  bool validrpcsim = true;
1461  if (!rpcsimHit.isValid()) {
1462  LogDebug(MsgLoggerCat) << "Unable to find rpcsimHit in event!";
1463  validrpcsim = false;
1464  }
1465 
1467  iEvent.getByToken(MuRPCSrc_Token_, rpcDigis);
1468  bool validrpcdigi = true;
1469  if (!rpcDigis.isValid()) {
1470  LogDebug(MsgLoggerCat) << "Unable to find rpcDigis in event!";
1471  validrpcdigi = false;
1472  }
1473 
1474  // ONLY UNTIL PROBLEM WITH RPC DIGIS IS FIGURED OUT
1475  validrpcdigi = false;
1476 
1477  // Loop on simhits
1478  edm::PSimHitContainer::const_iterator rpcsimIt;
1479  std::map<RPCDetId, std::vector<double>> allsims;
1480 
1481  if (validrpcsim) {
1482  for (rpcsimIt = rpcsimHit->begin(); rpcsimIt != rpcsimHit->end(); rpcsimIt++) {
1483  RPCDetId Rsid = (RPCDetId)(*rpcsimIt).detUnitId();
1484  int ptype = rpcsimIt->particleType();
1485 
1486  if (ptype == 13 || ptype == -13) {
1487  std::vector<double> buff;
1488  if (allsims.find(Rsid) != allsims.end()) {
1489  buff = allsims[Rsid];
1490  }
1491  buff.push_back(rpcsimIt->localPosition().x());
1492  allsims[Rsid] = buff;
1493  }
1494  }
1495  }
1496 
1497  // CRASH HAPPENS SOMEWHERE HERE IN FOR DECLARATION
1498  // WHAT IS WRONG WITH rpcDigis?????
1499  if (validrpcdigi) {
1500  int nRPC = 0;
1502  for (rpcdetUnitIt = rpcDigis->begin(); rpcdetUnitIt != rpcDigis->end(); ++rpcdetUnitIt) {
1503  const RPCDetId Rsid = (*rpcdetUnitIt).first;
1504  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(Rsid));
1505  const RPCDigiCollection::Range &range = (*rpcdetUnitIt).second;
1506 
1507  std::vector<double> sims;
1508  if (allsims.find(Rsid) != allsims.end()) {
1509  sims = allsims[Rsid];
1510  }
1511 
1512  int ndigi = 0;
1513  for (RPCDigiCollection::const_iterator rpcdigiIt = range.first; rpcdigiIt != range.second; ++rpcdigiIt) {
1514  ++ndigi;
1515  ++nRPC;
1516  }
1517 
1518  if (sims.size() == 1 && ndigi == 1) {
1519  double dis = roll->centreOfStrip(range.first->strip()).x() - sims[0];
1520 
1521  if (Rsid.region() == 0) {
1522  if (Rsid.ring() == -2)
1523  mehRPCRes[0]->Fill((float)dis);
1524  else if (Rsid.ring() == -1)
1525  mehRPCRes[1]->Fill((float)dis);
1526  else if (Rsid.ring() == 0)
1527  mehRPCRes[2]->Fill((float)dis);
1528  else if (Rsid.ring() == 1)
1529  mehRPCRes[3]->Fill((float)dis);
1530  else if (Rsid.ring() == 2)
1531  mehRPCRes[4]->Fill((float)dis);
1532  }
1533  }
1534  }
1535 
1536  if (verbosity > 1) {
1537  eventout += "\n Number of RPCDigis collected:.............. ";
1538  eventout += nRPC;
1539  }
1540  mehRPCMuonn->Fill(float(nRPC));
1541  }
1542 
1543  if (verbosity > 0)
1544  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1545 
1546  return;
1547 }
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...
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:130
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)

◆ fillTrk()

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

Definition at line 1071 of file GlobalDigisAnalyzer.cc.

References edm::DetSetVector< T >::begin(), hcalRecHitTable_cff::detId, 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, TrackerTopology::tecWheel(), TrackerTopology::tibLayer(), TrackerTopology::tidWheel(), TrackerTopology::tobLayer(), tTopoToken_, and verbosity.

Referenced by analyze().

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