test
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 | Private Member Functions | Private Attributes
GlobalDigisAnalyzer Class Reference

#include <GlobalDigisAnalyzer.h>

Inheritance diagram for GlobalDigisAnalyzer:
edm::EDAnalyzer 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::EDAnalyzer
typedef EDAnalyzer ModuleType
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob (void)
 
virtual void endJob ()
 
 GlobalDigisAnalyzer (const edm::ParameterSet &)
 
virtual ~GlobalDigisAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
 
DQMStoredbe
 
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 edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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)
 

Detailed Description

Definition at line 107 of file GlobalDigisAnalyzer.h.

Member Typedef Documentation

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

Definition at line 112 of file GlobalDigisAnalyzer.h.

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

Definition at line 111 of file GlobalDigisAnalyzer.h.

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

Definition at line 113 of file GlobalDigisAnalyzer.h.

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

Definition at line 114 of file GlobalDigisAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file GlobalDigisAnalyzer.cc.

References DQMStore::book1D(), DQMStore::bookProfile(), dbe, EBHits_Token_, ECalbarrelADCtoGeV_, ECalEBSrc_, ECalEBSrc_Token_, ECalEESrc_, ECalEESrc_Token_, ECalendcapADCtoGeV_, ECalESSrc_, ECalESSrc_Token_, ECalgainConv_, EEHits_Token_, ESHits_Token_, fName, frequency, getAllProvenances, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HBHEDigi_Token_, HCalDigi_, HCalSrc_, HCalSrc_Token_, HFDigi_Token_, hitsProducer, HODigi_Token_, i, edm::InputTag::instance(), j, edm::InputTag::label(), 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, MuCSCStripSrc_, MuCSCStripSrc_Token_, MuCSCWireSrc_, MuCSCWireSrc_Token_, MuDTSrc_, MuDTSrc_Token_, MuRPCSrc_, MuRPCSrc_Token_, cppFunctionSkipper::operator, printProvenanceInfo, RPCSimHit_Token_, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), 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  //Put in analyzer stuff here.... Pasted from Rec Hits...
107 
108  dbe = 0;
110  if (dbe) {
111  if (verbosity > 0 ) {
112  dbe->setVerbose(1);
113  } else {
114  dbe->setVerbose(0);
115  }
116  }
117  if (dbe) {
118  if (verbosity > 0 ) dbe->showDirStructure();
119  }
120 
121  //monitor elements
122 
123  //Si Strip
124  if (dbe) {
125  std::string SiStripString[19] = {"TECW1", "TECW2", "TECW3", "TECW4",
126  "TECW5", "TECW6", "TECW7", "TECW8",
127  "TIBL1", "TIBL2", "TIBL3", "TIBL4",
128  "TIDW1", "TIDW2", "TIDW3", "TOBL1",
129  "TOBL2", "TOBL3", "TOBL4"};
130  for(int i = 0; i<19; ++i) {
131  mehSiStripn[i]=0;
132  mehSiStripADC[i]=0;
133  mehSiStripStrip[i]=0;
134  }
135  std::string hcharname, hchartitle;
136  dbe->setCurrentFolder("GlobalDigisV/SiStrips");
137  for(int amend = 0; amend < 19; ++amend) {
138  hcharname = "hSiStripn_"+SiStripString[amend];
139  hchartitle= SiStripString[amend]+" Digis";
140  mehSiStripn[amend] = dbe->book1D(hcharname,hchartitle,5000,0.,10000.);
141  mehSiStripn[amend]->setAxisTitle("Number of Digis",1);
142  mehSiStripn[amend]->setAxisTitle("Count",2);
143 
144  hcharname = "hSiStripADC_"+SiStripString[amend];
145  hchartitle= SiStripString[amend]+" ADC";
146  mehSiStripADC[amend] = dbe->book1D(hcharname,hchartitle,150,0.0,300.);
147  mehSiStripADC[amend]->setAxisTitle("ADC",1);
148  mehSiStripADC[amend]->setAxisTitle("Count",2);
149 
150  hcharname = "hSiStripStripADC_"+SiStripString[amend];
151  hchartitle= SiStripString[amend]+" Strip";
152  mehSiStripStrip[amend] = dbe->book1D(hcharname,hchartitle,200,0.0,800.);
153  mehSiStripStrip[amend]->setAxisTitle("Strip Number",1);
154  mehSiStripStrip[amend]->setAxisTitle("Count",2);
155  }
156 
157  //HCal
158  std::string HCalString[4] = {"HB", "HE", "HO","HF"};
159  float calnUpper[4] = {30000.,30000.,30000.,20000.};
160  float calnLower[4]={0.,0.,0.,0.};
161  float SHEUpper[4]={1.,1.,1.,1.};
162  float SHEvAEEUpper[4] = {5000, 5000, 5000, 5000};
163  float SHEvAEELower[4] = {-5000, -5000, -5000, -5000};
164  int SHEvAEEnBins[4] = {200,200,200,200};
165  double ProfileUpper[4] = {1.,1.,1.,1.};
166 
167  for(int i =0; i<4; ++i) {
168  mehHcaln[i]=0;
169  mehHcalAEE[i]=0;
170  mehHcalSHE[i]=0;
171  mehHcalAEESHE[i]=0;
172  mehHcalSHEvAEE[i]=0;
173  }
174  dbe->setCurrentFolder("GlobalDigisV/HCals");
175 
176  for(int amend = 0; amend < 4; ++amend) {
177  hcharname = "hHcaln_"+HCalString[amend];
178  hchartitle= HCalString[amend]+" digis";
179  mehHcaln[amend] = dbe->book1D(hcharname,hchartitle, 10000, calnLower[amend],
180  calnUpper[amend]);
181  mehHcaln[amend]->setAxisTitle("Number of Digis",1);
182  mehHcaln[amend]->setAxisTitle("Count",2);
183 
184  hcharname = "hHcalAEE_"+HCalString[amend];
185  hchartitle= HCalString[amend]+"Cal AEE";
186  mehHcalAEE[amend] = dbe->book1D(hcharname,hchartitle, 60, -10., 50.);
187  mehHcalAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
188  mehHcalAEE[amend]->setAxisTitle("Count",2);
189 
190  hcharname = "hHcalSHE_"+HCalString[amend];
191  hchartitle= HCalString[amend]+"Cal SHE";
192  mehHcalSHE[amend] = dbe->book1D(hcharname,hchartitle, 1000, 0.0,
193  SHEUpper[amend]);
194  mehHcalSHE[amend]->setAxisTitle("Simulated Hit Energy",1);
195  mehHcalSHE[amend]->setAxisTitle("Count",2);
196 
197  hcharname = "hHcalAEESHE_"+HCalString[amend];
198  hchartitle= HCalString[amend]+"Cal AEE/SHE";
199  mehHcalAEESHE[amend] = dbe->book1D(hcharname, hchartitle, SHEvAEEnBins[amend],
200  SHEvAEELower[amend],
201  SHEvAEEUpper[amend]);
202  mehHcalAEESHE[amend]->setAxisTitle("ADC / SHE",1);
203  mehHcalAEESHE[amend]->setAxisTitle("Count",2);
204 
205  hcharname = "hHcalSHEvAEE_"+HCalString[amend];
206  hchartitle= HCalString[amend]+"Cal SHE vs. AEE";
207  mehHcalSHEvAEE[amend] = dbe->bookProfile(hcharname,hchartitle, 60, -10.,
208  50., 100, 0.,
209  (float)ProfileUpper[amend],"");
210  mehHcalSHEvAEE[amend]->setAxisTitle("AEE / SHE",1);
211  mehHcalSHEvAEE[amend]->setAxisTitle("SHE",2);
212 
213  }
214 
215  //Ecal
216  std::string ECalString[2] = {"EB","EE"};
217 
218  for(int i =0; i<2; ++i) {
219  mehEcaln[i]=0;
220  mehEcalAEE[i]=0;
221  mehEcalSHE[i]=0;
222  mehEcalMaxPos[i]=0;
223  mehEcalMultvAEE[i]=0;
224  mehEcalSHEvAEESHE[i]=0;
225  }
226  dbe->setCurrentFolder("GlobalDigisV/ECals");
227 
228  for(int amend = 0; amend < 2; ++amend) {
229  hcharname = "hEcaln_"+ECalString[amend];
230  hchartitle= ECalString[amend]+" digis";
231  mehEcaln[amend] = dbe->book1D(hcharname,hchartitle, 3000, 0., 40000.);
232  mehEcaln[amend]->setAxisTitle("Number of Digis",1);
233  mehEcaln[amend]->setAxisTitle("Count",2);
234 
235  hcharname = "hEcalAEE_"+ECalString[amend];
236  hchartitle= ECalString[amend]+"Cal AEE";
237  mehEcalAEE[amend] = dbe->book1D(hcharname,hchartitle, 1000, 0., 100.);
238  mehEcalAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
239  mehEcalAEE[amend]->setAxisTitle("Count",2);
240 
241  hcharname = "hEcalSHE_"+ECalString[amend];
242  hchartitle= ECalString[amend]+"Cal SHE";
243  mehEcalSHE[amend] = dbe->book1D(hcharname,hchartitle, 500, 0., 50.);
244  mehEcalSHE[amend]->setAxisTitle("Simulated Hit Energy",1);
245  mehEcalSHE[amend]->setAxisTitle("Count",2);
246 
247  hcharname = "hEcalMaxPos_"+ECalString[amend];
248  hchartitle= ECalString[amend]+"Cal MaxPos";
249  mehEcalMaxPos[amend] = dbe->book1D(hcharname,hchartitle,10, 0., 10.);
250  mehEcalMaxPos[amend]->setAxisTitle("Maximum Position",1);
251  mehEcalMaxPos[amend]->setAxisTitle("Count",2);
252 
253  hcharname = "hEcalSHEvAEESHE_"+ECalString[amend];
254  hchartitle= ECalString[amend]+"Cal SHE vs. AEE/SHE";
255  mehEcalSHEvAEESHE[amend] = dbe->bookProfile(hcharname,hchartitle,1000, 0., 100.,
256  500, 0., 50.,"");
257  mehEcalSHEvAEESHE[amend]->setAxisTitle("AEE / SHE",1);
258  mehEcalSHEvAEESHE[amend]->setAxisTitle("SHE",2);
259 
260  hcharname = "hEcalMultvAEE_"+ECalString[amend];
261  hchartitle= ECalString[amend]+"Cal Multi vs. AEE";
262  mehEcalMultvAEE[amend] = dbe->bookProfile(hcharname,hchartitle, 1000, 0., 100.,
263  4000, 0., 40000.,"");
264  mehEcalMultvAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
265  mehEcalMultvAEE[amend]->setAxisTitle("Number of Digis",2);
266  }
267  mehEScaln = 0;
268 
269  hcharname = "hEcaln_ES";
270  hchartitle= "ESCAL digis";
271  mehEScaln = dbe->book1D(hcharname,hchartitle, 1000, 0., 5000.);
272  mehEScaln->setAxisTitle("Number of Digis",1);
273  mehEScaln->setAxisTitle("Count",2);
274 
275  std::string ADCNumber[3] = {"0", "1", "2"};
276  for(int i =0; i<3; ++i) {
277  mehEScalADC[i] = 0;
278  hcharname = "hEcalADC"+ADCNumber[i]+"_ES";
279  hchartitle= "ESCAL ADC"+ADCNumber[i];
280  mehEScalADC[i] = dbe->book1D(hcharname,hchartitle, 1500, 0., 1500.);
281  mehEScalADC[i]->setAxisTitle("ADC"+ADCNumber[i],1);
282  mehEScalADC[i]->setAxisTitle("Count",2);
283  }
284 
285  //Si Pixels ***DONE***
286  std::string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p",
287  "FWD2n", "FWD2p"};
288  for(int j =0; j<7; ++j) {
289  mehSiPixeln[j]=0;
290  mehSiPixelADC[j]=0;
291  mehSiPixelRow[j]=0;
292  mehSiPixelCol[j]=0;
293  }
294 
295  dbe->setCurrentFolder("GlobalDigisV/SiPixels");
296  for(int amend = 0; amend < 7; ++amend) {
297  hcharname = "hSiPixeln_"+SiPixelString[amend];
298  hchartitle= SiPixelString[amend]+" Digis";
299  if(amend<3) mehSiPixeln[amend] = dbe->book1D(hcharname,hchartitle,500,0.,1000.);
300  else mehSiPixeln[amend] = dbe->book1D(hcharname,hchartitle,500,0.,1000.);
301  mehSiPixeln[amend]->setAxisTitle("Number of Digis",1);
302  mehSiPixeln[amend]->setAxisTitle("Count",2);
303 
304  hcharname = "hSiPixelADC_"+SiPixelString[amend];
305  hchartitle= SiPixelString[amend]+" ADC";
306  mehSiPixelADC[amend] = dbe->book1D(hcharname,hchartitle,150,0.0,300.);
307  mehSiPixelADC[amend]->setAxisTitle("ADC",1);
308  mehSiPixelADC[amend]->setAxisTitle("Count",2);
309 
310  hcharname = "hSiPixelRow_"+SiPixelString[amend];
311  hchartitle= SiPixelString[amend]+" Row";
312  mehSiPixelRow[amend] = dbe->book1D(hcharname,hchartitle,100,0.0,100.);
313  mehSiPixelRow[amend]->setAxisTitle("Row Number",1);
314  mehSiPixelRow[amend]->setAxisTitle("Count",2);
315 
316  hcharname = "hSiPixelColumn_"+SiPixelString[amend];
317  hchartitle= SiPixelString[amend]+" Column";
318  mehSiPixelCol[amend] = dbe->book1D(hcharname,hchartitle,200,0.0,500.);
319  mehSiPixelCol[amend]->setAxisTitle("Column Number",1);
320  mehSiPixelCol[amend]->setAxisTitle("Count",2);
321  }
322 
323  //Muons
324  dbe->setCurrentFolder("GlobalDigisV/Muons");
325 
326  //DT
327  std::string MuonString[4] = {"MB1", "MB2", "MB3", "MB4"};
328 
329  for(int i =0; i < 4; ++i) {
330  mehDtMuonn[i] = 0;
331  mehDtMuonLayer[i] = 0;
332  mehDtMuonTime[i] = 0;
333  mehDtMuonTimevLayer[i] = 0;
334  }
335 
336  for(int j = 0; j < 4; ++j) {
337  hcharname = "hDtMuonn_"+MuonString[j];
338  hchartitle= MuonString[j]+" digis";
339  mehDtMuonn[j] = dbe->book1D(hcharname,hchartitle,250, 0., 500.);
340  mehDtMuonn[j]->setAxisTitle("Number of Digis",1);
341  mehDtMuonn[j]->setAxisTitle("Count",2);
342 
343  hcharname = "hDtLayer_"+MuonString[j];
344  hchartitle= MuonString[j]+" Layer";
345  mehDtMuonLayer[j] = dbe->book1D(hcharname,hchartitle,12, 1., 13.);
346  mehDtMuonLayer[j]->setAxisTitle("4 * (SuperLayer - 1) + Layer",1);
347  mehDtMuonLayer[j]->setAxisTitle("Count",2);
348 
349  hcharname = "hDtMuonTime_"+MuonString[j];
350  hchartitle= MuonString[j]+" Time";
351  mehDtMuonTime[j] = dbe->book1D(hcharname,hchartitle,300, 400., 1000.);
352  mehDtMuonTime[j]->setAxisTitle("Time",1);
353  mehDtMuonTime[j]->setAxisTitle("Count",2);
354 
355  hcharname = "hDtMuonTimevLayer_"+MuonString[j];
356  hchartitle= MuonString[j]+" Time vs. Layer";
357  mehDtMuonTimevLayer[j] = dbe->bookProfile(hcharname,hchartitle,12, 1., 13., 300,
358  400., 1000.,"");
359  mehDtMuonTimevLayer[j]->setAxisTitle("4 * (SuperLayer - 1) + Layer",1);
360  mehDtMuonTimevLayer[j]->setAxisTitle("Time",2);
361  }
362 
363  //CSC
364  mehCSCStripn = 0;
365  hcharname = "hCSCStripn";
366  hchartitle = "CSC Strip digis";
367  mehCSCStripn = dbe->book1D(hcharname,hchartitle,250, 0., 500.);
368  mehCSCStripn->setAxisTitle("Number of Digis",1);
369  mehCSCStripn->setAxisTitle("Count",2);
370 
371  mehCSCStripADC = 0;
372  hcharname = "hCSCStripADC";
373  hchartitle = "CSC Strip ADC";
374  mehCSCStripADC = dbe->book1D(hcharname,hchartitle, 110, 0., 1100.);
375  mehCSCStripADC->setAxisTitle("ADC",1);
376  mehCSCStripADC->setAxisTitle("Count",2);
377 
378  mehCSCWiren = 0;
379  hcharname = "hCSCWiren";
380  hchartitle = "CSC Wire digis";
381  mehCSCWiren = dbe->book1D(hcharname,hchartitle,250, 0., 500.);
382  mehCSCWiren->setAxisTitle("Number of Digis",1);
383  mehCSCWiren->setAxisTitle("Count",2);
384 
385  mehCSCWireTime = 0;
386  hcharname = "hCSCWireTime";
387  hchartitle = "CSC Wire Time";
388  mehCSCWireTime = dbe->book1D(hcharname,hchartitle,10, 0., 10.);
389  mehCSCWireTime->setAxisTitle("Time",1);
390  mehCSCWireTime->setAxisTitle("Count",2);
391 
392  // RPC
393  mehRPCMuonn = 0;
394  hcharname = "hRPCMuonn";
395  hchartitle = "RPC digis";
396  mehCSCStripn = dbe->book1D(hcharname,hchartitle,250, 0., 500.);
397  mehCSCStripn->setAxisTitle("Number of Digis",1);
398  mehCSCStripn->setAxisTitle("Count",2);
399 
400  std::string MuonRPCString[5] = {"Wmin2", "Wmin1", "W0", "Wpu1", "Wpu2"};
401  for(int i =0; i < 5; ++i) {
402  mehRPCRes[i] = 0;
403  }
404 
405  for(int j = 0; j < 5; ++j) {
406  hcharname = "hRPCRes_"+MuonRPCString[j];
407  hchartitle= MuonRPCString[j]+" Digi - Sim";
408  mehRPCRes[j] = dbe->book1D(hcharname,hchartitle,200, -8., 8.);
409  mehRPCRes[j]->setAxisTitle("Digi - Sim center of strip x",1);
410  mehRPCRes[j]->setAxisTitle("Count",2);
411  }
412  }
413 
414  // set default constants
415  // ECal
416 
417  ECalgainConv_[0] = 0.;
418  ECalgainConv_[1] = 1.;
419  ECalgainConv_[2] = 2.;
420  ECalgainConv_[3] = 12.;
421  ECalbarrelADCtoGeV_ = 0.035;
422  ECalendcapADCtoGeV_ = 0.06;
423 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
MonitorElement * mehEScalADC[3]
MonitorElement * mehDtMuonLayer[4]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
MonitorElement * mehEcaln[2]
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
MonitorElement * mehEScaln
MonitorElement * mehSiPixelRow[7]
MonitorElement * mehRPCRes[5]
edm::EDGetTokenT< CSCStripDigiCollection > MuCSCStripSrc_Token_
MonitorElement * mehSiStripADC[19]
MonitorElement * mehDtMuonTimevLayer[4]
MonitorElement * mehSiStripn[19]
MonitorElement * mehCSCWireTime
edm::EDGetTokenT< EEDigiCollection > ECalEESrc_Token_
MonitorElement * mehEcalMaxPos[2]
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
edm::EDGetTokenT< edm::PSimHitContainer > RPCSimHit_Token_
MonitorElement * mehDtMuonTime[4]
edm::InputTag MuCSCStripSrc_
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > HFDigi_Token_
MonitorElement * mehHcalAEE[4]
int j
Definition: DBlmapReader.cc:9
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1268
void setVerbose(unsigned level)
Definition: DQMStore.cc:631
edm::EDGetTokenT< CSCWireDigiCollection > MuCSCWireSrc_Token_
std::map< int, double, std::less< int > > ECalgainConv_
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > HODigi_Token_
MonitorElement * mehRPCMuonn
MonitorElement * mehEcalSHE[2]
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripSrc_Token_
MonitorElement * mehEcalAEE[2]
edm::EDGetTokenT< EBDigiCollection > ECalEBSrc_Token_
MonitorElement * mehHcalSHEvAEE[4]
MonitorElement * mehCSCStripn
edm::EDGetTokenT< ESDigiCollection > ECalESSrc_Token_
MonitorElement * mehCSCStripADC
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
MonitorElement * mehSiPixelCol[7]
MonitorElement * mehHcaln[4]
std::string const & label() const
Definition: InputTag.h:42
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > HBHEDigi_Token_
MonitorElement * mehHcalAEESHE[4]
MonitorElement * mehEcalSHEvAEESHE[2]
MonitorElement * mehHcalSHE[4]
MonitorElement * mehCSCWiren
edm::EDGetTokenT< RPCDigiCollection > MuRPCSrc_Token_
void showDirStructure(void) const
Definition: DQMStore.cc:3332
MonitorElement * mehEcalMultvAEE[2]
MonitorElement * mehSiPixeln[7]
MonitorElement * mehSiStripStrip[19]
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > SiPxlSrc_Token_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::string const & instance() const
Definition: InputTag.h:43
edm::EDGetTokenT< DTDigiCollection > MuDTSrc_Token_
MonitorElement * mehSiPixelADC[7]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
MonitorElement * mehDtMuonn[4]
GlobalDigisAnalyzer::~GlobalDigisAnalyzer ( )
virtual

Definition at line 425 of file GlobalDigisAnalyzer.cc.

425 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 460 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.

462 {
463  std::string MsgLoggerCat = "GlobalDigisAnalyzer_analyze";
464 
465  // keep track of number of events processed
466  ++count;
467 
468 
469 
470  // THIS BLOCK MIGRATED HERE FROM beginJob:
471  // setup calorimeter constants from service
473  iSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
474  const EcalADCToGeVConstant* agc = pAgc.product();
477  if (verbosity >= 0) {
478  edm::LogInfo(MsgLoggerCat)
479  << "Modified Calorimeter ADCtoGeV constants: barrel = "
480  << ECalbarrelADCtoGeV_ << ", endcap = " << ECalendcapADCtoGeV_;
481  }
482 
483 
484 
485  // get event id information
486  int nrun = iEvent.id().run();
487  int nevt = iEvent.id().event();
488 
489  if (verbosity > 0) {
490  edm::LogInfo(MsgLoggerCat)
491  << "Processing run " << nrun << ", event " << nevt
492  << " (" << count << " events total)";
493  } else if (verbosity == 0) {
494  if (nevt%frequency == 0 || nevt == 1) {
495  edm::LogInfo(MsgLoggerCat)
496  << "Processing run " << nrun << ", event " << nevt
497  << " (" << count << " events total)";
498  }
499  }
500 
501  // look at information available in the event
502  if (getAllProvenances) {
503 
504  std::vector<const edm::Provenance*> AllProv;
505  iEvent.getAllProvenance(AllProv);
506 
507  if (verbosity >= 0)
508  edm::LogInfo(MsgLoggerCat)
509  << "Number of Provenances = " << AllProv.size();
510 
511  if (printProvenanceInfo && (verbosity >= 0)) {
512  TString eventout("\nProvenance info:\n");
513 
514  for (unsigned int i = 0; i < AllProv.size(); ++i) {
515  eventout += "\n ******************************";
516  eventout += "\n Module : ";
517  eventout += AllProv[i]->moduleLabel();
518  eventout += "\n ProductID : ";
519  eventout += AllProv[i]->productID().id();
520  eventout += "\n ClassName : ";
521  eventout += AllProv[i]->className();
522  eventout += "\n InstanceName : ";
523  eventout += AllProv[i]->productInstanceName();
524  eventout += "\n BranchName : ";
525  eventout += AllProv[i]->branchName();
526  }
527  eventout += "\n ******************************\n";
528  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
529  printProvenanceInfo = false;
530  }
531  getAllProvenances = false;
532  }
533 
534  // call fill functions
535  // gather Ecal information from event
536  fillECal(iEvent, iSetup);
537  // gather Hcal information from event
538  fillHCal(iEvent, iSetup);
539  // gather Track information from event
540  fillTrk(iEvent, iSetup);
541  // gather Muon information from event
542  fillMuon(iEvent, iSetup);
543 
544  if (verbosity > 0)
545  edm::LogInfo (MsgLoggerCat)
546  << "Done gathering data from event.";
547 
548  if (verbosity > 2)
549  edm::LogInfo (MsgLoggerCat)
550  << "Saving event contents:";
551 
552  return;
553 }
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:86
int i
Definition: DBlmapReader.cc:9
void fillECal(const edm::Event &, const edm::EventSetup &)
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:62
edm::EventID id() const
Definition: EventBase.h:56
void fillTrk(const edm::Event &, const edm::EventSetup &)
void GlobalDigisAnalyzer::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 427 of file GlobalDigisAnalyzer.cc.

References ECalgainConv_, EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

428 {
429  std::string MsgLoggerCat = "GlobalDigisAnalyzer_beginJob";
430 
431  EcalMGPAGainRatio * defaultRatios = new EcalMGPAGainRatio();
432 
433  ECalgainConv_[0] = 0.;
434  ECalgainConv_[1] = 1.;
435  ECalgainConv_[2] = defaultRatios->gain12Over6() ;
436  ECalgainConv_[3] = ECalgainConv_[2]*(defaultRatios->gain6Over1()) ;
437 
438  delete defaultRatios;
439 
440  if (verbosity >= 0) {
441  edm::LogInfo(MsgLoggerCat)
442  << "Modified Calorimeter gain constants: g0 = " << ECalgainConv_[0]
443  << ", g1 = " << ECalgainConv_[1] << ", g2 = " << ECalgainConv_[2]
444  << ", g3 = " << ECalgainConv_[3];
445  }
446 
447  return;
448 }
float gain6Over1() const
std::map< int, double, std::less< int > > ECalgainConv_
float gain12Over6() const
void GlobalDigisAnalyzer::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 451 of file GlobalDigisAnalyzer.cc.

References count, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

452 {
453  std::string MsgLoggerCat = "GlobalDigisAnalyzer_endJob";
454  if (verbosity >= 0)
455  edm::LogInfo(MsgLoggerCat)
456  << "Terminating having processed " << count << " events.";
457  return;
458 }
void GlobalDigisAnalyzer::fillECal ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 555 of file GlobalDigisAnalyzer.cc.

References ESSample::adc(), EcalMGPASample::adc(), EBHits_Token_, ECalbarrelADCtoGeV_, ECalEBSrc_Token_, ECalEESrc_Token_, ECalESSrc_Token_, ECalgainConv_, EEHits_Token_, ESHits_Token_, MonitorElement::Fill(), EcalMGPASample::gainId(), edm::Event::getByToken(), i, EEDataFrame::id(), EBDataFrame::id(), 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().

557 {
558  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillECal";
559 
560  TString eventout;
561  if (verbosity > 0)
562  eventout = "\nGathering info:";
563 
564  // extract crossing frame from event
565  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
566 
568  //extract EB information
570  bool isBarrel = true;
571  edm::Handle<EBDigiCollection> EcalDigiEB;
572  iEvent.getByToken(ECalEBSrc_Token_, EcalDigiEB);
573  bool validDigiEB = true;
574  if (!EcalDigiEB.isValid()) {
575  LogDebug(MsgLoggerCat)
576  << "Unable to find EcalDigiEB in event!";
577  validDigiEB = false;
578  }
579  if (validDigiEB) {
580  if ( EcalDigiEB->size() == 0) isBarrel = false;
581 
582  if (isBarrel) {
583 
584  // loop over simhits
585  MapType ebSimMap;
586  iEvent.getByToken(EBHits_Token_,crossingFrame);
587  bool validXFrame = true;
588  if (!crossingFrame.isValid()) {
589  LogDebug(MsgLoggerCat)
590  << "Unable to find cal barrel crossingFrame in event!";
591  validXFrame = false;
592  }
593  if (validXFrame) {
594  std::auto_ptr<MixCollection<PCaloHit> >
595  barrelHits(new MixCollection<PCaloHit>(crossingFrame.product()));
596 
597  // keep track of sum of simhit energy in each crystal
599  = barrelHits->begin();
600  hitItr != barrelHits->end();
601  ++hitItr) {
602 
603  EBDetId ebid = EBDetId(hitItr->id());
604 
605  uint32_t crystid = ebid.rawId();
606  ebSimMap[crystid] += hitItr->energy();
607  }
608  }
609 
610  // loop over digis
611  const EBDigiCollection *barrelDigi = EcalDigiEB.product();
612 
613  std::vector<double> ebAnalogSignal;
614  std::vector<double> ebADCCounts;
615  std::vector<double> ebADCGains;
616  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
617  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
618  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
619 
620  int i = 0;
621  for (unsigned int digis=0; digis<EcalDigiEB->size(); ++digis) {
622 
623  ++i;
624 
625  EBDataFrame ebdf = (*barrelDigi)[digis];
626  int nrSamples = ebdf.size();
627 
628  EBDetId ebid = ebdf.id () ;
629 
630  double Emax = 0;
631  int Pmax = 0;
632  double pedestalPreSample = 0.;
633  double pedestalPreSampleAnalog = 0.;
634 
635  for (int sample = 0 ; sample < nrSamples; ++sample) {
636  ebAnalogSignal[sample] = 0.;
637  ebADCCounts[sample] = 0.;
638  ebADCGains[sample] = -1.;
639  }
640 
641  // calculate maximum energy and pedestal
642  for (int sample = 0 ; sample < nrSamples; ++sample) {
643 
644  EcalMGPASample thisSample = ebdf[sample];
645  ebADCCounts[sample] = (thisSample.adc());
646  ebADCGains[sample] = (thisSample.gainId());
647  ebAnalogSignal[sample] =
648  (ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
650  if (Emax < ebAnalogSignal[sample]) {
651  Emax = ebAnalogSignal[sample];
652  Pmax = sample;
653  }
654  if ( sample < 3 ) {
655  pedestalPreSample += ebADCCounts[sample] ;
656  pedestalPreSampleAnalog +=
657  ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
658  * ECalbarrelADCtoGeV_ ;
659  }
660 
661  }
662  pedestalPreSample /= 3. ;
663  pedestalPreSampleAnalog /= 3. ;
664 
665  // calculate pedestal subtracted digi energy in the crystal
666  double Erec = Emax - pedestalPreSampleAnalog
667  * ECalgainConv_[(int)ebADCGains[Pmax]];
668 
669  // gather necessary information
670  mehEcalMaxPos[0]->Fill(Pmax);
671  mehEcalSHE[0]->Fill(ebSimMap[ebid.rawId()]);
672  mehEcalAEE[0]->Fill(Erec);
673  //Adding protection against FPE
674  if (ebSimMap[ebid.rawId()]!=0) {
675  mehEcalSHEvAEESHE[0]->Fill(Erec/ebSimMap[ebid.rawId()],
676  ebSimMap[ebid.rawId()]);
677  }
678  //else {
679  // std::cout<<"Would have been an FPE! with ebSimMap[ebid.rawId()]==0\n";
680  //}
681 
682  mehEcalMultvAEE[0]->Fill(Pmax,(float)i);
683  }
684 
685  if (verbosity > 1) {
686  eventout += "\n Number of EBDigis collected:.............. ";
687  eventout += i;
688  }
689  mehEcaln[0]->Fill((float)i);
690  }
691  }
692 
694  //extract EE information
696  bool isEndCap = true;
697  edm::Handle<EEDigiCollection> EcalDigiEE;
698  iEvent.getByToken(ECalEESrc_Token_, EcalDigiEE);
699  bool validDigiEE = true;
700  if (!EcalDigiEE.isValid()) {
701  LogDebug(MsgLoggerCat)
702  << "Unable to find EcalDigiEE in event!";
703  validDigiEE = false;
704  }
705  if (validDigiEE) {
706  if (EcalDigiEE->size() == 0) isEndCap = false;
707 
708  if (isEndCap) {
709 
710  // loop over simhits
711  MapType eeSimMap;
712  iEvent.getByToken(EEHits_Token_,crossingFrame);
713  bool validXFrame = true;
714  if (!crossingFrame.isValid()) {
715  LogDebug(MsgLoggerCat)
716  << "Unable to find cal endcap crossingFrame in event!";
717  validXFrame = false;
718  }
719  if (validXFrame) {
720  std::auto_ptr<MixCollection<PCaloHit> >
721  endcapHits(new MixCollection<PCaloHit>(crossingFrame.product()));
722 
723  // keep track of sum of simhit energy in each crystal
725  = endcapHits->begin();
726  hitItr != endcapHits->end();
727  ++hitItr) {
728 
729  EEDetId eeid = EEDetId(hitItr->id());
730 
731  uint32_t crystid = eeid.rawId();
732  eeSimMap[crystid] += hitItr->energy();
733  }
734  }
735 
736  // loop over digis
737  const EEDigiCollection *endcapDigi = EcalDigiEE.product();
738 
739  std::vector<double> eeAnalogSignal;
740  std::vector<double> eeADCCounts;
741  std::vector<double> eeADCGains;
742  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
743  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
744  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
745 
746  int inc = 0;
747  for (unsigned int digis=0; digis<EcalDigiEE->size(); ++digis){
748 
749  ++inc;
750 
751  EEDataFrame eedf = (*endcapDigi)[digis];
752  int nrSamples = eedf.size();
753 
754  EEDetId eeid = eedf.id () ;
755 
756  double Emax = 0;
757  int Pmax = 0;
758  double pedestalPreSample = 0.;
759  double pedestalPreSampleAnalog = 0.;
760 
761  for (int sample = 0 ; sample < nrSamples; ++sample) {
762  eeAnalogSignal[sample] = 0.;
763  eeADCCounts[sample] = 0.;
764  eeADCGains[sample] = -1.;
765  }
766 
767  // calculate maximum enery and pedestal
768  for (int sample = 0 ; sample < nrSamples; ++sample) {
769 
770  EcalMGPASample thisSample = eedf[sample];
771 
772  eeADCCounts[sample] = (thisSample.adc());
773  eeADCGains[sample] = (thisSample.gainId());
774  eeAnalogSignal[sample] =
775  (eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
776  * ECalbarrelADCtoGeV_);
777  if (Emax < eeAnalogSignal[sample]) {
778  Emax = eeAnalogSignal[sample];
779  Pmax = sample;
780  }
781  if ( sample < 3 ) {
782  pedestalPreSample += eeADCCounts[sample] ;
783  pedestalPreSampleAnalog +=
784  eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
785  * ECalbarrelADCtoGeV_ ;
786  }
787 
788  }
789  pedestalPreSample /= 3. ;
790  pedestalPreSampleAnalog /= 3. ;
791 
792  // calculate pedestal subtracted digi energy in the crystal
793  double Erec = Emax - pedestalPreSampleAnalog
794  * ECalgainConv_[(int)eeADCGains[Pmax]];
795 
796  // gather necessary information
797  mehEcalMaxPos[1]->Fill(Pmax);
798  mehEcalSHE[1]->Fill(eeSimMap[eeid.rawId()]);
799  mehEcalAEE[1]->Fill(Erec);
800  //Adding protection against FPE
801  if (eeSimMap[eeid.rawId()]!=0){
802  mehEcalSHEvAEESHE[1]->Fill(Erec/eeSimMap[eeid.rawId()],
803  eeSimMap[eeid.rawId()]);
804  }
805  //else{
806  // std::cout<<"Would have been an FPE! with eeSimMap[eeid.rawId()]==0\n";
807  //}
808  mehEcalMultvAEE[1]->Fill(Pmax,(float)inc);
809 
810  }
811 
812  if (verbosity > 1) {
813  eventout += "\n Number of EEDigis collected:.............. ";
814  eventout += inc;
815  }
816 
817  mehEcaln[1]->Fill((float)inc);
818  }
819  }
820 
822  //extract ES information
824  bool isPreshower = true;
825  edm::Handle<ESDigiCollection> EcalDigiES;
826  iEvent.getByToken(ECalESSrc_Token_, EcalDigiES);
827  bool validDigiES = true;
828  if (!EcalDigiES.isValid()) {
829  LogDebug(MsgLoggerCat)
830  << "Unable to find EcalDigiES in event!";
831  validDigiES = false;
832  }
833 
834  // ONLY WHILE GEOMETRY IS REMOVED
835  validDigiES = false;
836 
837  if (validDigiES) {
838  if (EcalDigiES->size() == 0) isPreshower = false;
839 
840  if (isPreshower) {
841 
842  // loop over simhits
843  iEvent.getByToken(ESHits_Token_,crossingFrame);
844  bool validXFrame = true;
845  if (!crossingFrame.isValid()) {
846  LogDebug(MsgLoggerCat)
847  << "Unable to find cal preshower crossingFrame in event!";
848  validXFrame = false;
849  }
850  if (validXFrame) {
851  std::auto_ptr<MixCollection<PCaloHit> >
852  preshowerHits(new MixCollection<PCaloHit>(crossingFrame.product()));
853 
854  // keep track of sum of simhit energy in each crystal
855  MapType esSimMap;
857  = preshowerHits->begin();
858  hitItr != preshowerHits->end();
859  ++hitItr) {
860 
861  ESDetId esid = ESDetId(hitItr->id());
862 
863  uint32_t crystid = esid.rawId();
864  esSimMap[crystid] += hitItr->energy();
865  }
866  }
867 
868  // loop over digis
869  const ESDigiCollection *preshowerDigi = EcalDigiES.product();
870 
871  std::vector<double> esADCCounts;
872  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
873 
874  int i = 0;
875  for (unsigned int digis=0; digis<EcalDigiES->size(); ++digis) {
876 
877  ++i;
878 
879 
880  ESDataFrame esdf = (*preshowerDigi)[digis];
881  int nrSamples = esdf.size();
882 
883  for (int sample = 0 ; sample < nrSamples; ++sample) {
884  esADCCounts[sample] = 0.;
885  }
886 
887  // gether ADC counts
888  for (int sample = 0 ; sample < nrSamples; ++sample) {
889 
890  ESSample thisSample = esdf[sample];
891  esADCCounts[sample] = (thisSample.adc());
892  }
893 
894  mehEScalADC[0]->Fill(esADCCounts[0]);
895  mehEScalADC[1]->Fill(esADCCounts[1]);
896  mehEScalADC[2]->Fill(esADCCounts[2]);
897 
898  }
899 
900  if (verbosity > 1) {
901  eventout += "\n Number of ESDigis collected:.............. ";
902  eventout += i;
903  }
904 
905  mehEScaln->Fill((float)i);
906  }
907  }
908  if (verbosity > 0)
909  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
910 
911  return;
912 }
#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:434
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:76
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_
edm::EDGetTokenT< ESDigiCollection > ECalESSrc_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
T const * product() const
Definition: Handle.h:81
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 915 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().

917 {
918  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillHCal";
919 
920  TString eventout;
921  if (verbosity > 0)
922  eventout = "\nGathering info:";
923 
924  // get calibration info
925  edm::ESHandle<HcalDbService> HCalconditions;
926  iSetup.get<HcalDbRecord>().get(HCalconditions);
927  if (!HCalconditions.isValid()) {
928  edm::LogWarning(MsgLoggerCat)
929  << "Unable to find HCalconditions in event!";
930  return;
931  }
932  //HcalCalibrations calibrations;
933  CaloSamples tool;
934 
936  // extract simhit info
939  iEvent.getByToken(HCalSrc_Token_,hcalHits);
940  bool validhcalHits = true;
941  if (!hcalHits.isValid()) {
942  LogDebug(MsgLoggerCat)
943  << "Unable to find hcalHits in event!";
944  validhcalHits = false;
945  }
946  MapType fHBEnergySimHits;
947  MapType fHEEnergySimHits;
948  MapType fHOEnergySimHits;
949  MapType fHFEnergySimHits;
950  if (validhcalHits) {
951  const edm::PCaloHitContainer *simhitResult = hcalHits.product();
952 
953  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin();
954  simhits != simhitResult->end();
955  ++simhits) {
956 
957  HcalDetId detId(simhits->id());
958  uint32_t cellid = detId.rawId();
959 
960  if (detId.subdet() == sdHcalBrl){
961  fHBEnergySimHits[cellid] += simhits->energy();
962  }
963  if (detId.subdet() == sdHcalEC){
964  fHEEnergySimHits[cellid] += simhits->energy();
965  }
966  if (detId.subdet() == sdHcalOut){
967  fHOEnergySimHits[cellid] += simhits->energy();
968  }
969  if (detId.subdet() == sdHcalFwd){
970  fHFEnergySimHits[cellid] += simhits->energy();
971  }
972  }
973  }
974 
976  // get HBHE information
979  iEvent.getByToken(HBHEDigi_Token_,hbhe);
980  bool validHBHE = true;
981  if (!hbhe.isValid()) {
982  LogDebug(MsgLoggerCat)
983  << "Unable to find HBHEDataFrame in event!";
984  validHBHE = false;
985  }
986 
987  if (validHBHE) {
989 
990  int iHB = 0;
991  int iHE = 0;
992  for (ihbhe = hbhe->begin(); ihbhe != hbhe->end(); ++ihbhe) {
993  HcalDetId cell(ihbhe->id());
994 
995  if ((cell.subdet() == sdHcalBrl) || (cell.subdet() == sdHcalEC)) {
996 
997  //HCalconditions->makeHcalCalibration(cell, &calibrations);
998  const HcalCalibrations& calibrations =
999  HCalconditions->getHcalCalibrations(cell);
1000  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1001  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1002  HcalCoderDb coder(*channelCoder, *shape);
1003  coder.adc2fC(*ihbhe, tool);
1004 
1005  // get HB info
1006  if (cell.subdet() == sdHcalBrl) {
1007 
1008  ++iHB;
1009  float fDigiSum = 0.0;
1010  for (int ii = 0; ii < tool.size(); ++ii) {
1011  // default ped is 4.5
1012  int capid = (*ihbhe)[ii].capid();
1013  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1014  }
1015 
1016  mehHcalSHE[0]->Fill(fHFEnergySimHits[cell.rawId()]);
1017  mehHcalAEE[0]->Fill(fDigiSum);
1018  //Adding protection against FPE
1019  if (fHFEnergySimHits[cell.rawId()]!=0){
1020  mehHcalAEESHE[0]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1021  }
1022  //else {
1023  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1024  //}
1025  mehHcalSHEvAEE[0]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1026  }
1027 
1028  // get HE info
1029  if (cell.subdet() == sdHcalEC) {
1030 
1031  ++iHE;
1032  float fDigiSum = 0.0;
1033  for (int ii = 0; ii < tool.size(); ++ii) {
1034  int capid = (*ihbhe)[ii].capid();
1035  fDigiSum += (tool[ii]-calibrations.pedestal(capid));
1036  }
1037 
1038  mehHcalSHE[1]->Fill(fHFEnergySimHits[cell.rawId()]);
1039  mehHcalAEE[1]->Fill(fDigiSum);
1040  //Adding protection against FPE
1041  if (fHFEnergySimHits[cell.rawId()]!=0){
1042  mehHcalAEESHE[1]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1043  }
1044  //else{
1045  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1046  //}
1047  mehHcalSHEvAEE[1]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1048  }
1049  }
1050  }
1051 
1052  if (verbosity > 1) {
1053  eventout += "\n Number of HBDigis collected:.............. ";
1054  eventout += iHB;
1055  }
1056  mehHcaln[0]->Fill((float)iHB);
1057 
1058  if (verbosity > 1) {
1059  eventout += "\n Number of HEDigis collected:.............. ";
1060  eventout += iHE;
1061  }
1062  mehHcaln[1]->Fill((float)iHE);
1063  }
1064 
1066  // get HO information
1069  iEvent.getByToken(HODigi_Token_,ho);
1070  bool validHO = true;
1071  if (!ho.isValid()) {
1072  LogDebug(MsgLoggerCat)
1073  << "Unable to find HODataFrame in event!";
1074  validHO = false;
1075  }
1076  if (validHO) {
1078 
1079  int iHO = 0;
1080  for (iho = ho->begin(); iho != ho->end(); ++iho) {
1081  HcalDetId cell(iho->id());
1082 
1083  if (cell.subdet() == sdHcalOut) {
1084 
1085  //HCalconditions->makeHcalCalibration(cell, &calibrations);
1086  const HcalCalibrations& calibrations =
1087  HCalconditions->getHcalCalibrations(cell);
1088  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1089  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1090  HcalCoderDb coder (*channelCoder, *shape);
1091  coder.adc2fC(*iho, tool);
1092 
1093  ++iHO;
1094  float fDigiSum = 0.0;
1095  for (int ii = 0; ii < tool.size(); ++ii) {
1096  // default ped is 4.5
1097  int capid = (*iho)[ii].capid();
1098  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1099  }
1100 
1101  mehHcalSHE[2]->Fill(fHFEnergySimHits[cell.rawId()]);
1102  mehHcalAEE[2]->Fill(fDigiSum);
1103  //Adding protection against FPE
1104  if (fHFEnergySimHits[cell.rawId()]!=0){
1105  mehHcalAEESHE[2]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1106  }
1107  //else{
1108  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1109  //}
1110  mehHcalSHEvAEE[2]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1111  }
1112  }
1113 
1114  if (verbosity > 1) {
1115  eventout += "\n Number of HODigis collected:.............. ";
1116  eventout += iHO;
1117  }
1118  mehHcaln[2]->Fill((float)iHO);
1119  }
1120 
1122  // get HF information
1125  iEvent.getByToken(HFDigi_Token_,hf);
1126  bool validHF = true;
1127  if (!hf.isValid()) {
1128  LogDebug(MsgLoggerCat)
1129  << "Unable to find HFDataFrame in event!";
1130  validHF = false;
1131  }
1132  if (validHF) {
1134 
1135  int iHF = 0;
1136  for (ihf = hf->begin(); ihf != hf->end(); ++ihf) {
1137  HcalDetId cell(ihf->id());
1138 
1139  if (cell.subdet() == sdHcalFwd) {
1140 
1141  //HCalconditions->makeHcalCalibration(cell, &calibrations);
1142  const HcalCalibrations& calibrations =
1143  HCalconditions->getHcalCalibrations(cell);
1144  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1145  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1146  HcalCoderDb coder (*channelCoder, *shape);
1147  coder.adc2fC(*ihf, tool);
1148 
1149  ++iHF;
1150  float fDigiSum = 0.0;
1151  for (int ii = 0; ii < tool.size(); ++ii) {
1152  // default ped is 1.73077
1153  int capid = (*ihf)[ii].capid();
1154  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1155  }
1156 
1157  mehHcalSHE[3]->Fill(fHFEnergySimHits[cell.rawId()]);
1158  mehHcalAEE[3]->Fill(fDigiSum);
1159  //Adding protection against FPE
1160  if (fHFEnergySimHits[cell.rawId()]!=0){
1161  mehHcalAEESHE[3]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1162  }
1163  //else{
1164  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1165  //}
1166  mehHcalSHEvAEE[3]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1167  }
1168  }
1169 
1170  if (verbosity > 1) {
1171  eventout += "\n Number of HFDigis collected:.............. ";
1172  eventout += iHF;
1173  }
1174  mehHcaln[3]->Fill((float)iHF);
1175  }
1176 
1177  if (verbosity > 0)
1178  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1179 
1180  return;
1181 }
#define LogDebug(id)
std::vector< PCaloHit > PCaloHitContainer
int ihf
static const int sdHcalOut
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
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:76
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > HODigi_Token_
MonitorElement * mehHcalSHEvAEE[4]
int size() const
get the size
Definition: CaloSamples.h:24
const T & get() const
Definition: EventSetup.h:55
static const int sdHcalFwd
T const * product() const
Definition: Handle.h:81
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:37
static const int sdHcalEC
void GlobalDigisAnalyzer::fillMuon ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 1446 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().

1448 {
1449  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillMuon";
1450 
1451  TString eventout;
1452  if (verbosity > 0)
1453  eventout = "\nGathering info:";
1454 
1455  // get DT information
1457  iEvent.getByToken(MuDTSrc_Token_, dtDigis);
1458  bool validdtDigis = true;
1459  if (!dtDigis.isValid()) {
1460  LogDebug(MsgLoggerCat)
1461  << "Unable to find dtDigis in event!";
1462  validdtDigis = false;
1463  }
1464  if (validdtDigis) {
1465  int nDt0 = 0; int nDt1 = 0; int nDt2 = 0; int nDt3 = 0;
1466  int nDt = 0;
1468  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end();
1469  ++detUnitIt) {
1470 
1471  const DTLayerId& id = (*detUnitIt).first;
1472  const DTDigiCollection::Range& range = (*detUnitIt).second;
1473  for (DTDigiCollection::const_iterator digiIt = range.first;
1474  digiIt != range.second;
1475  ++digiIt) {
1476 
1477  ++nDt;
1478 
1479  DTWireId wireId(id,(*digiIt).wire());
1480  if (wireId.station() == 1) {
1481  mehDtMuonLayer[0]->Fill(id.layer());
1482  mehDtMuonTime[0]->Fill((*digiIt).time());
1483  mehDtMuonTimevLayer[0]->Fill(id.layer(),(*digiIt).time());
1484  ++nDt0;
1485  }
1486  if (wireId.station() == 2) {
1487  mehDtMuonLayer[1]->Fill(id.layer());
1488  mehDtMuonTime[1]->Fill((*digiIt).time());
1489  mehDtMuonTimevLayer[1]->Fill(id.layer(),(*digiIt).time());
1490  ++nDt1;
1491  }
1492  if (wireId.station() == 3) {
1493  mehDtMuonLayer[2]->Fill(id.layer());
1494  mehDtMuonTime[2]->Fill((*digiIt).time());
1495  mehDtMuonTimevLayer[2]->Fill(id.layer(),(*digiIt).time());
1496  ++nDt2;
1497  }
1498  if (wireId.station() == 4) {
1499  mehDtMuonLayer[3]->Fill(id.layer());
1500  mehDtMuonTime[3]->Fill((*digiIt).time());
1501  mehDtMuonTimevLayer[3]->Fill(id.layer(),(*digiIt).time());
1502  ++nDt3;
1503  }
1504  }
1505  }
1506  mehDtMuonn[0]->Fill((float)nDt0);
1507  mehDtMuonn[1]->Fill((float)nDt1);
1508  mehDtMuonn[2]->Fill((float)nDt2);
1509  mehDtMuonn[3]->Fill((float)nDt3);
1510 
1511 
1512  if (verbosity > 1) {
1513  eventout += "\n Number of DtMuonDigis collected:.......... ";
1514  eventout += nDt;
1515  }
1516  }
1517 
1518  // get CSC Strip information
1520  iEvent.getByToken(MuCSCStripSrc_Token_, strips);
1521  bool validstrips = true;
1522  if (!strips.isValid()) {
1523  LogDebug(MsgLoggerCat)
1524  << "Unable to find muon strips in event!";
1525  validstrips = false;
1526  }
1527 
1528  if (validstrips) {
1529  int nStrips = 0;
1530  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin();
1531  j != strips->end();
1532  ++j) {
1533 
1534  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
1535  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
1536 
1537  for ( ; digiItr != last; ++digiItr) {
1538  ++nStrips;
1539 
1540  // average pedestals
1541  std::vector<int> adcCounts = digiItr->getADCCounts();
1542  theCSCStripPedestalSum += adcCounts[0];
1543  theCSCStripPedestalSum += adcCounts[1];
1545 
1546  // if there are enough pedestal statistics
1547  if (theCSCStripPedestalCount > 100) {
1549  if (adcCounts[5] > (pedestal + 100))
1550  mehCSCStripADC->Fill(adcCounts[4] - pedestal);
1551  }
1552  }
1553  }
1554 
1555  if (verbosity > 1) {
1556  eventout += "\n Number of CSCStripDigis collected:........ ";
1557  eventout += nStrips;
1558  }
1559  mehCSCStripn->Fill((float)nStrips);
1560  }
1561 
1562  // get CSC Wire information
1564  iEvent.getByToken(MuCSCWireSrc_Token_, wires);
1565  bool validwires = true;
1566  if (!wires.isValid()) {
1567  LogDebug(MsgLoggerCat)
1568  << "Unable to find muon wires in event!";
1569  validwires = false;
1570  }
1571 
1572  if (validwires) {
1573  int nWires = 0;
1574  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin();
1575  j != wires->end();
1576  ++j) {
1577 
1578  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
1579  std::vector<CSCWireDigi>::const_iterator endDigi = (*j).second.second;
1580 
1581  for ( ; digiItr != endDigi; ++digiItr) {
1582  ++nWires;
1583  mehCSCWireTime->Fill(digiItr->getTimeBin());
1584  }
1585  }
1586 
1587  if (verbosity > 1) {
1588  eventout += "\n Number of CSCWireDigis collected:......... ";
1589  eventout += nWires;
1590  }
1591  mehCSCWiren->Fill((float)nWires);
1592  }
1593 
1594  // get RPC information
1595  // Get the RPC Geometry
1597  iSetup.get<MuonGeometryRecord>().get(rpcGeom);
1598  if (!rpcGeom.isValid()) {
1599  edm::LogWarning(MsgLoggerCat)
1600  << "Unable to find RPCGeometryRecord in event!";
1601  return;
1602  }
1603 
1605  iEvent.getByToken(RPCSimHit_Token_, rpcsimHit);
1606  bool validrpcsim = true;
1607  if (!rpcsimHit.isValid()) {
1608  LogDebug(MsgLoggerCat)
1609  << "Unable to find rpcsimHit in event!";
1610  validrpcsim = false;
1611  }
1612 
1614  iEvent.getByToken(MuRPCSrc_Token_, rpcDigis);
1615  bool validrpcdigi = true;
1616  if (!rpcDigis.isValid()) {
1617  LogDebug(MsgLoggerCat)
1618  << "Unable to find rpcDigis in event!";
1619  validrpcdigi = false;
1620  }
1621 
1622  // ONLY UNTIL PROBLEM WITH RPC DIGIS IS FIGURED OUT
1623  validrpcdigi = false;
1624 
1625  // Loop on simhits
1626  edm::PSimHitContainer::const_iterator rpcsimIt;
1627  std::map<RPCDetId, std::vector<double> > allsims;
1628 
1629  if (validrpcsim) {
1630  for (rpcsimIt = rpcsimHit->begin(); rpcsimIt != rpcsimHit->end();
1631  rpcsimIt++) {
1632  RPCDetId Rsid = (RPCDetId)(*rpcsimIt).detUnitId();
1633  int ptype = rpcsimIt->particleType();
1634 
1635  if (ptype == 13 || ptype == -13) {
1636  std::vector<double> buff;
1637  if (allsims.find(Rsid) != allsims.end() ){
1638  buff= allsims[Rsid];
1639  }
1640  buff.push_back(rpcsimIt->localPosition().x());
1641  allsims[Rsid]=buff;
1642  }
1643  }
1644  }
1645 
1646  // CRASH HAPPENS SOMEWHERE HERE IN FOR DECLARATION
1647  // WHAT IS WRONG WITH rpcDigis?????
1648  if (validrpcdigi) {
1649  int nRPC = 0;
1651  for (rpcdetUnitIt = rpcDigis->begin(); rpcdetUnitIt != rpcDigis->end();
1652  ++rpcdetUnitIt) {
1653 
1654  const RPCDetId Rsid = (*rpcdetUnitIt).first;
1655  const RPCRoll* roll =
1656  dynamic_cast<const RPCRoll* >( rpcGeom->roll(Rsid));
1657  const RPCDigiCollection::Range& range = (*rpcdetUnitIt).second;
1658 
1659  std::vector<double> sims;
1660  if (allsims.find(Rsid) != allsims.end() ){
1661  sims = allsims[Rsid];
1662  }
1663 
1664  int ndigi = 0;
1665  for (RPCDigiCollection::const_iterator rpcdigiIt = range.first;
1666  rpcdigiIt != range.second;
1667  ++rpcdigiIt) {
1668 
1669  ++ndigi;
1670  ++nRPC;
1671  }
1672 
1673  if (sims.size() == 1 && ndigi == 1){
1674  double dis = roll->centreOfStrip(range.first->strip()).x()-sims[0];
1675 
1676  if (Rsid.region() == 0 ){
1677  if (Rsid.ring() == -2)
1678  mehRPCRes[0]->Fill((float)dis);
1679  else if (Rsid.ring() == -1)
1680  mehRPCRes[1]->Fill((float)dis);
1681  else if (Rsid.ring() == 0)
1682  mehRPCRes[2]->Fill((float)dis);
1683  else if (Rsid.ring() == 1)
1684  mehRPCRes[3]->Fill((float)dis);
1685  else if (Rsid.ring() == 2)
1686  mehRPCRes[4]->Fill((float)dis);
1687  }
1688  }
1689  }
1690 
1691  if (verbosity > 1) {
1692  eventout += "\n Number of RPCDigis collected:.............. ";
1693  eventout += nRPC;
1694  }
1695  mehRPCMuonn->Fill(float(nRPC));
1696  }
1697 
1698  if (verbosity > 0)
1699  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1700 
1701  return;
1702 }
#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:434
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:76
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:37
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 1183 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().

1185 {
1186  //Retrieve tracker topology from geometry
1187  edm::ESHandle<TrackerTopology> tTopoHandle;
1188  iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
1189  const TrackerTopology* const tTopo = tTopoHandle.product();
1190 
1191 
1192  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillTrk";
1193 
1194  TString eventout;
1195  if (verbosity > 0)
1196  eventout = "\nGathering info:";
1197 
1198  // get strip information
1200  iEvent.getByToken(SiStripSrc_Token_, stripDigis);
1201  bool validstripDigis = true;
1202  if (!stripDigis.isValid()) {
1203  LogDebug(MsgLoggerCat)
1204  << "Unable to find stripDigis in event!";
1205  validstripDigis = false;
1206  }
1207 
1208  if (validstripDigis) {
1209  int nStripBrl = 0, nStripFwd = 0;
1211  for (DSViter = stripDigis->begin(); DSViter != stripDigis->end();
1212  ++DSViter) {
1213  unsigned int id = DSViter->id;
1214  DetId detId(id);
1218 
1219  // get TIB
1220  if (detId.subdetId() == sdSiTIB) {
1221 
1222  for (iter = begin; iter != end; ++iter) {
1223  ++nStripBrl;
1224  if (tTopo->tibLayer(id) == 1) {
1225  mehSiStripADC[0]->Fill((*iter).adc());
1226  mehSiStripStrip[0]->Fill((*iter).strip());
1227  }
1228  if (tTopo->tibLayer(id) == 2) {
1229  mehSiStripADC[1]->Fill((*iter).adc());
1230  mehSiStripStrip[1]->Fill((*iter).strip());
1231  }
1232  if (tTopo->tibLayer(id) == 3) {
1233  mehSiStripADC[2]->Fill((*iter).adc());
1234  mehSiStripStrip[2]->Fill((*iter).strip());
1235  }
1236  if (tTopo->tibLayer(id) == 4) {
1237  mehSiStripADC[3]->Fill((*iter).adc());
1238  mehSiStripStrip[3]->Fill((*iter).strip());
1239  }
1240  }
1241  }
1242 
1243  // get TOB
1244  if (detId.subdetId() == sdSiTOB) {
1245 
1246  for (iter = begin; iter != end; ++iter) {
1247  ++nStripBrl;
1248  if (tTopo->tobLayer(id) == 1) {
1249  mehSiStripADC[4]->Fill((*iter).adc());
1250  mehSiStripStrip[4]->Fill((*iter).strip());
1251  }
1252  if (tTopo->tobLayer(id) == 2) {
1253  mehSiStripADC[5]->Fill((*iter).adc());
1254  mehSiStripStrip[5]->Fill((*iter).strip());
1255  }
1256  if (tTopo->tobLayer(id) == 3) {
1257  mehSiStripADC[6]->Fill((*iter).adc());
1258  mehSiStripStrip[6]->Fill((*iter).strip());
1259  }
1260  if (tTopo->tobLayer(id) == 4) {
1261  mehSiStripADC[7]->Fill((*iter).adc());
1262  mehSiStripStrip[7]->Fill((*iter).strip());
1263  }
1264  }
1265  }
1266 
1267  // get TID
1268  if (detId.subdetId() == sdSiTID) {
1269 
1270  for (iter = begin; iter != end; ++iter) {
1271  ++nStripFwd;
1272  if (tTopo->tidWheel(id) == 1) {
1273  mehSiStripADC[8]->Fill((*iter).adc());
1274  mehSiStripStrip[8]->Fill((*iter).strip());
1275  }
1276  if (tTopo->tidWheel(id) == 2) {
1277  mehSiStripADC[9]->Fill((*iter).adc());
1278  mehSiStripStrip[9]->Fill((*iter).strip());
1279  }
1280  if (tTopo->tidWheel(id) == 3) {
1281  mehSiStripADC[10]->Fill((*iter).adc());
1282  mehSiStripStrip[10]->Fill((*iter).strip());
1283  }
1284  }
1285  }
1286 
1287  // get TEC
1288  if (detId.subdetId() == sdSiTEC) {
1289 
1290  for (iter = begin; iter != end; ++iter) {
1291  ++nStripFwd;
1292  if (tTopo->tecWheel(id) == 1) {
1293  mehSiStripADC[11]->Fill((*iter).adc());
1294  mehSiStripStrip[11]->Fill((*iter).strip());
1295  }
1296  if (tTopo->tecWheel(id) == 2) {
1297  mehSiStripADC[12]->Fill((*iter).adc());
1298  mehSiStripStrip[12]->Fill((*iter).strip());
1299  }
1300  if (tTopo->tecWheel(id) == 3) {
1301  mehSiStripADC[13]->Fill((*iter).adc());
1302  mehSiStripStrip[13]->Fill((*iter).strip());
1303  }
1304  if (tTopo->tecWheel(id) == 4) {
1305  mehSiStripADC[14]->Fill((*iter).adc());
1306  mehSiStripStrip[14]->Fill((*iter).strip());
1307  }
1308  if (tTopo->tecWheel(id) == 5) {
1309  mehSiStripADC[15]->Fill((*iter).adc());
1310  mehSiStripStrip[15]->Fill((*iter).strip());
1311  }
1312  if (tTopo->tecWheel(id) == 6) {
1313  mehSiStripADC[16]->Fill((*iter).adc());
1314  mehSiStripStrip[16]->Fill((*iter).strip());
1315  }
1316  if (tTopo->tecWheel(id) == 7) {
1317  mehSiStripADC[17]->Fill((*iter).adc());
1318  mehSiStripStrip[17]->Fill((*iter).strip());
1319  }
1320  if (tTopo->tecWheel(id) == 8) {
1321  mehSiStripADC[18]->Fill((*iter).adc());
1322  mehSiStripStrip[18]->Fill((*iter).strip());
1323  }
1324  }
1325  }
1326  } // end loop over DataSetVector
1327 
1328  if (verbosity > 1) {
1329  eventout += "\n Number of BrlStripDigis collected:........ ";
1330  eventout += nStripBrl;
1331  }
1332  for(int i = 0; i < 8; ++i) {
1333  mehSiStripn[i]->Fill((float)nStripBrl);
1334  }
1335 
1336  if (verbosity > 1) {
1337  eventout += "\n Number of FrwdStripDigis collected:....... ";
1338  eventout += nStripFwd;
1339  }
1340  for(int i = 8; i < 19; ++i) {
1341  mehSiStripn[i]->Fill((float)nStripFwd);
1342  }
1343  }
1344 
1345  // get pixel information
1347  iEvent.getByToken(SiPxlSrc_Token_, pixelDigis);
1348  bool validpixelDigis = true;
1349  if (!pixelDigis.isValid()) {
1350  LogDebug(MsgLoggerCat)
1351  << "Unable to find pixelDigis in event!";
1352  validpixelDigis = false;
1353  }
1354  if (validpixelDigis) {
1355  int nPxlBrl = 0, nPxlFwd = 0;
1357  for (DPViter = pixelDigis->begin(); DPViter != pixelDigis->end();
1358  ++DPViter) {
1359  unsigned int id = DPViter->id;
1360  DetId detId(id);
1361  edm::DetSet<PixelDigi>::const_iterator begin = DPViter->data.begin();
1362  edm::DetSet<PixelDigi>::const_iterator end = DPViter->data.end();
1364 
1365  // get Barrel pixels
1366  if (detId.subdetId() == sdPxlBrl) {
1367 
1368  for (iter = begin; iter != end; ++iter) {
1369  ++nPxlBrl;
1370  if (tTopo->pxbLayer(id) == 1) {
1371  mehSiPixelADC[0]->Fill((*iter).adc());
1372  mehSiPixelRow[0]->Fill((*iter).row());
1373  mehSiPixelCol[0]->Fill((*iter).column());
1374  }
1375  if (tTopo->pxbLayer(id) == 2) {
1376  mehSiPixelADC[1]->Fill((*iter).adc());
1377  mehSiPixelRow[1]->Fill((*iter).row());
1378  mehSiPixelCol[1]->Fill((*iter).column());
1379  }
1380  if (tTopo->pxbLayer(id) == 3) {
1381  mehSiPixelADC[2]->Fill((*iter).adc());
1382  mehSiPixelRow[2]->Fill((*iter).row());
1383  mehSiPixelCol[2]->Fill((*iter).column());
1384  }
1385  }
1386  }
1387 
1388  // get Forward pixels
1389  if (detId.subdetId() == sdPxlFwd) {
1390 
1391  for (iter = begin; iter != end; ++iter) {
1392  ++nPxlFwd;
1393  if (tTopo->pxfDisk(id) == 1) {
1394  if (tTopo->pxfSide(id) == 1) {
1395  mehSiPixelADC[4]->Fill((*iter).adc());
1396  mehSiPixelRow[4]->Fill((*iter).row());
1397  mehSiPixelCol[4]->Fill((*iter).column());
1398  }
1399  if (tTopo->pxfSide(id) == 2) {
1400  mehSiPixelADC[3]->Fill((*iter).adc());
1401  mehSiPixelRow[3]->Fill((*iter).row());
1402  mehSiPixelCol[3]->Fill((*iter).column());
1403  }
1404  }
1405  if (tTopo->pxfDisk(id) == 2) {
1406  if (tTopo->pxfSide(id) == 1) {
1407 
1408  mehSiPixelADC[6]->Fill((*iter).adc());
1409  mehSiPixelRow[6]->Fill((*iter).row());
1410  mehSiPixelCol[6]->Fill((*iter).column());
1411  }
1412  if (tTopo->pxfSide(id) == 2) {
1413  mehSiPixelADC[5]->Fill((*iter).adc());
1414  mehSiPixelRow[5]->Fill((*iter).row());
1415  mehSiPixelCol[5]->Fill((*iter).column());
1416  }
1417  }
1418  }
1419  }
1420  }
1421 
1422  if (verbosity > 1) {
1423  eventout += "\n Number of BrlPixelDigis collected:........ ";
1424  eventout += nPxlBrl;
1425  }
1426  for(int i = 0; i < 3; ++i) {
1427  mehSiPixeln[i]->Fill((float)nPxlBrl);
1428  }
1429 
1430  if (verbosity > 1) {
1431  eventout += "\n Number of FrwdPixelDigis collected:....... ";
1432  eventout += nPxlFwd;
1433  }
1434 
1435  for(int i = 3; i < 7; ++i) {
1436  mehSiPixeln[i]->Fill((float)nPxlFwd);
1437  }
1438  }
1439 
1440  if (verbosity > 0)
1441  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1442 
1443  return;
1444 }
#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:434
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:76
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:363
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:62
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:348
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:106
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(), and endJob().

DQMStore* GlobalDigisAnalyzer::dbe
private

Definition at line 147 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

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 beginJob(), 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 139 of file GlobalDigisAnalyzer.h.

Referenced by GlobalDigisAnalyzer().

int GlobalDigisAnalyzer::frequency
private

Definition at line 141 of file GlobalDigisAnalyzer.h.

Referenced by analyze(), and GlobalDigisAnalyzer().

bool GlobalDigisAnalyzer::getAllProvenances
private

Definition at line 143 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 145 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 fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehCSCStripn
private

Definition at line 210 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehCSCWiren
private

Definition at line 212 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehCSCWireTime
private

Definition at line 213 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehDtMuonLayer[4]
private

Definition at line 202 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehDtMuonn[4]
private

Definition at line 201 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehDtMuonTime[4]
private

Definition at line 203 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehDtMuonTimevLayer[4]
private

Definition at line 204 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehEcalAEE[2]
private

Definition at line 154 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehEcalMaxPos[2]
private

Definition at line 156 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehEcalMultvAEE[2]
private

Definition at line 157 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehEcaln[2]
private

Definition at line 152 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehEcalSHE[2]
private

Definition at line 155 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehEcalSHEvAEESHE[2]
private

Definition at line 158 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehEScalADC[3]
private

Definition at line 159 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehEScaln
private

Definition at line 153 of file GlobalDigisAnalyzer.h.

Referenced by fillECal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehHcalAEE[4]
private

Definition at line 172 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehHcalAEESHE[4]
private

Definition at line 174 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehHcaln[4]
private

Definition at line 171 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehHcalSHE[4]
private

Definition at line 173 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehHcalSHEvAEE[4]
private

Definition at line 175 of file GlobalDigisAnalyzer.h.

Referenced by fillHCal(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehRPCMuonn
private

Definition at line 222 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehRPCRes[5]
private

Definition at line 223 of file GlobalDigisAnalyzer.h.

Referenced by fillMuon(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehSiPixelADC[7]
private

Definition at line 192 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehSiPixelCol[7]
private

Definition at line 194 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehSiPixeln[7]
private

Definition at line 191 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehSiPixelRow[7]
private

Definition at line 193 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehSiStripADC[19]
private

Definition at line 184 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehSiStripn[19]
private

Definition at line 183 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

MonitorElement* GlobalDigisAnalyzer::mehSiStripStrip[19]
private

Definition at line 185 of file GlobalDigisAnalyzer.h.

Referenced by fillTrk(), and GlobalDigisAnalyzer().

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 144 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