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::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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

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 beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- 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< 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::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::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
 
int verbosity
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (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_, 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:36
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:37
edm::EDGetTokenT< DTDigiCollection > MuDTSrc_Token_
GlobalDigisAnalyzer::~GlobalDigisAnalyzer ( )
override

Definition at line 126 of file GlobalDigisAnalyzer.cc.

126 {}

Member Function Documentation

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

Definition at line 419 of file GlobalDigisAnalyzer.cc.

References count, ECalbarrelADCtoGeV_, ECalendcapADCtoGeV_, edm::EventID::event(), fillECal(), fillHCal(), fillMuon(), fillTrk(), frequency, edm::EventSetup::get(), getAllProvenances, edm::Event::getAllStableProvenance(), EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), mps_fire::i, edm::EventBase::id(), nevt, printProvenanceInfo, edm::ESHandle< T >::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::StableProvenance*> AllProv;
464  iEvent.getAllStableProvenance(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 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:58
edm::EventID id() const
Definition: EventBase.h:60
unsigned int RunNumber_t
void fillTrk(const edm::Event &, const edm::EventSetup &)
T const * product() const
Definition: ESHandle.h:86
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: Event.cc:144
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(), mps_fire::i, 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]=nullptr;
137  mehSiStripADC[i]=nullptr;
138  mehSiStripStrip[i]=nullptr;
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]=nullptr;
174  mehHcalAEE[i]=nullptr;
175  mehHcalSHE[i]=nullptr;
176  mehHcalAEESHE[i]=nullptr;
177  mehHcalSHEvAEE[i]=nullptr;
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]=nullptr;
225  mehEcalAEE[i]=nullptr;
226  mehEcalSHE[i]=nullptr;
227  mehEcalMaxPos[i]=nullptr;
228  mehEcalMultvAEE[i]=nullptr;
229  mehEcalSHEvAEESHE[i]=nullptr;
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 = nullptr;
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] = nullptr;
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]=nullptr;
295  mehSiPixelADC[j]=nullptr;
296  mehSiPixelRow[j]=nullptr;
297  mehSiPixelCol[j]=nullptr;
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] = nullptr;
336  mehDtMuonLayer[i] = nullptr;
337  mehDtMuonTime[i] = nullptr;
338  mehDtMuonTimevLayer[i] = nullptr;
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 = nullptr;
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 = nullptr;
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 = nullptr;
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 = nullptr;
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 = nullptr;
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] = nullptr;
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 }
MonitorElement * mehEScalADC[3]
MonitorElement * mehDtMuonLayer[4]
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:160
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:118
MonitorElement * mehRPCMuonn
MonitorElement * mehEcalSHE[2]
MonitorElement * mehEcalAEE[2]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
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(), cosmicBasicClusters_cfi::barrelHits, EBHits_Token_, ECalbarrelADCtoGeV_, ECalEBSrc_Token_, ECalEESrc_Token_, ECalESSrc_Token_, ECalgainConv_, EEHits_Token_, edm::DataFrameContainer::empty(), cosmicBasicClusters_cfi::endcapHits, ESHits_Token_, MonitorElement::Fill(), EcalMGPASample::gainId(), edm::Event::getByToken(), mps_fire::i, EEDataFrame::id(), EBDataFrame::id(), createfilelist::int, gedGsfElectrons_cfi::isBarrel, edm::HandleBase::isValid(), LogDebug, ESDataFrame::MAXSAMPLES, EcalDataFrame::MAXSAMPLES, mehEcalAEE, mehEcalMaxPos, mehEcalMultvAEE, mehEcaln, mehEcalSHE, mehEcalSHEvAEESHE, mehEScalADC, mehEScaln, dataAnalyzerFineBiningParameters_cff::Pmax, gedPhotons_cfi::preshowerHits, edm::Handle< T >::product(), DetId::rawId(), edm::DataFrameContainer::reserve(), simplePhotonAnalyzer_cfi::sample, ESDataFrame::size(), EcalDataFrame::size(), edm::DataFrameContainer::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->empty()) 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  const MixCollection<PCaloHit> barrelHits(crossingFrame.product());
554 
555  // keep track of sum of simhit energy in each crystal
556  for ( auto const & iHit : barrelHits ) {
557 
558  EBDetId ebid = EBDetId(iHit.id());
559 
560  uint32_t crystid = ebid.rawId();
561  ebSimMap[crystid] += iHit.energy();
562  }
563  }
564 
565  // loop over digis
566  const EBDigiCollection *barrelDigi = EcalDigiEB.product();
567 
568  std::vector<double> ebAnalogSignal;
569  std::vector<double> ebADCCounts;
570  std::vector<double> ebADCGains;
571  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
572  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
573  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
574 
575  int i = 0;
576  for (unsigned int digis=0; digis<EcalDigiEB->size(); ++digis) {
577 
578  ++i;
579 
580  EBDataFrame ebdf = (*barrelDigi)[digis];
581  int nrSamples = ebdf.size();
582 
583  EBDetId ebid = ebdf.id () ;
584 
585  double Emax = 0;
586  int Pmax = 0;
587  double pedestalPreSample = 0.;
588  double pedestalPreSampleAnalog = 0.;
589 
590  for (int sample = 0 ; sample < nrSamples; ++sample) {
591  ebAnalogSignal[sample] = 0.;
592  ebADCCounts[sample] = 0.;
593  ebADCGains[sample] = -1.;
594  }
595 
596  // calculate maximum energy and pedestal
597  for (int sample = 0 ; sample < nrSamples; ++sample) {
598 
599  EcalMGPASample thisSample = ebdf[sample];
600  ebADCCounts[sample] = (thisSample.adc());
601  ebADCGains[sample] = (thisSample.gainId());
602  ebAnalogSignal[sample] =
603  (ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
605  if (Emax < ebAnalogSignal[sample]) {
606  Emax = ebAnalogSignal[sample];
607  Pmax = sample;
608  }
609  if ( sample < 3 ) {
610  pedestalPreSample += ebADCCounts[sample] ;
611  pedestalPreSampleAnalog +=
612  ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
613  * ECalbarrelADCtoGeV_ ;
614  }
615 
616  }
617  pedestalPreSample /= 3. ;
618  pedestalPreSampleAnalog /= 3. ;
619 
620  // calculate pedestal subtracted digi energy in the crystal
621  double Erec = Emax - pedestalPreSampleAnalog
622  * ECalgainConv_[(int)ebADCGains[Pmax]];
623 
624  // gather necessary information
625  mehEcalMaxPos[0]->Fill(Pmax);
626  mehEcalSHE[0]->Fill(ebSimMap[ebid.rawId()]);
627  mehEcalAEE[0]->Fill(Erec);
628  //Adding protection against FPE
629  if (ebSimMap[ebid.rawId()]!=0) {
630  mehEcalSHEvAEESHE[0]->Fill(Erec/ebSimMap[ebid.rawId()],
631  ebSimMap[ebid.rawId()]);
632  }
633  //else {
634  // std::cout<<"Would have been an FPE! with ebSimMap[ebid.rawId()]==0\n";
635  //}
636 
637  mehEcalMultvAEE[0]->Fill(Pmax,(float)i);
638  }
639 
640  if (verbosity > 1) {
641  eventout += "\n Number of EBDigis collected:.............. ";
642  eventout += i;
643  }
644  mehEcaln[0]->Fill((float)i);
645  }
646  }
647 
649  //extract EE information
651  bool isEndCap = true;
652  edm::Handle<EEDigiCollection> EcalDigiEE;
653  iEvent.getByToken(ECalEESrc_Token_, EcalDigiEE);
654  bool validDigiEE = true;
655  if (!EcalDigiEE.isValid()) {
656  LogDebug(MsgLoggerCat)
657  << "Unable to find EcalDigiEE in event!";
658  validDigiEE = false;
659  }
660  if (validDigiEE) {
661  if (EcalDigiEE->empty()) isEndCap = false;
662 
663  if (isEndCap) {
664 
665  // loop over simhits
666  MapType eeSimMap;
667  iEvent.getByToken(EEHits_Token_,crossingFrame);
668  bool validXFrame = true;
669  if (!crossingFrame.isValid()) {
670  LogDebug(MsgLoggerCat)
671  << "Unable to find cal endcap crossingFrame in event!";
672  validXFrame = false;
673  }
674  if (validXFrame) {
675  const MixCollection<PCaloHit> endcapHits(crossingFrame.product());
676 
677  // keep track of sum of simhit energy in each crystal
678  for ( auto const & iHit : endcapHits ) {
679 
680  EEDetId eeid = EEDetId(iHit.id());
681 
682  uint32_t crystid = eeid.rawId();
683  eeSimMap[crystid] += iHit.energy();
684  }
685  }
686 
687  // loop over digis
688  const EEDigiCollection *endcapDigi = EcalDigiEE.product();
689 
690  std::vector<double> eeAnalogSignal;
691  std::vector<double> eeADCCounts;
692  std::vector<double> eeADCGains;
693  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
694  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
695  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
696 
697  int inc = 0;
698  for (unsigned int digis=0; digis<EcalDigiEE->size(); ++digis){
699 
700  ++inc;
701 
702  EEDataFrame eedf = (*endcapDigi)[digis];
703  int nrSamples = eedf.size();
704 
705  EEDetId eeid = eedf.id () ;
706 
707  double Emax = 0;
708  int Pmax = 0;
709  double pedestalPreSample = 0.;
710  double pedestalPreSampleAnalog = 0.;
711 
712  for (int sample = 0 ; sample < nrSamples; ++sample) {
713  eeAnalogSignal[sample] = 0.;
714  eeADCCounts[sample] = 0.;
715  eeADCGains[sample] = -1.;
716  }
717 
718  // calculate maximum enery and pedestal
719  for (int sample = 0 ; sample < nrSamples; ++sample) {
720 
721  EcalMGPASample thisSample = eedf[sample];
722 
723  eeADCCounts[sample] = (thisSample.adc());
724  eeADCGains[sample] = (thisSample.gainId());
725  eeAnalogSignal[sample] =
726  (eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
727  * ECalbarrelADCtoGeV_);
728  if (Emax < eeAnalogSignal[sample]) {
729  Emax = eeAnalogSignal[sample];
730  Pmax = sample;
731  }
732  if ( sample < 3 ) {
733  pedestalPreSample += eeADCCounts[sample] ;
734  pedestalPreSampleAnalog +=
735  eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
736  * ECalbarrelADCtoGeV_ ;
737  }
738 
739  }
740  pedestalPreSample /= 3. ;
741  pedestalPreSampleAnalog /= 3. ;
742 
743  // calculate pedestal subtracted digi energy in the crystal
744  double Erec = Emax - pedestalPreSampleAnalog
745  * ECalgainConv_[(int)eeADCGains[Pmax]];
746 
747  // gather necessary information
748  mehEcalMaxPos[1]->Fill(Pmax);
749  mehEcalSHE[1]->Fill(eeSimMap[eeid.rawId()]);
750  mehEcalAEE[1]->Fill(Erec);
751  //Adding protection against FPE
752  if (eeSimMap[eeid.rawId()]!=0){
753  mehEcalSHEvAEESHE[1]->Fill(Erec/eeSimMap[eeid.rawId()],
754  eeSimMap[eeid.rawId()]);
755  }
756  //else{
757  // std::cout<<"Would have been an FPE! with eeSimMap[eeid.rawId()]==0\n";
758  //}
759  mehEcalMultvAEE[1]->Fill(Pmax,(float)inc);
760 
761  }
762 
763  if (verbosity > 1) {
764  eventout += "\n Number of EEDigis collected:.............. ";
765  eventout += inc;
766  }
767 
768  mehEcaln[1]->Fill((float)inc);
769  }
770  }
771 
773  //extract ES information
775  bool isPreshower = true;
776  edm::Handle<ESDigiCollection> EcalDigiES;
777  iEvent.getByToken(ECalESSrc_Token_, EcalDigiES);
778  bool validDigiES = true;
779  if (!EcalDigiES.isValid()) {
780  LogDebug(MsgLoggerCat)
781  << "Unable to find EcalDigiES in event!";
782  validDigiES = false;
783  }
784 
785  // ONLY WHILE GEOMETRY IS REMOVED
786  validDigiES = false;
787 
788  if (validDigiES) {
789  if (EcalDigiES->empty()) isPreshower = false;
790 
791  if (isPreshower) {
792 
793  // loop over simhits
794  iEvent.getByToken(ESHits_Token_,crossingFrame);
795  bool validXFrame = true;
796  if (!crossingFrame.isValid()) {
797  LogDebug(MsgLoggerCat)
798  << "Unable to find cal preshower crossingFrame in event!";
799  validXFrame = false;
800  }
801  if (validXFrame) {
802  const MixCollection<PCaloHit> preshowerHits(crossingFrame.product());
803 
804  // keep track of sum of simhit energy in each crystal
805  MapType esSimMap;
806  for ( auto const & iHit : preshowerHits ) {
807 
808  ESDetId esid = ESDetId(iHit.id());
809 
810  uint32_t crystid = esid.rawId();
811  esSimMap[crystid] += iHit.energy();
812  }
813  }
814 
815  // loop over digis
816  const ESDigiCollection *preshowerDigi = EcalDigiES.product();
817 
818  std::vector<double> esADCCounts;
819  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
820 
821  int i = 0;
822  for (unsigned int digis=0; digis<EcalDigiES->size(); ++digis) {
823 
824  ++i;
825 
826 
827  ESDataFrame esdf = (*preshowerDigi)[digis];
828  int nrSamples = esdf.size();
829 
830  for (int sample = 0 ; sample < nrSamples; ++sample) {
831  esADCCounts[sample] = 0.;
832  }
833 
834  // gether ADC counts
835  for (int sample = 0 ; sample < nrSamples; ++sample) {
836 
837  ESSample thisSample = esdf[sample];
838  esADCCounts[sample] = (thisSample.adc());
839  }
840 
841  mehEScalADC[0]->Fill(esADCCounts[0]);
842  mehEScalADC[1]->Fill(esADCCounts[1]);
843  mehEScalADC[2]->Fill(esADCCounts[2]);
844 
845  }
846 
847  if (verbosity > 1) {
848  eventout += "\n Number of ESDigis collected:.............. ";
849  eventout += i;
850  }
851 
852  mehEScaln->Fill((float)i);
853  }
854  }
855  if (verbosity > 0)
856  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
857 
858  return;
859 }
#define LogDebug(id)
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:519
MonitorElement * mehEcaln[2]
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:74
std::map< int, double, std::less< int > > ECalgainConv_
key_type id() const
Definition: EEDataFrame.h:28
MonitorElement * mehEcalSHE[2]
void reserve(size_t isize)
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 862 of file GlobalDigisAnalyzer.cc.

References HcalCoderDb::adc2fC(), AlignmentProducer_cff::calibrations, MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), HcalDbService::getHcalCalibrations(), HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), photonIsolationHIProducer_cfi::hbhe, HBHEDigi_Token_, HCalSrc_Token_, photonIsolationHIProducer_cfi::hf, HFDigi_Token_, photonIsolationHIProducer_cfi::ho, HODigi_Token_, 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().

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

Definition at line 1393 of file GlobalDigisAnalyzer.cc.

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

Referenced by analyze().

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

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

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