CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 GlobalDigisAnalyzer (const edm::ParameterSet &)
 
virtual ~GlobalDigisAnalyzer ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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_
 
double ECalbarrelADCtoGeV_
 
edm::InputTag ECalEBSrc_
 
edm::EDGetTokenT
< EBDigiCollection
ECalEBSrc_Token_
 
edm::InputTag ECalEESrc_
 
edm::EDGetTokenT
< EEDigiCollection
ECalEESrc_Token_
 
double ECalendcapADCtoGeV_
 
edm::InputTag ECalESSrc_
 
edm::EDGetTokenT
< ESDigiCollection
ECalESSrc_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::InputTag HCalDigi_
 
edm::InputTag HCalSrc_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
HCalSrc_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
< CSCStripDigiCollection
MuCSCStripSrc_Token_
 
edm::InputTag MuCSCWireSrc_
 
edm::EDGetTokenT
< CSCWireDigiCollection
MuCSCWireSrc_Token_
 
edm::InputTag MuDTSrc_
 
edm::EDGetTokenT
< DTDigiCollection
MuDTSrc_Token_
 
edm::InputTag MuRPCSrc_
 
edm::EDGetTokenT
< RPCDigiCollection
MuRPCSrc_Token_
 
bool printProvenanceInfo
 
edm::EDGetTokenT
< edm::PSimHitContainer
RPCSimHit_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
 
int verbosity
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 108 of file GlobalDigisAnalyzer.h.

Member Typedef Documentation

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

Definition at line 113 of file GlobalDigisAnalyzer.h.

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

Definition at line 112 of file GlobalDigisAnalyzer.h.

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

Definition at line 114 of file GlobalDigisAnalyzer.h.

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

Definition at line 115 of file GlobalDigisAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file GlobalDigisAnalyzer.cc.

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

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

Definition at line 126 of file GlobalDigisAnalyzer.cc.

126 {}

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 419 of file GlobalDigisAnalyzer.cc.

References count, ECalbarrelADCtoGeV_, ECalendcapADCtoGeV_, edm::EventID::event(), fillECal(), fillHCal(), fillMuon(), fillTrk(), frequency, edm::EventSetup::get(), edm::Event::getAllProvenance(), getAllProvenances, EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), i, edm::EventBase::id(), nevt, printProvenanceInfo, edm::ESHandle< class >::product(), edm::EventID::run(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

421 {
422  std::string MsgLoggerCat = "GlobalDigisAnalyzer_analyze";
423 
424  // keep track of number of events processed
425  ++count;
426 
427 
428 
429  // THIS BLOCK MIGRATED HERE FROM beginJob:
430  // setup calorimeter constants from service
432  iSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
433  const EcalADCToGeVConstant* agc = pAgc.product();
436  if (verbosity >= 0) {
437  edm::LogInfo(MsgLoggerCat)
438  << "Modified Calorimeter ADCtoGeV constants: barrel = "
439  << ECalbarrelADCtoGeV_ << ", endcap = " << ECalendcapADCtoGeV_;
440  }
441 
442 
443 
444  // get event id information
445  edm::RunNumber_t nrun = iEvent.id().run();
446  edm::EventNumber_t nevt = iEvent.id().event();
447 
448  if (verbosity > 0) {
449  edm::LogInfo(MsgLoggerCat)
450  << "Processing run " << nrun << ", event " << nevt
451  << " (" << count << " events total)";
452  } else if (verbosity == 0) {
453  if (nevt%frequency == 0 || nevt == 1) {
454  edm::LogInfo(MsgLoggerCat)
455  << "Processing run " << nrun << ", event " << nevt
456  << " (" << count << " events total)";
457  }
458  }
459 
460  // look at information available in the event
461  if (getAllProvenances) {
462 
463  std::vector<const edm::Provenance*> AllProv;
464  iEvent.getAllProvenance(AllProv);
465 
466  if (verbosity >= 0)
467  edm::LogInfo(MsgLoggerCat)
468  << "Number of Provenances = " << AllProv.size();
469 
470  if (printProvenanceInfo && (verbosity >= 0)) {
471  TString eventout("\nProvenance info:\n");
472 
473  for (unsigned int i = 0; i < AllProv.size(); ++i) {
474  eventout += "\n ******************************";
475  eventout += "\n Module : ";
476  eventout += AllProv[i]->moduleLabel();
477  eventout += "\n ProductID : ";
478  eventout += AllProv[i]->productID().id();
479  eventout += "\n ClassName : ";
480  eventout += AllProv[i]->className();
481  eventout += "\n InstanceName : ";
482  eventout += AllProv[i]->productInstanceName();
483  eventout += "\n BranchName : ";
484  eventout += AllProv[i]->branchName();
485  }
486  eventout += "\n ******************************\n";
487  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
488  printProvenanceInfo = false;
489  }
490  getAllProvenances = false;
491  }
492 
493  // call fill functions
494  // gather Ecal information from event
495  fillECal(iEvent, iSetup);
496  // gather Hcal information from event
497  fillHCal(iEvent, iSetup);
498  // gather Track information from event
499  fillTrk(iEvent, iSetup);
500  // gather Muon information from event
501  fillMuon(iEvent, iSetup);
502 
503  if (verbosity > 0)
504  edm::LogInfo (MsgLoggerCat)
505  << "Done gathering data from event.";
506 
507  if (verbosity > 2)
508  edm::LogInfo (MsgLoggerCat)
509  << "Saving event contents:";
510 
511  return;
512 }
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:83
int i
Definition: DBlmapReader.cc:9
void fillECal(const edm::Event &, const edm::EventSetup &)
unsigned long long EventNumber_t
void fillHCal(const edm::Event &, const edm::EventSetup &)
void fillMuon(const edm::Event &, const edm::EventSetup &)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
edm::EventID id() const
Definition: EventBase.h:60
unsigned int RunNumber_t
void fillTrk(const edm::Event &, const edm::EventSetup &)
void GlobalDigisAnalyzer::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 128 of file GlobalDigisAnalyzer.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::bookProfile(), i, 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, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

Definition at line 514 of file GlobalDigisAnalyzer.cc.

References ESSample::adc(), EcalMGPASample::adc(), HLT_50ns_5e33_v1_cff::barrelHits, EBHits_Token_, ECalbarrelADCtoGeV_, ECalEBSrc_Token_, ECalEESrc_Token_, ECalESSrc_Token_, ECalgainConv_, EEHits_Token_, HLT_50ns_5e33_v1_cff::endcapHits, ESHits_Token_, MonitorElement::Fill(), EcalMGPASample::gainId(), edm::Event::getByToken(), i, EEDataFrame::id(), EBDataFrame::id(), GeomDetEnumerators::isBarrel(), edm::HandleBase::isValid(), LogDebug, ESDataFrame::MAXSAMPLES, EcalDataFrame::MAXSAMPLES, mehEcalAEE, mehEcalMaxPos, mehEcalMultvAEE, mehEcaln, mehEcalSHE, mehEcalSHEvAEESHE, mehEScalADC, mehEScaln, edm::Handle< T >::product(), DetId::rawId(), compare_using_db::sample, ESDataFrame::size(), EcalDataFrame::size(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by analyze().

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

Definition at line 874 of file GlobalDigisAnalyzer.cc.

References HcalCoderDb::adc2fC(), MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), HBHEDigi_Token_, HCalSrc_Token_, HFDigi_Token_, HODigi_Token_, ihf, cuy::ii, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), LogDebug, mehHcalAEE, mehHcalAEESHE, mehHcaln, mehHcalSHE, mehHcalSHEvAEE, HcalCalibrations::pedestal(), edm::Handle< T >::product(), DetId::rawId(), sdHcalBrl, sdHcalEC, sdHcalFwd, sdHcalOut, CaloSamples::size(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by analyze().

876 {
877  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillHCal";
878 
879  TString eventout;
880  if (verbosity > 0)
881  eventout = "\nGathering info:";
882 
883  // get calibration info
884  edm::ESHandle<HcalDbService> HCalconditions;
885  iSetup.get<HcalDbRecord>().get(HCalconditions);
886  if (!HCalconditions.isValid()) {
887  edm::LogWarning(MsgLoggerCat)
888  << "Unable to find HCalconditions in event!";
889  return;
890  }
891  //HcalCalibrations calibrations;
892  CaloSamples tool;
893 
895  // extract simhit info
898  iEvent.getByToken(HCalSrc_Token_,hcalHits);
899  bool validhcalHits = true;
900  if (!hcalHits.isValid()) {
901  LogDebug(MsgLoggerCat)
902  << "Unable to find hcalHits in event!";
903  validhcalHits = false;
904  }
905  MapType fHBEnergySimHits;
906  MapType fHEEnergySimHits;
907  MapType fHOEnergySimHits;
908  MapType fHFEnergySimHits;
909  if (validhcalHits) {
910  const edm::PCaloHitContainer *simhitResult = hcalHits.product();
911 
912  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin();
913  simhits != simhitResult->end();
914  ++simhits) {
915 
916  HcalDetId detId(simhits->id());
917  uint32_t cellid = detId.rawId();
918 
919  if (detId.subdet() == sdHcalBrl){
920  fHBEnergySimHits[cellid] += simhits->energy();
921  }
922  if (detId.subdet() == sdHcalEC){
923  fHEEnergySimHits[cellid] += simhits->energy();
924  }
925  if (detId.subdet() == sdHcalOut){
926  fHOEnergySimHits[cellid] += simhits->energy();
927  }
928  if (detId.subdet() == sdHcalFwd){
929  fHFEnergySimHits[cellid] += simhits->energy();
930  }
931  }
932  }
933 
935  // get HBHE information
938  iEvent.getByToken(HBHEDigi_Token_,hbhe);
939  bool validHBHE = true;
940  if (!hbhe.isValid()) {
941  LogDebug(MsgLoggerCat)
942  << "Unable to find HBHEDataFrame in event!";
943  validHBHE = false;
944  }
945 
946  if (validHBHE) {
948 
949  int iHB = 0;
950  int iHE = 0;
951  for (ihbhe = hbhe->begin(); ihbhe != hbhe->end(); ++ihbhe) {
952  HcalDetId cell(ihbhe->id());
953 
954  if ((cell.subdet() == sdHcalBrl) || (cell.subdet() == sdHcalEC)) {
955 
956  //HCalconditions->makeHcalCalibration(cell, &calibrations);
957  const HcalCalibrations& calibrations =
958  HCalconditions->getHcalCalibrations(cell);
959  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
960  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
961  HcalCoderDb coder(*channelCoder, *shape);
962  coder.adc2fC(*ihbhe, tool);
963 
964  // get HB info
965  if (cell.subdet() == sdHcalBrl) {
966 
967  ++iHB;
968  float fDigiSum = 0.0;
969  for (int ii = 0; ii < tool.size(); ++ii) {
970  // default ped is 4.5
971  int capid = (*ihbhe)[ii].capid();
972  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
973  }
974 
975  mehHcalSHE[0]->Fill(fHFEnergySimHits[cell.rawId()]);
976  mehHcalAEE[0]->Fill(fDigiSum);
977  //Adding protection against FPE
978  if (fHFEnergySimHits[cell.rawId()]!=0){
979  mehHcalAEESHE[0]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
980  }
981  //else {
982  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
983  //}
984  mehHcalSHEvAEE[0]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
985  }
986 
987  // get HE info
988  if (cell.subdet() == sdHcalEC) {
989 
990  ++iHE;
991  float fDigiSum = 0.0;
992  for (int ii = 0; ii < tool.size(); ++ii) {
993  int capid = (*ihbhe)[ii].capid();
994  fDigiSum += (tool[ii]-calibrations.pedestal(capid));
995  }
996 
997  mehHcalSHE[1]->Fill(fHFEnergySimHits[cell.rawId()]);
998  mehHcalAEE[1]->Fill(fDigiSum);
999  //Adding protection against FPE
1000  if (fHFEnergySimHits[cell.rawId()]!=0){
1001  mehHcalAEESHE[1]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1002  }
1003  //else{
1004  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1005  //}
1006  mehHcalSHEvAEE[1]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1007  }
1008  }
1009  }
1010 
1011  if (verbosity > 1) {
1012  eventout += "\n Number of HBDigis collected:.............. ";
1013  eventout += iHB;
1014  }
1015  mehHcaln[0]->Fill((float)iHB);
1016 
1017  if (verbosity > 1) {
1018  eventout += "\n Number of HEDigis collected:.............. ";
1019  eventout += iHE;
1020  }
1021  mehHcaln[1]->Fill((float)iHE);
1022  }
1023 
1025  // get HO information
1028  iEvent.getByToken(HODigi_Token_,ho);
1029  bool validHO = true;
1030  if (!ho.isValid()) {
1031  LogDebug(MsgLoggerCat)
1032  << "Unable to find HODataFrame in event!";
1033  validHO = false;
1034  }
1035  if (validHO) {
1037 
1038  int iHO = 0;
1039  for (iho = ho->begin(); iho != ho->end(); ++iho) {
1040  HcalDetId cell(iho->id());
1041 
1042  if (cell.subdet() == sdHcalOut) {
1043 
1044  //HCalconditions->makeHcalCalibration(cell, &calibrations);
1045  const HcalCalibrations& calibrations =
1046  HCalconditions->getHcalCalibrations(cell);
1047  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1048  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1049  HcalCoderDb coder (*channelCoder, *shape);
1050  coder.adc2fC(*iho, tool);
1051 
1052  ++iHO;
1053  float fDigiSum = 0.0;
1054  for (int ii = 0; ii < tool.size(); ++ii) {
1055  // default ped is 4.5
1056  int capid = (*iho)[ii].capid();
1057  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1058  }
1059 
1060  mehHcalSHE[2]->Fill(fHFEnergySimHits[cell.rawId()]);
1061  mehHcalAEE[2]->Fill(fDigiSum);
1062  //Adding protection against FPE
1063  if (fHFEnergySimHits[cell.rawId()]!=0){
1064  mehHcalAEESHE[2]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1065  }
1066  //else{
1067  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1068  //}
1069  mehHcalSHEvAEE[2]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1070  }
1071  }
1072 
1073  if (verbosity > 1) {
1074  eventout += "\n Number of HODigis collected:.............. ";
1075  eventout += iHO;
1076  }
1077  mehHcaln[2]->Fill((float)iHO);
1078  }
1079 
1081  // get HF information
1084  iEvent.getByToken(HFDigi_Token_,hf);
1085  bool validHF = true;
1086  if (!hf.isValid()) {
1087  LogDebug(MsgLoggerCat)
1088  << "Unable to find HFDataFrame in event!";
1089  validHF = false;
1090  }
1091  if (validHF) {
1093 
1094  int iHF = 0;
1095  for (ihf = hf->begin(); ihf != hf->end(); ++ihf) {
1096  HcalDetId cell(ihf->id());
1097 
1098  if (cell.subdet() == sdHcalFwd) {
1099 
1100  //HCalconditions->makeHcalCalibration(cell, &calibrations);
1101  const HcalCalibrations& calibrations =
1102  HCalconditions->getHcalCalibrations(cell);
1103  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1104  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1105  HcalCoderDb coder (*channelCoder, *shape);
1106  coder.adc2fC(*ihf, tool);
1107 
1108  ++iHF;
1109  float fDigiSum = 0.0;
1110  for (int ii = 0; ii < tool.size(); ++ii) {
1111  // default ped is 1.73077
1112  int capid = (*ihf)[ii].capid();
1113  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1114  }
1115 
1116  mehHcalSHE[3]->Fill(fHFEnergySimHits[cell.rawId()]);
1117  mehHcalAEE[3]->Fill(fDigiSum);
1118  //Adding protection against FPE
1119  if (fHFEnergySimHits[cell.rawId()]!=0){
1120  mehHcalAEESHE[3]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1121  }
1122  //else{
1123  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1124  //}
1125  mehHcalSHEvAEE[3]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1126  }
1127  }
1128 
1129  if (verbosity > 1) {
1130  eventout += "\n Number of HFDigis collected:.............. ";
1131  eventout += iHF;
1132  }
1133  mehHcaln[3]->Fill((float)iHF);
1134  }
1135 
1136  if (verbosity > 0)
1137  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1138 
1139  return;
1140 }
#define LogDebug(id)
std::vector< PCaloHit > PCaloHitContainer
int ihf
static const int sdHcalOut
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
std::vector< T >::const_iterator const_iterator
double pedestal(int fCapId) const
get pedestal for capid=0..3
int ii
Definition: cuy.py:588
void Fill(long long x)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > HFDigi_Token_
MonitorElement * mehHcalAEE[4]
std::map< uint32_t, float, std::less< uint32_t > > MapType
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > HODigi_Token_
MonitorElement * mehHcalSHEvAEE[4]
T const * product() const
Definition: Handle.h:81
int size() const
get the size
Definition: CaloSamples.h:24
const T & get() const
Definition: EventSetup.h:55
static const int sdHcalFwd
static const int sdHcalBrl
MonitorElement * mehHcaln[4]
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > HBHEDigi_Token_
MonitorElement * mehHcalAEESHE[4]
MonitorElement * mehHcalSHE[4]
bool isValid() const
Definition: ESHandle.h:47
static const int sdHcalEC
void GlobalDigisAnalyzer::fillMuon ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 1405 of file GlobalDigisAnalyzer.cc.

References RPCRoll::centreOfStrip(), MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), j, prof2calltree::last, LogDebug, mehCSCStripADC, mehCSCStripn, mehCSCWiren, mehCSCWireTime, mehDtMuonLayer, mehDtMuonn, mehDtMuonTime, mehDtMuonTimevLayer, mehRPCMuonn, mehRPCRes, MuCSCStripSrc_Token_, MuCSCWireSrc_Token_, MuDTSrc_Token_, MuRPCSrc_Token_, EcalCondDBWriter_cfi::pedestal, RPCDetId::region(), RPCDetId::ring(), RPCDetId, RPCSimHit_Token_, AlCaHLTBitMon_QueryRunRegistry::string, RecoTauPiZeroBuilderPlugins_cfi::strips, theCSCStripPedestalCount, theCSCStripPedestalSum, verbosity, and x.

Referenced by analyze().

1407 {
1408  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillMuon";
1409 
1410  TString eventout;
1411  if (verbosity > 0)
1412  eventout = "\nGathering info:";
1413 
1414  // get DT information
1416  iEvent.getByToken(MuDTSrc_Token_, dtDigis);
1417  bool validdtDigis = true;
1418  if (!dtDigis.isValid()) {
1419  LogDebug(MsgLoggerCat)
1420  << "Unable to find dtDigis in event!";
1421  validdtDigis = false;
1422  }
1423  if (validdtDigis) {
1424  int nDt0 = 0; int nDt1 = 0; int nDt2 = 0; int nDt3 = 0;
1425  int nDt = 0;
1427  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end();
1428  ++detUnitIt) {
1429 
1430  const DTLayerId& id = (*detUnitIt).first;
1431  const DTDigiCollection::Range& range = (*detUnitIt).second;
1432  for (DTDigiCollection::const_iterator digiIt = range.first;
1433  digiIt != range.second;
1434  ++digiIt) {
1435 
1436  ++nDt;
1437 
1438  DTWireId wireId(id,(*digiIt).wire());
1439  if (wireId.station() == 1) {
1440  mehDtMuonLayer[0]->Fill(id.layer());
1441  mehDtMuonTime[0]->Fill((*digiIt).time());
1442  mehDtMuonTimevLayer[0]->Fill(id.layer(),(*digiIt).time());
1443  ++nDt0;
1444  }
1445  if (wireId.station() == 2) {
1446  mehDtMuonLayer[1]->Fill(id.layer());
1447  mehDtMuonTime[1]->Fill((*digiIt).time());
1448  mehDtMuonTimevLayer[1]->Fill(id.layer(),(*digiIt).time());
1449  ++nDt1;
1450  }
1451  if (wireId.station() == 3) {
1452  mehDtMuonLayer[2]->Fill(id.layer());
1453  mehDtMuonTime[2]->Fill((*digiIt).time());
1454  mehDtMuonTimevLayer[2]->Fill(id.layer(),(*digiIt).time());
1455  ++nDt2;
1456  }
1457  if (wireId.station() == 4) {
1458  mehDtMuonLayer[3]->Fill(id.layer());
1459  mehDtMuonTime[3]->Fill((*digiIt).time());
1460  mehDtMuonTimevLayer[3]->Fill(id.layer(),(*digiIt).time());
1461  ++nDt3;
1462  }
1463  }
1464  }
1465  mehDtMuonn[0]->Fill((float)nDt0);
1466  mehDtMuonn[1]->Fill((float)nDt1);
1467  mehDtMuonn[2]->Fill((float)nDt2);
1468  mehDtMuonn[3]->Fill((float)nDt3);
1469 
1470 
1471  if (verbosity > 1) {
1472  eventout += "\n Number of DtMuonDigis collected:.......... ";
1473  eventout += nDt;
1474  }
1475  }
1476 
1477  // get CSC Strip information
1479  iEvent.getByToken(MuCSCStripSrc_Token_, strips);
1480  bool validstrips = true;
1481  if (!strips.isValid()) {
1482  LogDebug(MsgLoggerCat)
1483  << "Unable to find muon strips in event!";
1484  validstrips = false;
1485  }
1486 
1487  if (validstrips) {
1488  int nStrips = 0;
1489  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin();
1490  j != strips->end();
1491  ++j) {
1492 
1493  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
1494  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
1495 
1496  for ( ; digiItr != last; ++digiItr) {
1497  ++nStrips;
1498 
1499  // average pedestals
1500  std::vector<int> adcCounts = digiItr->getADCCounts();
1501  theCSCStripPedestalSum += adcCounts[0];
1502  theCSCStripPedestalSum += adcCounts[1];
1504 
1505  // if there are enough pedestal statistics
1506  if (theCSCStripPedestalCount > 100) {
1508  if (adcCounts[5] > (pedestal + 100))
1509  mehCSCStripADC->Fill(adcCounts[4] - pedestal);
1510  }
1511  }
1512  }
1513 
1514  if (verbosity > 1) {
1515  eventout += "\n Number of CSCStripDigis collected:........ ";
1516  eventout += nStrips;
1517  }
1518  mehCSCStripn->Fill((float)nStrips);
1519  }
1520 
1521  // get CSC Wire information
1523  iEvent.getByToken(MuCSCWireSrc_Token_, wires);
1524  bool validwires = true;
1525  if (!wires.isValid()) {
1526  LogDebug(MsgLoggerCat)
1527  << "Unable to find muon wires in event!";
1528  validwires = false;
1529  }
1530 
1531  if (validwires) {
1532  int nWires = 0;
1533  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin();
1534  j != wires->end();
1535  ++j) {
1536 
1537  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
1538  std::vector<CSCWireDigi>::const_iterator endDigi = (*j).second.second;
1539 
1540  for ( ; digiItr != endDigi; ++digiItr) {
1541  ++nWires;
1542  mehCSCWireTime->Fill(digiItr->getTimeBin());
1543  }
1544  }
1545 
1546  if (verbosity > 1) {
1547  eventout += "\n Number of CSCWireDigis collected:......... ";
1548  eventout += nWires;
1549  }
1550  mehCSCWiren->Fill((float)nWires);
1551  }
1552 
1553  // get RPC information
1554  // Get the RPC Geometry
1556  iSetup.get<MuonGeometryRecord>().get(rpcGeom);
1557  if (!rpcGeom.isValid()) {
1558  edm::LogWarning(MsgLoggerCat)
1559  << "Unable to find RPCGeometryRecord in event!";
1560  return;
1561  }
1562 
1564  iEvent.getByToken(RPCSimHit_Token_, rpcsimHit);
1565  bool validrpcsim = true;
1566  if (!rpcsimHit.isValid()) {
1567  LogDebug(MsgLoggerCat)
1568  << "Unable to find rpcsimHit in event!";
1569  validrpcsim = false;
1570  }
1571 
1573  iEvent.getByToken(MuRPCSrc_Token_, rpcDigis);
1574  bool validrpcdigi = true;
1575  if (!rpcDigis.isValid()) {
1576  LogDebug(MsgLoggerCat)
1577  << "Unable to find rpcDigis in event!";
1578  validrpcdigi = false;
1579  }
1580 
1581  // ONLY UNTIL PROBLEM WITH RPC DIGIS IS FIGURED OUT
1582  validrpcdigi = false;
1583 
1584  // Loop on simhits
1585  edm::PSimHitContainer::const_iterator rpcsimIt;
1586  std::map<RPCDetId, std::vector<double> > allsims;
1587 
1588  if (validrpcsim) {
1589  for (rpcsimIt = rpcsimHit->begin(); rpcsimIt != rpcsimHit->end();
1590  rpcsimIt++) {
1591  RPCDetId Rsid = (RPCDetId)(*rpcsimIt).detUnitId();
1592  int ptype = rpcsimIt->particleType();
1593 
1594  if (ptype == 13 || ptype == -13) {
1595  std::vector<double> buff;
1596  if (allsims.find(Rsid) != allsims.end() ){
1597  buff= allsims[Rsid];
1598  }
1599  buff.push_back(rpcsimIt->localPosition().x());
1600  allsims[Rsid]=buff;
1601  }
1602  }
1603  }
1604 
1605  // CRASH HAPPENS SOMEWHERE HERE IN FOR DECLARATION
1606  // WHAT IS WRONG WITH rpcDigis?????
1607  if (validrpcdigi) {
1608  int nRPC = 0;
1610  for (rpcdetUnitIt = rpcDigis->begin(); rpcdetUnitIt != rpcDigis->end();
1611  ++rpcdetUnitIt) {
1612 
1613  const RPCDetId Rsid = (*rpcdetUnitIt).first;
1614  const RPCRoll* roll =
1615  dynamic_cast<const RPCRoll* >( rpcGeom->roll(Rsid));
1616  const RPCDigiCollection::Range& range = (*rpcdetUnitIt).second;
1617 
1618  std::vector<double> sims;
1619  if (allsims.find(Rsid) != allsims.end() ){
1620  sims = allsims[Rsid];
1621  }
1622 
1623  int ndigi = 0;
1624  for (RPCDigiCollection::const_iterator rpcdigiIt = range.first;
1625  rpcdigiIt != range.second;
1626  ++rpcdigiIt) {
1627 
1628  ++ndigi;
1629  ++nRPC;
1630  }
1631 
1632  if (sims.size() == 1 && ndigi == 1){
1633  double dis = roll->centreOfStrip(range.first->strip()).x()-sims[0];
1634 
1635  if (Rsid.region() == 0 ){
1636  if (Rsid.ring() == -2)
1637  mehRPCRes[0]->Fill((float)dis);
1638  else if (Rsid.ring() == -1)
1639  mehRPCRes[1]->Fill((float)dis);
1640  else if (Rsid.ring() == 0)
1641  mehRPCRes[2]->Fill((float)dis);
1642  else if (Rsid.ring() == 1)
1643  mehRPCRes[3]->Fill((float)dis);
1644  else if (Rsid.ring() == 2)
1645  mehRPCRes[4]->Fill((float)dis);
1646  }
1647  }
1648  }
1649 
1650  if (verbosity > 1) {
1651  eventout += "\n Number of RPCDigis collected:.............. ";
1652  eventout += nRPC;
1653  }
1654  mehRPCMuonn->Fill(float(nRPC));
1655  }
1656 
1657  if (verbosity > 0)
1658  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1659 
1660  return;
1661 }
#define LogDebug(id)
LocalPoint centreOfStrip(int strip) const
Definition: RPCRoll.cc:52
MonitorElement * mehDtMuonLayer[4]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
MonitorElement * mehRPCRes[5]
edm::EDGetTokenT< CSCStripDigiCollection > MuCSCStripSrc_Token_
MonitorElement * mehDtMuonTimevLayer[4]
MonitorElement * mehCSCWireTime
void Fill(long long x)
edm::EDGetTokenT< edm::PSimHitContainer > RPCSimHit_Token_
MonitorElement * mehDtMuonTime[4]
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int ring() const
Definition: RPCDetId.h:72
int j
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< CSCWireDigiCollection > MuCSCWireSrc_Token_
bool isValid() const
Definition: HandleBase.h:75
MonitorElement * mehRPCMuonn
MonitorElement * mehCSCStripn
MonitorElement * mehCSCStripADC
const T & get() const
Definition: EventSetup.h:55
std::vector< DTDigi >::const_iterator const_iterator
MonitorElement * mehCSCWiren
edm::EDGetTokenT< RPCDigiCollection > MuRPCSrc_Token_
std::pair< const_iterator, const_iterator > Range
Definition: DDAxes.h:10
bool isValid() const
Definition: ESHandle.h:47
edm::EDGetTokenT< DTDigiCollection > MuDTSrc_Token_
MonitorElement * mehDtMuonn[4]
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
void GlobalDigisAnalyzer::fillTrk ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 1142 of file GlobalDigisAnalyzer.cc.

References begin, edm::DetSetVector< T >::begin(), end, edm::DetSetVector< T >::end(), MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), i, edm::HandleBase::isValid(), getDQMSummary::iter, LogDebug, mehSiPixelADC, mehSiPixelCol, mehSiPixeln, mehSiPixelRow, mehSiStripADC, mehSiStripn, mehSiStripStrip, edm::ESHandle< class >::product(), 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(), and verbosity.

Referenced by analyze().

1144 {
1145  //Retrieve tracker topology from geometry
1146  edm::ESHandle<TrackerTopology> tTopoHandle;
1147  iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
1148  const TrackerTopology* const tTopo = tTopoHandle.product();
1149 
1150 
1151  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillTrk";
1152 
1153  TString eventout;
1154  if (verbosity > 0)
1155  eventout = "\nGathering info:";
1156 
1157  // get strip information
1159  iEvent.getByToken(SiStripSrc_Token_, stripDigis);
1160  bool validstripDigis = true;
1161  if (!stripDigis.isValid()) {
1162  LogDebug(MsgLoggerCat)
1163  << "Unable to find stripDigis in event!";
1164  validstripDigis = false;
1165  }
1166 
1167  if (validstripDigis) {
1168  int nStripBrl = 0, nStripFwd = 0;
1170  for (DSViter = stripDigis->begin(); DSViter != stripDigis->end();
1171  ++DSViter) {
1172  unsigned int id = DSViter->id;
1173  DetId detId(id);
1177 
1178  // get TIB
1179  if (detId.subdetId() == sdSiTIB) {
1180 
1181  for (iter = begin; iter != end; ++iter) {
1182  ++nStripBrl;
1183  if (tTopo->tibLayer(id) == 1) {
1184  mehSiStripADC[0]->Fill((*iter).adc());
1185  mehSiStripStrip[0]->Fill((*iter).strip());
1186  }
1187  if (tTopo->tibLayer(id) == 2) {
1188  mehSiStripADC[1]->Fill((*iter).adc());
1189  mehSiStripStrip[1]->Fill((*iter).strip());
1190  }
1191  if (tTopo->tibLayer(id) == 3) {
1192  mehSiStripADC[2]->Fill((*iter).adc());
1193  mehSiStripStrip[2]->Fill((*iter).strip());
1194  }
1195  if (tTopo->tibLayer(id) == 4) {
1196  mehSiStripADC[3]->Fill((*iter).adc());
1197  mehSiStripStrip[3]->Fill((*iter).strip());
1198  }
1199  }
1200  }
1201 
1202  // get TOB
1203  if (detId.subdetId() == sdSiTOB) {
1204 
1205  for (iter = begin; iter != end; ++iter) {
1206  ++nStripBrl;
1207  if (tTopo->tobLayer(id) == 1) {
1208  mehSiStripADC[4]->Fill((*iter).adc());
1209  mehSiStripStrip[4]->Fill((*iter).strip());
1210  }
1211  if (tTopo->tobLayer(id) == 2) {
1212  mehSiStripADC[5]->Fill((*iter).adc());
1213  mehSiStripStrip[5]->Fill((*iter).strip());
1214  }
1215  if (tTopo->tobLayer(id) == 3) {
1216  mehSiStripADC[6]->Fill((*iter).adc());
1217  mehSiStripStrip[6]->Fill((*iter).strip());
1218  }
1219  if (tTopo->tobLayer(id) == 4) {
1220  mehSiStripADC[7]->Fill((*iter).adc());
1221  mehSiStripStrip[7]->Fill((*iter).strip());
1222  }
1223  }
1224  }
1225 
1226  // get TID
1227  if (detId.subdetId() == sdSiTID) {
1228 
1229  for (iter = begin; iter != end; ++iter) {
1230  ++nStripFwd;
1231  if (tTopo->tidWheel(id) == 1) {
1232  mehSiStripADC[8]->Fill((*iter).adc());
1233  mehSiStripStrip[8]->Fill((*iter).strip());
1234  }
1235  if (tTopo->tidWheel(id) == 2) {
1236  mehSiStripADC[9]->Fill((*iter).adc());
1237  mehSiStripStrip[9]->Fill((*iter).strip());
1238  }
1239  if (tTopo->tidWheel(id) == 3) {
1240  mehSiStripADC[10]->Fill((*iter).adc());
1241  mehSiStripStrip[10]->Fill((*iter).strip());
1242  }
1243  }
1244  }
1245 
1246  // get TEC
1247  if (detId.subdetId() == sdSiTEC) {
1248 
1249  for (iter = begin; iter != end; ++iter) {
1250  ++nStripFwd;
1251  if (tTopo->tecWheel(id) == 1) {
1252  mehSiStripADC[11]->Fill((*iter).adc());
1253  mehSiStripStrip[11]->Fill((*iter).strip());
1254  }
1255  if (tTopo->tecWheel(id) == 2) {
1256  mehSiStripADC[12]->Fill((*iter).adc());
1257  mehSiStripStrip[12]->Fill((*iter).strip());
1258  }
1259  if (tTopo->tecWheel(id) == 3) {
1260  mehSiStripADC[13]->Fill((*iter).adc());
1261  mehSiStripStrip[13]->Fill((*iter).strip());
1262  }
1263  if (tTopo->tecWheel(id) == 4) {
1264  mehSiStripADC[14]->Fill((*iter).adc());
1265  mehSiStripStrip[14]->Fill((*iter).strip());
1266  }
1267  if (tTopo->tecWheel(id) == 5) {
1268  mehSiStripADC[15]->Fill((*iter).adc());
1269  mehSiStripStrip[15]->Fill((*iter).strip());
1270  }
1271  if (tTopo->tecWheel(id) == 6) {
1272  mehSiStripADC[16]->Fill((*iter).adc());
1273  mehSiStripStrip[16]->Fill((*iter).strip());
1274  }
1275  if (tTopo->tecWheel(id) == 7) {
1276  mehSiStripADC[17]->Fill((*iter).adc());
1277  mehSiStripStrip[17]->Fill((*iter).strip());
1278  }
1279  if (tTopo->tecWheel(id) == 8) {
1280  mehSiStripADC[18]->Fill((*iter).adc());
1281  mehSiStripStrip[18]->Fill((*iter).strip());
1282  }
1283  }
1284  }
1285  } // end loop over DataSetVector
1286 
1287  if (verbosity > 1) {
1288  eventout += "\n Number of BrlStripDigis collected:........ ";
1289  eventout += nStripBrl;
1290  }
1291  for(int i = 0; i < 8; ++i) {
1292  mehSiStripn[i]->Fill((float)nStripBrl);
1293  }
1294 
1295  if (verbosity > 1) {
1296  eventout += "\n Number of FrwdStripDigis collected:....... ";
1297  eventout += nStripFwd;
1298  }
1299  for(int i = 8; i < 19; ++i) {
1300  mehSiStripn[i]->Fill((float)nStripFwd);
1301  }
1302  }
1303 
1304  // get pixel information
1306  iEvent.getByToken(SiPxlSrc_Token_, pixelDigis);
1307  bool validpixelDigis = true;
1308  if (!pixelDigis.isValid()) {
1309  LogDebug(MsgLoggerCat)
1310  << "Unable to find pixelDigis in event!";
1311  validpixelDigis = false;
1312  }
1313  if (validpixelDigis) {
1314  int nPxlBrl = 0, nPxlFwd = 0;
1316  for (DPViter = pixelDigis->begin(); DPViter != pixelDigis->end();
1317  ++DPViter) {
1318  unsigned int id = DPViter->id;
1319  DetId detId(id);
1320  edm::DetSet<PixelDigi>::const_iterator begin = DPViter->data.begin();
1321  edm::DetSet<PixelDigi>::const_iterator end = DPViter->data.end();
1323 
1324  // get Barrel pixels
1325  if (detId.subdetId() == sdPxlBrl) {
1326 
1327  for (iter = begin; iter != end; ++iter) {
1328  ++nPxlBrl;
1329  if (tTopo->pxbLayer(id) == 1) {
1330  mehSiPixelADC[0]->Fill((*iter).adc());
1331  mehSiPixelRow[0]->Fill((*iter).row());
1332  mehSiPixelCol[0]->Fill((*iter).column());
1333  }
1334  if (tTopo->pxbLayer(id) == 2) {
1335  mehSiPixelADC[1]->Fill((*iter).adc());
1336  mehSiPixelRow[1]->Fill((*iter).row());
1337  mehSiPixelCol[1]->Fill((*iter).column());
1338  }
1339  if (tTopo->pxbLayer(id) == 3) {
1340  mehSiPixelADC[2]->Fill((*iter).adc());
1341  mehSiPixelRow[2]->Fill((*iter).row());
1342  mehSiPixelCol[2]->Fill((*iter).column());
1343  }
1344  }
1345  }
1346 
1347  // get Forward pixels
1348  if (detId.subdetId() == sdPxlFwd) {
1349 
1350  for (iter = begin; iter != end; ++iter) {
1351  ++nPxlFwd;
1352  if (tTopo->pxfDisk(id) == 1) {
1353  if (tTopo->pxfSide(id) == 1) {
1354  mehSiPixelADC[4]->Fill((*iter).adc());
1355  mehSiPixelRow[4]->Fill((*iter).row());
1356  mehSiPixelCol[4]->Fill((*iter).column());
1357  }
1358  if (tTopo->pxfSide(id) == 2) {
1359  mehSiPixelADC[3]->Fill((*iter).adc());
1360  mehSiPixelRow[3]->Fill((*iter).row());
1361  mehSiPixelCol[3]->Fill((*iter).column());
1362  }
1363  }
1364  if (tTopo->pxfDisk(id) == 2) {
1365  if (tTopo->pxfSide(id) == 1) {
1366 
1367  mehSiPixelADC[6]->Fill((*iter).adc());
1368  mehSiPixelRow[6]->Fill((*iter).row());
1369  mehSiPixelCol[6]->Fill((*iter).column());
1370  }
1371  if (tTopo->pxfSide(id) == 2) {
1372  mehSiPixelADC[5]->Fill((*iter).adc());
1373  mehSiPixelRow[5]->Fill((*iter).row());
1374  mehSiPixelCol[5]->Fill((*iter).column());
1375  }
1376  }
1377  }
1378  }
1379  }
1380 
1381  if (verbosity > 1) {
1382  eventout += "\n Number of BrlPixelDigis collected:........ ";
1383  eventout += nPxlBrl;
1384  }
1385  for(int i = 0; i < 3; ++i) {
1386  mehSiPixeln[i]->Fill((float)nPxlBrl);
1387  }
1388 
1389  if (verbosity > 1) {
1390  eventout += "\n Number of FrwdPixelDigis collected:....... ";
1391  eventout += nPxlFwd;
1392  }
1393 
1394  for(int i = 3; i < 7; ++i) {
1395  mehSiPixeln[i]->Fill((float)nPxlFwd);
1396  }
1397  }
1398 
1399  if (verbosity > 0)
1400  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1401 
1402  return;
1403 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
unsigned int tibLayer(const DetId &id) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
unsigned int pxfDisk(const DetId &id) const
static const int sdSiTID
MonitorElement * mehSiPixelRow[7]
unsigned int tidWheel(const DetId &id) const
MonitorElement * mehSiStripADC[19]
MonitorElement * mehSiStripn[19]
void Fill(long long x)
static const int sdSiTIB
static const int sdPxlBrl
static const int sdSiTOB
#define end
Definition: vmac.h:37
bool isValid() const
Definition: HandleBase.h:75
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:365
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripSrc_Token_
unsigned int pxbLayer(const DetId &id) const
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
MonitorElement * mehSiPixelCol[7]
static const int sdSiTEC
#define begin
Definition: vmac.h:30
unsigned int pxfSide(const DetId &id) const
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:350
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:33
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:108
unsigned int tecWheel(const DetId &id) const
MonitorElement * mehSiPixelADC[7]
unsigned int tobLayer(const DetId &id) const

Member Data Documentation

unsigned int GlobalDigisAnalyzer::count
private

Definition at line 247 of file GlobalDigisAnalyzer.h.

Referenced by analyze().

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

Definition at line 241 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

double GlobalDigisAnalyzer::ECalbarrelADCtoGeV_
private

Definition at line 166 of file GlobalDigisAnalyzer.h.

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

edm::InputTag GlobalDigisAnalyzer::ECalEBSrc_
private

Definition at line 161 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 228 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::ECalEESrc_
private

Definition at line 162 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 229 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

double GlobalDigisAnalyzer::ECalendcapADCtoGeV_
private

Definition at line 167 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::ECalESSrc_
private

Definition at line 163 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 230 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

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

Definition at line 165 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

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

Definition at line 242 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

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

Definition at line 243 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

std::string GlobalDigisAnalyzer::fName
private

Definition at line 141 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

int GlobalDigisAnalyzer::frequency
private

Definition at line 143 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

bool GlobalDigisAnalyzer::getAllProvenances
private

Definition at line 145 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

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

Definition at line 232 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::HCalDigi_
private

Definition at line 178 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::HCalSrc_
private

Definition at line 177 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 231 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

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

Definition at line 234 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

std::string GlobalDigisAnalyzer::hitsProducer
private

Definition at line 147 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 233 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

std::string GlobalDigisAnalyzer::label
private
MonitorElement* GlobalDigisAnalyzer::mehCSCStripADC
private

Definition at line 211 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehCSCStripn
private

Definition at line 210 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehCSCWiren
private

Definition at line 212 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehCSCWireTime
private

Definition at line 213 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehDtMuonLayer[4]
private

Definition at line 202 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehDtMuonn[4]
private

Definition at line 201 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehDtMuonTime[4]
private

Definition at line 203 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehDtMuonTimevLayer[4]
private

Definition at line 204 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehEcalAEE[2]
private

Definition at line 154 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

MonitorElement* GlobalDigisAnalyzer::mehEcalMaxPos[2]
private

Definition at line 156 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

MonitorElement* GlobalDigisAnalyzer::mehEcalMultvAEE[2]
private

Definition at line 157 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

MonitorElement* GlobalDigisAnalyzer::mehEcaln[2]
private

Definition at line 152 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

MonitorElement* GlobalDigisAnalyzer::mehEcalSHE[2]
private

Definition at line 155 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

MonitorElement* GlobalDigisAnalyzer::mehEcalSHEvAEESHE[2]
private

Definition at line 158 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

MonitorElement* GlobalDigisAnalyzer::mehEScalADC[3]
private

Definition at line 159 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

MonitorElement* GlobalDigisAnalyzer::mehEScaln
private

Definition at line 153 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

MonitorElement* GlobalDigisAnalyzer::mehHcalAEE[4]
private

Definition at line 172 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

MonitorElement* GlobalDigisAnalyzer::mehHcalAEESHE[4]
private

Definition at line 174 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

MonitorElement* GlobalDigisAnalyzer::mehHcaln[4]
private

Definition at line 171 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

MonitorElement* GlobalDigisAnalyzer::mehHcalSHE[4]
private

Definition at line 173 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

MonitorElement* GlobalDigisAnalyzer::mehHcalSHEvAEE[4]
private

Definition at line 175 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

MonitorElement* GlobalDigisAnalyzer::mehRPCMuonn
private

Definition at line 222 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehRPCRes[5]
private

Definition at line 223 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

MonitorElement* GlobalDigisAnalyzer::mehSiPixelADC[7]
private

Definition at line 192 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

MonitorElement* GlobalDigisAnalyzer::mehSiPixelCol[7]
private

Definition at line 194 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

MonitorElement* GlobalDigisAnalyzer::mehSiPixeln[7]
private

Definition at line 191 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

MonitorElement* GlobalDigisAnalyzer::mehSiPixelRow[7]
private

Definition at line 193 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

MonitorElement* GlobalDigisAnalyzer::mehSiStripADC[19]
private

Definition at line 184 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

MonitorElement* GlobalDigisAnalyzer::mehSiStripn[19]
private

Definition at line 183 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

MonitorElement* GlobalDigisAnalyzer::mehSiStripStrip[19]
private

Definition at line 185 of file GlobalDigisAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

edm::InputTag GlobalDigisAnalyzer::MuCSCStripSrc_
private

Definition at line 215 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 238 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::MuCSCWireSrc_
private

Definition at line 219 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 239 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::MuDTSrc_
private

Definition at line 206 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 237 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::MuRPCSrc_
private

Definition at line 225 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 240 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

bool GlobalDigisAnalyzer::printProvenanceInfo
private

Definition at line 146 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

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

Definition at line 244 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::SiPxlSrc_
private

Definition at line 196 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 236 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

edm::InputTag GlobalDigisAnalyzer::SiStripSrc_
private

Definition at line 187 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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

Definition at line 235 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

int GlobalDigisAnalyzer::theCSCStripPedestalCount
private

Definition at line 217 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon().

float GlobalDigisAnalyzer::theCSCStripPedestalSum
private

Definition at line 216 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon().

int GlobalDigisAnalyzer::verbosity
private