CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GlobalHitsHistogrammer Class Reference

#include <GlobalHitsHistogrammer.h>

Inheritance diagram for GlobalHitsHistogrammer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob (void)
 
virtual void endJob ()
 
 GlobalHitsHistogrammer (const edm::ParameterSet &)
 
virtual ~GlobalHitsHistogrammer ()
 
- 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 Attributes

unsigned int count
 
DQMStoredbe
 
bool doOutput
 
std::string fName
 
int frequency
 
bool getAllProvenances
 
edm::InputTag GlobalHitSrc_
 
edm::EDGetTokenT< PGlobalSimHitGlobalHitSrc_Token_
 
std::string label
 
MonitorElementmeCaloEcal [2]
 
MonitorElementmeCaloEcalE [2]
 
MonitorElementmeCaloEcalEta
 
MonitorElementmeCaloEcalPhi
 
MonitorElementmeCaloEcalToF [2]
 
MonitorElementmeCaloHcal [2]
 
MonitorElementmeCaloHcalE [2]
 
MonitorElementmeCaloHcalEta
 
MonitorElementmeCaloHcalPhi
 
MonitorElementmeCaloHcalToF [2]
 
MonitorElementmeCaloPreSh [2]
 
MonitorElementmeCaloPreShE [2]
 
MonitorElementmeCaloPreShEta
 
MonitorElementmeCaloPreShPhi
 
MonitorElementmeCaloPreShToF [2]
 
MonitorElementmeGeantTrkE
 
MonitorElementmeGeantTrkPt
 
MonitorElementmeGeantVtxX [2]
 
MonitorElementmeGeantVtxY [2]
 
MonitorElementmeGeantVtxZ [2]
 
MonitorElementmeMCG4Trk [2]
 
MonitorElementmeMCG4Vtx [2]
 
MonitorElementmeMCRGP [2]
 
MonitorElementmeMuon [2]
 
MonitorElementmeMuonCscToF [2]
 
MonitorElementmeMuonCscZ
 
MonitorElementmeMuonDtR
 
MonitorElementmeMuonDtToF [2]
 
MonitorElementmeMuonEta
 
MonitorElementmeMuonPhi
 
MonitorElementmeMuonRpcBR
 
MonitorElementmeMuonRpcBToF [2]
 
MonitorElementmeMuonRpcFToF [2]
 
MonitorElementmeMuonRpcFZ
 
MonitorElementmeTrackerPx [2]
 
MonitorElementmeTrackerPxBR
 
MonitorElementmeTrackerPxBToF
 
MonitorElementmeTrackerPxEta
 
MonitorElementmeTrackerPxFToF
 
MonitorElementmeTrackerPxFZ
 
MonitorElementmeTrackerPxPhi
 
MonitorElementmeTrackerSi [2]
 
MonitorElementmeTrackerSiBR
 
MonitorElementmeTrackerSiBToF
 
MonitorElementmeTrackerSiEta
 
MonitorElementmeTrackerSiFToF
 
MonitorElementmeTrackerSiFZ
 
MonitorElementmeTrackerSiPhi
 
int nMuonCscHits
 
int nMuonDtHits
 
int nMuonHits
 
int nMuonRpcBrlHits
 
int nMuonRpcFwdHits
 
int nPxlBrlHits
 
int nPxlFwdHits
 
int nPxlHits
 
int nSiBrlHits
 
int nSiFwdHits
 
int nSiHits
 
std::string outputfile
 
bool printProvenanceInfo
 
int verbosity
 
int vtxunit
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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

Class to fill dqm monitor elements from existing EDM file

Author
M. Strang SUNY-Buffalo

Definition at line 74 of file GlobalHitsHistogrammer.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file GlobalHitsHistogrammer.cc.

References DQMStore::book1D(), dbe, doOutput, fName, frequency, getAllProvenances, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), GlobalHitSrc_, GlobalHitSrc_Token_, i, meCaloEcal, meCaloEcalE, meCaloEcalEta, meCaloEcalPhi, meCaloEcalToF, meCaloHcal, meCaloHcalE, meCaloHcalEta, meCaloHcalPhi, meCaloHcalToF, meCaloPreSh, meCaloPreShE, meCaloPreShEta, meCaloPreShPhi, meCaloPreShToF, meGeantTrkE, meGeantTrkPt, meGeantVtxX, meGeantVtxY, meGeantVtxZ, meMCG4Trk, meMCG4Vtx, meMCRGP, meMuon, meMuonCscToF, meMuonCscZ, meMuonDtR, meMuonDtToF, meMuonEta, meMuonPhi, meMuonRpcBR, meMuonRpcBToF, meMuonRpcFToF, meMuonRpcFZ, meTrackerPx, meTrackerPxBR, meTrackerPxBToF, meTrackerPxEta, meTrackerPxFToF, meTrackerPxFZ, meTrackerPxPhi, meTrackerSi, meTrackerSiBR, meTrackerSiBToF, meTrackerSiEta, meTrackerSiFToF, meTrackerSiFZ, meTrackerSiPhi, cppFunctionSkipper::operator, outputfile, printProvenanceInfo, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), AlCaHLTBitMon_QueryRunRegistry::string, verbosity, and vtxunit.

12  : fName(""), verbosity(0), frequency(0), vtxunit(0), label(""),
14 {
15  std::string MsgLoggerCat = "GlobalHitsHistogrammer_GlobalHitsHistogrammer";
16 
17  // get information from parameter set
18  fName = iPSet.getUntrackedParameter<std::string>("Name");
19  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
20  frequency = iPSet.getUntrackedParameter<int>("Frequency");
21  vtxunit = iPSet.getUntrackedParameter<int>("VtxUnit");
22  outputfile = iPSet.getParameter<std::string>("OutputFile");
23  doOutput = iPSet.getParameter<bool>("DoOutput");
24  edm::ParameterSet m_Prov =
25  iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
27  m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
29  m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
30 
31  //get Labels to use to extract information
32  GlobalHitSrc_ = iPSet.getParameter<edm::InputTag>("GlobalHitSrc");
33  // fix for consumes
34  GlobalHitSrc_Token_ = consumes<PGlobalSimHit>(iPSet.getParameter<edm::InputTag>("GlobalHitSrc"));
35 
36  // use value of first digit to determine default output level (inclusive)
37  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
38  verbosity %= 10;
39 
40  // print out Parameter Set information being used
41  if (verbosity >= 0) {
42  edm::LogInfo(MsgLoggerCat)
43  << "\n===============================\n"
44  << "Initialized as EDAnalyzer with parameter values:\n"
45  << " Name = " << fName << "\n"
46  << " Verbosity = " << verbosity << "\n"
47  << " Frequency = " << frequency << "\n"
48  << " VtxUnit = " << vtxunit << "\n"
49  << " OutputFile = " << outputfile << "\n"
50  << " DoOutput = " << doOutput << "\n"
51  << " GetProv = " << getAllProvenances << "\n"
52  << " PrintProv = " << printProvenanceInfo << "\n"
53  << " GlobalHitSrc = " << GlobalHitSrc_.label()
54  << ":" << GlobalHitSrc_.instance() << "\n"
55  << "===============================\n";
56  }
57 
58  // get dqm info
59  dbe = 0;
61  if (dbe) {
62  if (verbosity > 0 ) {
63  dbe->setVerbose(1);
64  } else {
65  dbe->setVerbose(0);
66  }
67  }
68 
69  if (dbe) {
70  if (verbosity > 0 ) dbe->showDirStructure();
71  }
72 
73  // initialize monitor elements
74  for (Int_t i = 0; i < 2; ++i) {
75  meMCRGP[i] = 0;
76  meMCG4Vtx[i] = 0;
77  meGeantVtxX[i] = 0;
78  meGeantVtxY[i] = 0;
79  meGeantVtxZ[i] = 0;
80  meMCG4Trk[i] = 0;
81  meCaloEcal[i] = 0;
82  meCaloEcalE[i] = 0;
83  meCaloEcalToF[i] = 0;
84  meCaloPreSh[i] = 0;
85  meCaloPreShE[i] = 0;
86  meCaloPreShToF[i] = 0;
87  meCaloHcal[i] = 0;
88  meCaloHcalE[i] = 0;
89  meCaloHcalToF[i] = 0;
90  meTrackerPx[i] = 0;
91  meTrackerSi[i] = 0;
92  meMuon[i] = 0;
93  meMuonDtToF[i] = 0;
94  meMuonCscToF[i] = 0;
95  meMuonRpcFToF[i] = 0;
96  meMuonRpcBToF[i] = 0;
97  }
98  meGeantTrkPt = 0;
99  meGeantTrkE = 0;
100  meCaloEcalPhi = 0;
101  meCaloEcalEta = 0;
102  meCaloPreShPhi = 0;
103  meCaloPreShEta = 0;
104  meCaloHcalPhi = 0;
105  meCaloHcalEta = 0;
106  meTrackerPxPhi = 0;
107  meTrackerPxEta = 0;
108  meTrackerPxBToF = 0;
109  meTrackerPxBR = 0;
110  meTrackerPxFToF = 0;
111  meTrackerPxFZ = 0;
112  meTrackerSiPhi = 0;
113  meTrackerSiEta = 0;
114  meTrackerSiBToF = 0;
115  meTrackerSiBR = 0;
116  meTrackerSiFToF = 0;
117  meTrackerSiFZ = 0;
118  meMuonPhi = 0;
119  meMuonEta = 0;
120  meMuonDtR = 0;
121  meMuonCscZ = 0;
122  meMuonRpcBR = 0;
123  meMuonRpcFZ = 0;
124 
125  //create histograms
126  Char_t hname[200];
127  Char_t htitle[200];
128  if (dbe) {
129 
130  // MCGeant
131  dbe->setCurrentFolder("GlobalHitsV/MCGeant");
132  sprintf(hname,"hMCRGP1");
133  sprintf(htitle,"RawGenParticles");
134  meMCRGP[0] = dbe->book1D(hname,htitle,100,0.,5000.);
135  sprintf(hname,"hMCRGP2");
136  meMCRGP[1] = dbe->book1D(hname,htitle,100,0.,500.);
137  for (Int_t i = 0; i < 2; ++i) {
138  meMCRGP[i]->setAxisTitle("Number of Raw Generated Particles",1);
139  meMCRGP[i]->setAxisTitle("Count",2);
140  }
141 
142  sprintf(hname,"hMCG4Vtx1");
143  sprintf(htitle,"G4 Vertices");
144  meMCG4Vtx[0] = dbe->book1D(hname,htitle,100,0.,50000.);
145  sprintf(hname,"hMCG4Vtx2");
146  meMCG4Vtx[1] = dbe->book1D(hname,htitle,100,-0.5,99.5);
147  for (Int_t i = 0; i < 2; ++i) {
148  meMCG4Vtx[i]->setAxisTitle("Number of Vertices",1);
149  meMCG4Vtx[i]->setAxisTitle("Count",2);
150  }
151 
152  sprintf(hname,"hMCG4Trk1");
153  sprintf(htitle,"G4 Tracks");
154  meMCG4Trk[0] = dbe->book1D(hname,htitle,150,0.,15000.);
155  sprintf(hname,"hMCG4Trk2");
156  meMCG4Trk[1] = dbe->book1D(hname,htitle,150,-0.5,99.5);
157  for (Int_t i = 0; i < 2; ++i) {
158  meMCG4Trk[i]->setAxisTitle("Number of Tracks",1);
159  meMCG4Trk[i]->setAxisTitle("Count",2);
160  }
161 
162  sprintf(hname,"hGeantVtxX1");
163  sprintf(htitle,"Geant vertex x/micrometer");
164  meGeantVtxX[0] = dbe->book1D(hname,htitle,100,-8000000.,8000000.);
165  sprintf(hname,"hGeantVtxX2");
166  meGeantVtxX[1] = dbe->book1D(hname,htitle,100,-50.,50.);
167  for (Int_t i = 0; i < 2; ++i) {
168  meGeantVtxX[i]->setAxisTitle("x of Vertex (um)",1);
169  meGeantVtxX[i]->setAxisTitle("Count",2);
170  }
171 
172  sprintf(hname,"hGeantVtxY1");
173  sprintf(htitle,"Geant vertex y/micrometer");
174  meGeantVtxY[0] = dbe->book1D(hname,htitle,100,-8000000,8000000.);
175  sprintf(hname,"hGeantVtxY2");
176  meGeantVtxY[1] = dbe->book1D(hname,htitle,100,-50.,50.);
177  for (Int_t i = 0; i < 2; ++i) {
178  meGeantVtxY[i]->setAxisTitle("y of Vertex (um)",1);
179  meGeantVtxY[i]->setAxisTitle("Count",2);
180  }
181 
182  sprintf(hname,"hGeantVtxZ1");
183  sprintf(htitle,"Geant vertex z/millimeter");
184  meGeantVtxZ[0] = dbe->book1D(hname,htitle,100,-11000.,11000.);
185  sprintf(hname,"hGeantVtxZ2");
186  meGeantVtxZ[1] = dbe->book1D(hname,htitle,100,-250.,250.);
187  for (Int_t i = 0; i < 2; ++i) {
188  meGeantVtxZ[i]->setAxisTitle("z of Vertex (mm)",1);
189  meGeantVtxZ[i]->setAxisTitle("Count",2);
190  }
191 
192  sprintf(hname,"hGeantTrkPt");
193  sprintf(htitle,"Geant track pt/GeV");
194  meGeantTrkPt = dbe->book1D(hname,htitle,100,0.,200.);
195  meGeantTrkPt->setAxisTitle("pT of Track (GeV)",1);
196  meGeantTrkPt->setAxisTitle("Count",2);
197 
198  sprintf(hname,"hGeantTrkE");
199  sprintf(htitle,"Geant track E/GeV");
200  meGeantTrkE = dbe->book1D(hname,htitle,100,0.,5000.);
201  meGeantTrkE->setAxisTitle("E of Track (GeV)",1);
202  meGeantTrkE->setAxisTitle("Count",2);
203 
204  // ECal
205  dbe->setCurrentFolder("GlobalHitsV/ECals");
206  sprintf(hname,"hCaloEcal1");
207  sprintf(htitle,"Ecal hits");
208  meCaloEcal[0] = dbe->book1D(hname,htitle,100,0.,10000.);
209  sprintf(hname,"hCaloEcal2");
210  meCaloEcal[1] = dbe->book1D(hname,htitle,100,-0.5,99.5);
211 
212  sprintf(hname,"hCaloEcalE1");
213  sprintf(htitle,"Ecal hits, energy/GeV");
214  meCaloEcalE[0] = dbe->book1D(hname,htitle,100,0.,10.);
215  sprintf(hname,"hCaloEcalE2");
216  meCaloEcalE[1] = dbe->book1D(hname,htitle,100,0.,0.1);
217 
218  sprintf(hname,"hCaloEcalToF1");
219  sprintf(htitle,"Ecal hits, ToF/ns");
220  meCaloEcalToF[0] = dbe->book1D(hname,htitle,100,0.,1000.);
221  sprintf(hname,"hCaloEcalToF2");
222  meCaloEcalToF[1] = dbe->book1D(hname,htitle,100,0.,100.);
223 
224  for (Int_t i = 0; i < 2; ++i) {
225  meCaloEcal[i]->setAxisTitle("Number of Hits",1);
226  meCaloEcal[i]->setAxisTitle("Count",2);
227  meCaloEcalE[i]->setAxisTitle("Energy of Hits (GeV)",1);
228  meCaloEcalE[i]->setAxisTitle("Count",2);
229  meCaloEcalToF[i]->setAxisTitle("Time of Flight of Hits (ns)",1);
230  meCaloEcalToF[i]->setAxisTitle("Count",2);
231  }
232 
233  sprintf(hname,"hCaloEcalPhi");
234  sprintf(htitle,"Ecal hits, phi/rad");
235  meCaloEcalPhi = dbe->book1D(hname,htitle,100,-3.2,3.2);
236  meCaloEcalPhi->setAxisTitle("Phi of Hits (rad)",1);
237  meCaloEcalPhi->setAxisTitle("Count",2);
238 
239  sprintf(hname,"hCaloEcalEta");
240  sprintf(htitle,"Ecal hits, eta");
241  meCaloEcalEta = dbe->book1D(hname,htitle,100,-5.5,5.5);
242  meCaloEcalEta->setAxisTitle("Eta of Hits",1);
243  meCaloEcalEta->setAxisTitle("Count",2);
244 
245  sprintf(hname,"hCaloPreSh1");
246  sprintf(htitle,"PreSh hits");
247  meCaloPreSh[0] = dbe->book1D(hname,htitle,100,0.,10000.);
248  sprintf(hname,"hCaloPreSh2");
249  meCaloPreSh[1] = dbe->book1D(hname,htitle,100,-0.5,99.5);
250 
251  sprintf(hname,"hCaloPreShE1");
252  sprintf(htitle,"PreSh hits, energy/GeV");
253  meCaloPreShE[0] = dbe->book1D(hname,htitle,100,0.,10.);
254  sprintf(hname,"hCaloPreShE2");
255  meCaloPreShE[1] = dbe->book1D(hname,htitle,100,0.,0.1);
256 
257  sprintf(hname,"hCaloPreShToF1");
258  sprintf(htitle,"PreSh hits, ToF/ns");
259  meCaloPreShToF[0] = dbe->book1D(hname,htitle,100,0.,1000.);
260  sprintf(hname,"hCaloPreShToF2");
261  meCaloPreShToF[1] = dbe->book1D(hname,htitle,100,0.,100.);
262 
263  for (Int_t i = 0; i < 2; ++i) {
264  meCaloPreSh[i]->setAxisTitle("Number of Hits",1);
265  meCaloPreSh[i]->setAxisTitle("Count",2);
266  meCaloPreShE[i]->setAxisTitle("Energy of Hits (GeV)",1);
267  meCaloPreShE[i]->setAxisTitle("Count",2);
268  meCaloPreShToF[i]->setAxisTitle("Time of Flight of Hits (ns)",1);
269  meCaloPreShToF[i]->setAxisTitle("Count",2);
270  }
271 
272  sprintf(hname,"hCaloPreShPhi");
273  sprintf(htitle,"PreSh hits, phi/rad");
274  meCaloPreShPhi = dbe->book1D(hname,htitle,100,-3.2,3.2);
275  meCaloPreShPhi->setAxisTitle("Phi of Hits (rad)",1);
276  meCaloPreShPhi->setAxisTitle("Count",2);
277 
278  sprintf(hname,"hCaloPreShEta");
279  sprintf(htitle,"PreSh hits, eta");
280  meCaloPreShEta = dbe->book1D(hname,htitle,100,-5.5,5.5);
281  meCaloPreShEta->setAxisTitle("Eta of Hits",1);
282  meCaloPreShEta->setAxisTitle("Count",2);
283 
284  // Hcal
285  dbe->setCurrentFolder("GlobalHitsV/HCals");
286  sprintf(hname,"hCaloHcal1");
287  sprintf(htitle,"Hcal hits");
288  meCaloHcal[0] = dbe->book1D(hname,htitle,100,0.,10000.);
289  sprintf(hname,"hCaloHcal2");
290  meCaloHcal[1] = dbe->book1D(hname,htitle,100,-0.5,99.5);
291 
292  sprintf(hname,"hCaloHcalE1");
293  sprintf(htitle,"Hcal hits, energy/GeV");
294  meCaloHcalE[0] = dbe->book1D(hname,htitle,100,0.,10.);
295  sprintf(hname,"hCaloHcalE2");
296  meCaloHcalE[1] = dbe->book1D(hname,htitle,100,0.,0.1);
297 
298  sprintf(hname,"hCaloHcalToF1");
299  sprintf(htitle,"Hcal hits, ToF/ns");
300  meCaloHcalToF[0] = dbe->book1D(hname,htitle,100,0.,1000.);
301  sprintf(hname,"hCaloHcalToF2");
302  meCaloHcalToF[1] = dbe->book1D(hname,htitle,100,0.,100.);
303 
304  for (Int_t i = 0; i < 2; ++i) {
305  meCaloHcal[i]->setAxisTitle("Number of Hits",1);
306  meCaloHcal[i]->setAxisTitle("Count",2);
307  meCaloHcalE[i]->setAxisTitle("Energy of Hits (GeV)",1);
308  meCaloHcalE[i]->setAxisTitle("Count",2);
309  meCaloHcalToF[i]->setAxisTitle("Time of Flight of Hits (ns)",1);
310  meCaloHcalToF[i]->setAxisTitle("Count",2);
311  }
312 
313  sprintf(hname,"hCaloHcalPhi");
314  sprintf(htitle,"Hcal hits, phi/rad");
315  meCaloHcalPhi = dbe->book1D(hname,htitle,100,-3.2,3.2);
316  meCaloHcalPhi->setAxisTitle("Phi of Hits (rad)",1);
317  meCaloHcalPhi->setAxisTitle("Count",2);
318 
319  sprintf(hname,"hCaloHcalEta");
320  sprintf(htitle,"Hcal hits, eta");
321  meCaloHcalEta = dbe->book1D(hname,htitle,100,-5.5,5.5);
322  meCaloHcalEta->setAxisTitle("Eta of Hits",1);
323  meCaloHcalEta->setAxisTitle("Count",2);
324 
325  // SiPixels
326  dbe->setCurrentFolder("GlobalHitsV/SiPixels");
327  sprintf(hname,"hTrackerPx1");
328  sprintf(htitle,"Pixel hits");
329  meTrackerPx[0] = dbe->book1D(hname,htitle,100,0.,10000.);
330  sprintf(hname,"hTrackerPx2");
331  meTrackerPx[1] = dbe->book1D(hname,htitle,100,-0.5,99.5);
332  for (Int_t i = 0; i < 2; ++i) {
333  meTrackerPx[i]->setAxisTitle("Number of Pixel Hits",1);
334  meTrackerPx[i]->setAxisTitle("Count",2);
335  }
336 
337  sprintf(hname,"hTrackerPxPhi");
338  sprintf(htitle,"Pixel hits phi/rad");
339  meTrackerPxPhi = dbe->book1D(hname,htitle,100,-3.2,3.2);
340  meTrackerPxPhi->setAxisTitle("Phi of Hits (rad)",1);
341  meTrackerPxPhi->setAxisTitle("Count",2);
342 
343  sprintf(hname,"hTrackerPxEta");
344  sprintf(htitle,"Pixel hits eta");
345  meTrackerPxEta = dbe->book1D(hname,htitle,100,-3.5,3.5);
346  meTrackerPxEta->setAxisTitle("Eta of Hits",1);
347  meTrackerPxEta->setAxisTitle("Count",2);
348 
349  sprintf(hname,"hTrackerPxBToF");
350  sprintf(htitle,"Pixel barrel hits, ToF/ns");
351  meTrackerPxBToF = dbe->book1D(hname,htitle,100,0.,40.);
352  meTrackerPxBToF->setAxisTitle("Time of Flight of Hits (ns)",1);
353  meTrackerPxBToF->setAxisTitle("Count",2);
354 
355  sprintf(hname,"hTrackerPxBR");
356  sprintf(htitle,"Pixel barrel hits, R/cm");
357  meTrackerPxBR = dbe->book1D(hname,htitle,100,0.,50.);
358  meTrackerPxBR->setAxisTitle("R of Hits (cm)",1);
359  meTrackerPxBR->setAxisTitle("Count",2);
360 
361  sprintf(hname,"hTrackerPxFToF");
362  sprintf(htitle,"Pixel forward hits, ToF/ns");
363  meTrackerPxFToF = dbe->book1D(hname,htitle,100,0.,50.);
364  meTrackerPxFToF->setAxisTitle("Time of Flight of Hits (ns)",1);
365  meTrackerPxFToF->setAxisTitle("Count",2);
366 
367  sprintf(hname,"hTrackerPxFZ");
368  sprintf(htitle,"Pixel forward hits, Z/cm");
369  meTrackerPxFZ = dbe->book1D(hname,htitle,200,-100.,100.);
370  meTrackerPxFZ->setAxisTitle("Z of Hits (cm)",1);
371  meTrackerPxFZ->setAxisTitle("Count",2);
372 
373  // SiStrips
374  dbe->setCurrentFolder("GlobalHitsV/SiPixels");
375  sprintf(hname,"hTrackerSi1");
376  sprintf(htitle,"Silicon hits");
377  meTrackerSi[0] = dbe->book1D(hname,htitle,100,0.,10000.);
378  sprintf(hname,"hTrackerSi2");
379  meTrackerSi[1] = dbe->book1D(hname,htitle,100,-0.5,99.5);
380  for (Int_t i = 0; i < 2; ++i) {
381  meTrackerSi[i]->setAxisTitle("Number of Silicon Hits",1);
382  meTrackerSi[i]->setAxisTitle("Count",2);
383  }
384 
385  sprintf(hname,"hTrackerSiPhi");
386  sprintf(htitle,"Silicon hits phi/rad");
387  meTrackerSiPhi = dbe->book1D(hname,htitle,100,-3.2,3.2);
388  meTrackerSiPhi->setAxisTitle("Phi of Hits (rad)",1);
389  meTrackerSiPhi->setAxisTitle("Count",2);
390 
391  sprintf(hname,"hTrackerSiEta");
392  sprintf(htitle,"Silicon hits eta");
393  meTrackerSiEta = dbe->book1D(hname,htitle,100,-3.5,3.5);
394  meTrackerSiEta->setAxisTitle("Eta of Hits",1);
395  meTrackerSiEta->setAxisTitle("Count",2);
396 
397  sprintf(hname,"hTrackerSiBToF");
398  sprintf(htitle,"Silicon barrel hits, ToF/ns");
399  meTrackerSiBToF = dbe->book1D(hname,htitle,100,0.,50.);
400  meTrackerSiBToF->setAxisTitle("Time of Flight of Hits (ns)",1);
401  meTrackerSiBToF->setAxisTitle("Count",2);
402 
403  sprintf(hname,"hTrackerSiBR");
404  sprintf(htitle,"Silicon barrel hits, R/cm");
405  meTrackerSiBR = dbe->book1D(hname,htitle,100,0.,200.);
406  meTrackerSiBR->setAxisTitle("R of Hits (cm)",1);
407  meTrackerSiBR->setAxisTitle("Count",2);
408 
409  sprintf(hname,"hTrackerSiFToF");
410  sprintf(htitle,"Silicon forward hits, ToF/ns");
411  meTrackerSiFToF = dbe->book1D(hname,htitle,100,0.,75.);
412  meTrackerSiFToF->setAxisTitle("Time of Flight of Hits (ns)",1);
413  meTrackerSiFToF->setAxisTitle("Count",2);
414 
415  sprintf(hname,"hTrackerSiFZ");
416  sprintf(htitle,"Silicon forward hits, Z/cm");
417  meTrackerSiFZ = dbe->book1D(hname,htitle,200,-300.,300.);
418  meTrackerSiFZ->setAxisTitle("Z of Hits (cm)",1);
419  meTrackerSiFZ->setAxisTitle("Count",2);
420 
421  // muon
422  dbe->setCurrentFolder("GlobalHitsV/Muons");
423  sprintf(hname,"hMuon1");
424  sprintf(htitle,"Muon hits");
425  meMuon[0] = dbe->book1D(hname,htitle,100,0.,10000.);
426  sprintf(hname,"hMuon2");
427  meMuon[1] = dbe->book1D(hname,htitle,100,-0.5,99.5);
428  for (Int_t i = 0; i < 2; ++i) {
429  meMuon[i]->setAxisTitle("Number of Muon Hits",1);
430  meMuon[i]->setAxisTitle("Count",2);
431  }
432 
433  sprintf(hname,"hMuonPhi");
434  sprintf(htitle,"Muon hits phi/rad");
435  meMuonPhi = dbe->book1D(hname,htitle,100,-3.2,3.2);
436  meMuonPhi->setAxisTitle("Phi of Hits (rad)",1);
437  meMuonPhi->setAxisTitle("Count",2);
438 
439  sprintf(hname,"hMuonEta");
440  sprintf(htitle,"Muon hits eta");
441  meMuonEta = dbe->book1D(hname,htitle,100,-3.5,3.5);
442  meMuonEta->setAxisTitle("Eta of Hits",1);
443  meMuonEta->setAxisTitle("Count",2);
444 
445  sprintf(hname,"hMuonCscToF1");
446  sprintf(htitle,"Muon CSC hits, ToF/ns");
447  meMuonCscToF[0] = dbe->book1D(hname,htitle,100,0.,250.);
448  sprintf(hname,"hMuonCscToF2");
449  meMuonCscToF[1] = dbe->book1D(hname,htitle,100,0.,50.);
450  for (Int_t i = 0; i < 2; ++i) {
451  meMuonCscToF[i]->setAxisTitle("Time of Flight of Hits (ns)",1);
452  meMuonCscToF[i]->setAxisTitle("Count",2);
453  }
454 
455  sprintf(hname,"hMuonCscZ");
456  sprintf(htitle,"Muon CSC hits, Z/cm");
457  meMuonCscZ = dbe->book1D(hname,htitle,200,-1500.,1500.);
458  meMuonCscZ->setAxisTitle("Z of Hits (cm)",1);
459  meMuonCscZ->setAxisTitle("Count",2);
460 
461  sprintf(hname,"hMuonDtToF1");
462  sprintf(htitle,"Muon DT hits, ToF/ns");
463  meMuonDtToF[0] = dbe->book1D(hname,htitle,100,0.,250.);
464  sprintf(hname,"hMuonDtToF2");
465  meMuonDtToF[1] = dbe->book1D(hname,htitle,100,0.,50.);
466  for (Int_t i = 0; i < 2; ++i) {
467  meMuonDtToF[i]->setAxisTitle("Time of Flight of Hits (ns)",1);
468  meMuonDtToF[i]->setAxisTitle("Count",2);
469  }
470 
471  sprintf(hname,"hMuonDtR");
472  sprintf(htitle,"Muon DT hits, R/cm");
473  meMuonDtR = dbe->book1D(hname,htitle,100,0.,1500.);
474  meMuonDtR->setAxisTitle("R of Hits (cm)",1);
475  meMuonDtR->setAxisTitle("Count",2);
476 
477  sprintf(hname,"hMuonRpcFToF1");
478  sprintf(htitle,"Muon RPC forward hits, ToF/ns");
479  meMuonRpcFToF[0] = dbe->book1D(hname,htitle,100,0.,250.);
480  sprintf(hname,"hMuonRpcFToF2_4305");
481  meMuonRpcFToF[1] = dbe->book1D(hname,htitle,100,0.,50.);
482  for (Int_t i = 0; i < 2; ++i) {
483  meMuonRpcFToF[i]->setAxisTitle("Time of Flight of Hits (ns)",1);
484  meMuonRpcFToF[i]->setAxisTitle("Count",2);
485  }
486 
487  sprintf(hname,"hMuonRpcFZ");
488  sprintf(htitle,"Muon RPC forward hits, Z/cm");
489  meMuonRpcFZ = dbe->book1D(hname,htitle,201,-1500.,1500.);
490  meMuonRpcFZ->setAxisTitle("Z of Hits (cm)",1);
491  meMuonRpcFZ->setAxisTitle("Count",2);
492 
493  sprintf(hname,"hMuonRpcBToF1");
494  sprintf(htitle,"Muon RPC barrel hits, ToF/ns");
495  meMuonRpcBToF[0] = dbe->book1D(hname,htitle,100,0.,250.);
496  sprintf(hname,"hMuonRpcBToF2");
497  meMuonRpcBToF[1] = dbe->book1D(hname,htitle,100,0.,50.);
498  for (Int_t i = 0; i < 2; ++i) {
499  meMuonRpcBToF[i]->setAxisTitle("Time of Flight of Hits (ns)",1);
500  meMuonRpcBToF[i]->setAxisTitle("Count",2);
501  }
502 
503  sprintf(hname,"hMuonRpcBR");
504  sprintf(htitle,"Muon RPC barrel hits, R/cm");
505  meMuonRpcBR = dbe->book1D(hname,htitle,100,0.,1500.);
506  meMuonRpcBR->setAxisTitle("R of Hits (cm)",1);
507  meMuonRpcBR->setAxisTitle("Count",2);
508  }
509 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * meMCG4Vtx[2]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
MonitorElement * meCaloHcal[2]
MonitorElement * meCaloEcalE[2]
MonitorElement * meMuonRpcBToF[2]
MonitorElement * meCaloPreSh[2]
MonitorElement * meMuonCscToF[2]
MonitorElement * meGeantVtxY[2]
MonitorElement * meMuonDtToF[2]
MonitorElement * meCaloPreShE[2]
void setVerbose(unsigned level)
Definition: DQMStore.cc:631
MonitorElement * meCaloHcalE[2]
MonitorElement * meTrackerSi[2]
MonitorElement * meMCG4Trk[2]
MonitorElement * meCaloEcal[2]
MonitorElement * meCaloPreShToF[2]
std::string const & label() const
Definition: InputTag.h:42
edm::EDGetTokenT< PGlobalSimHit > GlobalHitSrc_Token_
MonitorElement * meCaloEcalToF[2]
MonitorElement * meMuonRpcFToF[2]
MonitorElement * meTrackerPx[2]
void showDirStructure(void) const
Definition: DQMStore.cc:3332
MonitorElement * meGeantVtxZ[2]
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
MonitorElement * meGeantVtxX[2]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
MonitorElement * meCaloHcalToF[2]
GlobalHitsHistogrammer::~GlobalHitsHistogrammer ( )
virtual

Definition at line 511 of file GlobalHitsHistogrammer.cc.

References dbe, doOutput, outputfile, and DQMStore::save().

512 {
513  if (doOutput)
514  if (outputfile.size() != 0 && dbe) dbe->save(outputfile);
515 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2540

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 531 of file GlobalHitsHistogrammer.cc.

References count, alignCSCRings::e, eta(), edm::EventID::event(), MonitorElement::Fill(), frequency, edm::Event::getAllProvenance(), getAllProvenances, edm::Event::getByToken(), GlobalHitSrc_Token_, i, edm::EventBase::id(), edm::HandleBase::isValid(), j, meCaloEcal, meCaloEcalE, meCaloEcalEta, meCaloEcalPhi, meCaloEcalToF, meCaloHcal, meCaloHcalE, meCaloHcalEta, meCaloHcalPhi, meCaloHcalToF, meCaloPreSh, meCaloPreShE, meCaloPreShEta, meCaloPreShPhi, meCaloPreShToF, meGeantTrkE, meGeantTrkPt, meGeantVtxX, meGeantVtxY, meGeantVtxZ, meMCG4Trk, meMCG4Vtx, meMCRGP, meMuon, meMuonCscToF, meMuonCscZ, meMuonDtR, meMuonDtToF, meMuonEta, meMuonPhi, meMuonRpcBR, meMuonRpcBToF, meMuonRpcFToF, meMuonRpcFZ, meTrackerPx, meTrackerPxBR, meTrackerPxBToF, meTrackerPxEta, meTrackerPxFToF, meTrackerPxFZ, meTrackerPxPhi, meTrackerSi, meTrackerSiBR, meTrackerSiBToF, meTrackerSiEta, meTrackerSiFToF, meTrackerSiFZ, meTrackerSiPhi, nevt, nMuonCscHits, nMuonDtHits, nMuonHits, nMuonRpcBrlHits, nMuonRpcFwdHits, nPxlBrlHits, nPxlFwdHits, nPxlHits, nSiBrlHits, nSiFwdHits, nSiHits, phi, printProvenanceInfo, RecoTauCleanerPlugins::pt, alignCSCRings::r, edm::EventID::run(), AlCaHLTBitMon_QueryRunRegistry::string, verbosity, x, detailsBasic3DVector::y, and detailsBasic3DVector::z.

533 {
534  std::string MsgLoggerCat = "GlobalHitsHistogrammer_analyze";
535 
536  // keep track of number of events processed
537  ++count;
538 
539  // get event id information
540  int nrun = iEvent.id().run();
541  int nevt = iEvent.id().event();
542 
543  if (verbosity > 0) {
544  edm::LogInfo(MsgLoggerCat)
545  << "Processing run " << nrun << ", event " << nevt
546  << " (" << count << " events total)";
547  } else if (verbosity == 0) {
548  if (nevt%frequency == 0 || nevt == 1) {
549  edm::LogInfo(MsgLoggerCat)
550  << "Processing run " << nrun << ", event " << nevt
551  << " (" << count << " events total)";
552  }
553  }
554 
555  // look at information available in the event
556  if (getAllProvenances) {
557 
558  std::vector<const edm::Provenance*> AllProv;
559  iEvent.getAllProvenance(AllProv);
560 
561  if (verbosity >= 0)
562  edm::LogInfo(MsgLoggerCat)
563  << "Number of Provenances = " << AllProv.size();
564 
565  if (printProvenanceInfo && (verbosity >= 0)) {
566  TString eventout("\nProvenance info:\n");
567 
568  for (unsigned int i = 0; i < AllProv.size(); ++i) {
569  eventout += "\n ******************************";
570  eventout += "\n Module : ";
571  eventout += AllProv[i]->moduleLabel();
572  eventout += "\n ProductID : ";
573  eventout += AllProv[i]->productID().id();
574  eventout += "\n ClassName : ";
575  eventout += AllProv[i]->className();
576  eventout += "\n InstanceName : ";
577  eventout += AllProv[i]->productInstanceName();
578  eventout += "\n BranchName : ";
579  eventout += AllProv[i]->branchName();
580  }
581  eventout += "\n ******************************\n";
582  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
583  printProvenanceInfo = false;
584  }
585  getAllProvenances = false;
586  }
587 
588  // fill histograms
589  edm::Handle<PGlobalSimHit> srcGlobalHits;
590  iEvent.getByToken(GlobalHitSrc_Token_,srcGlobalHits);
591  if (!srcGlobalHits.isValid()) {
592  edm::LogWarning(MsgLoggerCat)
593  << "Unable to find PGlobalSimHit in event!";
594  return;
595  }
596 
597  nPxlBrlHits = srcGlobalHits->getnPxlBrlHits();
598  nPxlFwdHits = srcGlobalHits->getnPxlFwdHits();
600  nSiBrlHits = srcGlobalHits->getnSiBrlHits();
601  nSiFwdHits = srcGlobalHits->getnSiFwdHits();
603  nMuonDtHits = srcGlobalHits->getnMuonDtHits();
604  nMuonCscHits = srcGlobalHits->getnMuonCscHits();
605  nMuonRpcBrlHits = srcGlobalHits->getnMuonRpcBrlHits();
606  nMuonRpcFwdHits = srcGlobalHits->getnMuonRpcFwdHits();
608 
609  for (Int_t i = 0; i < 2; ++i) {
610  meMCRGP[i]->Fill((float)srcGlobalHits->getnRawGenPart());
611  meMCG4Vtx[i]->Fill((float)srcGlobalHits->getnG4Vtx());
612  meMCG4Trk[i]->Fill((float)srcGlobalHits->getnG4Trk());
613  meCaloEcal[i]->Fill((float)srcGlobalHits->getnECalHits());
614  meCaloPreSh[i]->Fill((float)srcGlobalHits->getnPreShHits());
615  meCaloHcal[i]->Fill((float)srcGlobalHits->getnHCalHits());
616  meTrackerPx[i]->Fill((float)nPxlHits);
617  meTrackerSi[i]->Fill((float)nSiHits);
618  meMuon[i]->Fill((float)nMuonHits);
619  }
620 
621  // get G4Vertex info
622  std::vector<PGlobalSimHit::Vtx> G4Vtx = srcGlobalHits->getG4Vtx();
623  for (unsigned int i = 0; i < G4Vtx.size(); ++i) {
624  for (int j = 0; j < 2; ++j) {
625  meGeantVtxX[j]->Fill(G4Vtx[i].x);
626  meGeantVtxY[j]->Fill(G4Vtx[i].y);
627  meGeantVtxZ[j]->Fill(G4Vtx[i].z);
628  }
629  }
630 
631  // get G4Track info
632  std::vector<PGlobalSimHit::Trk> G4Trk = srcGlobalHits->getG4Trk();
633  for (unsigned int i = 0; i < G4Trk.size(); ++i) {
634  meGeantTrkPt->Fill(G4Trk[i].pt);
635  meGeantTrkE->Fill(G4Trk[i].e);
636  }
637 
638  // get Ecal info
639  std::vector<PGlobalSimHit::CalHit> ECalHits =
640  srcGlobalHits->getECalHits();
641  for (unsigned int i = 0; i < ECalHits.size(); ++i) {
642  for (Int_t j = 0; j < 2; ++j) {
643  meCaloEcalE[j]->Fill(ECalHits[i].e);
644  meCaloEcalToF[j]->Fill(ECalHits[i].tof);
645  }
646  meCaloEcalPhi->Fill(ECalHits[i].phi);
647  meCaloEcalEta->Fill(ECalHits[i].eta);
648  }
649 
650  // get PreShower info
651  std::vector<PGlobalSimHit::CalHit> PreShHits =
652  srcGlobalHits->getPreShHits();
653  for (unsigned int i = 0; i < PreShHits.size(); ++i) {
654  for (Int_t j = 0; j < 2; ++j) {
655  meCaloPreShE[j]->Fill(PreShHits[i].e);
656  meCaloPreShToF[j]->Fill(PreShHits[i].tof);
657  }
658  meCaloPreShPhi->Fill(PreShHits[i].phi);
659  meCaloPreShEta->Fill(PreShHits[i].eta);
660  }
661 
662  // get Hcal info
663  std::vector<PGlobalSimHit::CalHit> HCalHits =
664  srcGlobalHits->getHCalHits();
665  for (unsigned int i = 0; i < HCalHits.size(); ++i) {
666  for (Int_t j = 0; j < 2; ++j) {
667  meCaloHcalE[j]->Fill(HCalHits[i].e);
668  meCaloHcalToF[j]->Fill(HCalHits[i].tof);
669  }
670  meCaloHcalPhi->Fill(HCalHits[i].phi);
671  meCaloHcalEta->Fill(HCalHits[i].eta);
672  }
673 
674  // get Pixel Barrel info
675  std::vector<PGlobalSimHit::BrlHit> PxlBrlHits =
676  srcGlobalHits->getPxlBrlHits();
677  for (unsigned int i = 0; i < PxlBrlHits.size(); ++i) {
678  meTrackerPxPhi->Fill(PxlBrlHits[i].phi);
679  meTrackerPxEta->Fill(PxlBrlHits[i].eta);
680  meTrackerPxBToF->Fill(PxlBrlHits[i].tof);
681  meTrackerPxBR->Fill(PxlBrlHits[i].r);
682  }
683 
684  // get Pixel Forward info
685  std::vector<PGlobalSimHit::FwdHit> PxlFwdHits =
686  srcGlobalHits->getPxlFwdHits();
687  for (unsigned int i = 0; i < PxlFwdHits.size(); ++i) {
688  meTrackerPxPhi->Fill(PxlFwdHits[i].phi);
689  meTrackerPxEta->Fill(PxlFwdHits[i].eta);
690  meTrackerPxFToF->Fill(PxlFwdHits[i].tof);
691  meTrackerPxFZ->Fill(PxlFwdHits[i].z);
692  }
693 
694  // get Strip Barrel info
695  std::vector<PGlobalSimHit::BrlHit> SiBrlHits =
696  srcGlobalHits->getSiBrlHits();
697  for (unsigned int i = 0; i < SiBrlHits.size(); ++i) {
698  meTrackerSiPhi->Fill(SiBrlHits[i].phi);
699  meTrackerSiEta->Fill(SiBrlHits[i].eta);
700  meTrackerSiBToF->Fill(SiBrlHits[i].tof);
701  meTrackerSiBR->Fill(SiBrlHits[i].r);
702  }
703 
704  // get Strip Forward info
705  std::vector<PGlobalSimHit::FwdHit> SiFwdHits =
706  srcGlobalHits->getSiFwdHits();
707  for (unsigned int i = 0; i < SiFwdHits.size(); ++i) {
708  meTrackerSiPhi->Fill(SiFwdHits[i].phi);
709  meTrackerSiEta->Fill(SiFwdHits[i].eta);
710  meTrackerSiFToF->Fill(SiFwdHits[i].tof);
711  meTrackerSiFZ->Fill(SiFwdHits[i].z);
712  }
713 
714  // get Muon CSC info
715  std::vector<PGlobalSimHit::FwdHit> MuonCscHits =
716  srcGlobalHits->getMuonCscHits();
717  for (unsigned int i = 0; i < MuonCscHits.size(); ++i) {
718  meMuonPhi->Fill(MuonCscHits[i].phi);
719  meMuonEta->Fill(MuonCscHits[i].eta);
720  for (Int_t j = 0; j < 2; ++j) {
721  meMuonCscToF[j]->Fill(MuonCscHits[i].tof);
722  }
723  meMuonCscZ->Fill(MuonCscHits[i].z);
724  }
725 
726  // get Muon DT info
727  std::vector<PGlobalSimHit::BrlHit> MuonDtHits =
728  srcGlobalHits->getMuonDtHits();
729  for (unsigned int i = 0; i < MuonDtHits.size(); ++i) {
730  meMuonPhi->Fill(MuonDtHits[i].phi);
731  meMuonEta->Fill(MuonDtHits[i].eta);
732  for (Int_t j = 0; j < 2; ++j) {
733  meMuonDtToF[j]->Fill(MuonDtHits[i].tof);
734  }
735  meMuonDtR->Fill(MuonDtHits[i].r);
736  }
737 
738  // get Muon RPC forward info
739  std::vector<PGlobalSimHit::FwdHit> MuonRpcFwdHits =
740  srcGlobalHits->getMuonRpcFwdHits();
741  for (unsigned int i = 0; i < MuonRpcFwdHits.size(); ++i) {
742  meMuonPhi->Fill(MuonRpcFwdHits[i].phi);
743  meMuonEta->Fill(MuonRpcFwdHits[i].eta);
744  for (Int_t j = 0; j < 2; ++j) {
745  meMuonRpcFToF[j]->Fill(MuonRpcFwdHits[i].tof);
746  }
747  meMuonRpcFZ->Fill(MuonRpcFwdHits[i].z);
748  }
749 
750  // get Muon RPC barrel info
751  std::vector<PGlobalSimHit::BrlHit> MuonRpcBrlHits =
752  srcGlobalHits->getMuonRpcBrlHits();
753  for (unsigned int i = 0; i < MuonRpcBrlHits.size(); ++i) {
754  meMuonPhi->Fill(MuonRpcBrlHits[i].phi);
755  meMuonEta->Fill(MuonRpcBrlHits[i].eta);
756  for (Int_t j = 0; j < 2; ++j) {
757  meMuonRpcBToF[j]->Fill(MuonRpcBrlHits[i].tof);
758  }
759  meMuonRpcBR->Fill(MuonRpcBrlHits[i].r);
760  }
761 
762  return;
763 }
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
MonitorElement * meMCG4Vtx[2]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
MonitorElement * meCaloHcal[2]
MonitorElement * meCaloEcalE[2]
T eta() const
MonitorElement * meMuonRpcBToF[2]
float float float z
MonitorElement * meCaloPreSh[2]
void Fill(long long x)
MonitorElement * meMuonCscToF[2]
MonitorElement * meGeantVtxY[2]
MonitorElement * meMuonDtToF[2]
MonitorElement * meCaloPreShE[2]
int j
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:76
MonitorElement * meCaloHcalE[2]
MonitorElement * meTrackerSi[2]
MonitorElement * meMCG4Trk[2]
MonitorElement * meCaloEcal[2]
MonitorElement * meCaloPreShToF[2]
edm::EDGetTokenT< PGlobalSimHit > GlobalHitSrc_Token_
edm::EventID id() const
Definition: EventBase.h:56
MonitorElement * meCaloEcalToF[2]
MonitorElement * meMuonRpcFToF[2]
MonitorElement * meTrackerPx[2]
Definition: DDAxes.h:10
MonitorElement * meGeantVtxZ[2]
MonitorElement * meGeantVtxX[2]
MonitorElement * meCaloHcalToF[2]
Definition: DDAxes.h:10
void GlobalHitsHistogrammer::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 517 of file GlobalHitsHistogrammer.cc.

518 {
519  return;
520 }
void GlobalHitsHistogrammer::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 522 of file GlobalHitsHistogrammer.cc.

References count, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

523 {
524  std::string MsgLoggerCat = "GlobalHitsHistogrammer_endJob";
525  if (verbosity >= 0)
526  edm::LogInfo(MsgLoggerCat)
527  << "Terminating having processed " << count << " events.";
528  return;
529 }

Member Data Documentation

unsigned int GlobalHitsHistogrammer::count
private

Definition at line 188 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and endJob().

DQMStore* GlobalHitsHistogrammer::dbe
private

Definition at line 98 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer(), and ~GlobalHitsHistogrammer().

bool GlobalHitsHistogrammer::doOutput
private

Definition at line 100 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer(), and ~GlobalHitsHistogrammer().

std::string GlobalHitsHistogrammer::fName
private

Definition at line 90 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer().

int GlobalHitsHistogrammer::frequency
private

Definition at line 92 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

bool GlobalHitsHistogrammer::getAllProvenances
private

Definition at line 95 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

edm::InputTag GlobalHitsHistogrammer::GlobalHitSrc_
private

Definition at line 102 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer().

edm::EDGetTokenT<PGlobalSimHit> GlobalHitsHistogrammer::GlobalHitSrc_Token_
private

Definition at line 103 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

std::string GlobalHitsHistogrammer::label
private
MonitorElement* GlobalHitsHistogrammer::meCaloEcal[2]
private

Definition at line 117 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloEcalE[2]
private

Definition at line 118 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloEcalEta
private

Definition at line 121 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloEcalPhi
private

Definition at line 120 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloEcalToF[2]
private

Definition at line 119 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloHcal[2]
private

Definition at line 132 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloHcalE[2]
private

Definition at line 133 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloHcalEta
private

Definition at line 136 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloHcalPhi
private

Definition at line 135 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloHcalToF[2]
private

Definition at line 134 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloPreSh[2]
private

Definition at line 124 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloPreShE[2]
private

Definition at line 125 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloPreShEta
private

Definition at line 128 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloPreShPhi
private

Definition at line 127 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meCaloPreShToF[2]
private

Definition at line 126 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meGeantTrkE
private

Definition at line 113 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meGeantTrkPt
private

Definition at line 112 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meGeantVtxX[2]
private

Definition at line 108 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meGeantVtxY[2]
private

Definition at line 109 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meGeantVtxZ[2]
private

Definition at line 110 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMCG4Trk[2]
private

Definition at line 111 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMCG4Vtx[2]
private

Definition at line 107 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMCRGP[2]
private

Definition at line 106 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuon[2]
private

Definition at line 164 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonCscToF[2]
private

Definition at line 176 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonCscZ
private

Definition at line 177 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonDtR
private

Definition at line 172 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonDtToF[2]
private

Definition at line 171 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonEta
private

Definition at line 166 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonPhi
private

Definition at line 165 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonRpcBR
private

Definition at line 185 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonRpcBToF[2]
private

Definition at line 184 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonRpcFToF[2]
private

Definition at line 182 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meMuonRpcFZ
private

Definition at line 183 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerPx[2]
private

Definition at line 143 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxBR
private

Definition at line 147 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxBToF
private

Definition at line 146 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxEta
private

Definition at line 145 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxFToF
private

Definition at line 148 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxFZ
private

Definition at line 149 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxPhi
private

Definition at line 144 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerSi[2]
private

Definition at line 155 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiBR
private

Definition at line 159 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiBToF
private

Definition at line 158 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiEta
private

Definition at line 157 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiFToF
private

Definition at line 160 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiFZ
private

Definition at line 161 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiPhi
private

Definition at line 156 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

int GlobalHitsHistogrammer::nMuonCscHits
private

Definition at line 175 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nMuonDtHits
private

Definition at line 170 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nMuonHits
private

Definition at line 167 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nMuonRpcBrlHits
private

Definition at line 180 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nMuonRpcFwdHits
private

Definition at line 181 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nPxlBrlHits
private

Definition at line 140 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nPxlFwdHits
private

Definition at line 141 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nPxlHits
private

Definition at line 142 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nSiBrlHits
private

Definition at line 153 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nSiFwdHits
private

Definition at line 154 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nSiHits
private

Definition at line 152 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

std::string GlobalHitsHistogrammer::outputfile
private

Definition at line 99 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer(), and ~GlobalHitsHistogrammer().

bool GlobalHitsHistogrammer::printProvenanceInfo
private

Definition at line 96 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

int GlobalHitsHistogrammer::verbosity
private

Definition at line 91 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), endJob(), and GlobalHitsHistogrammer().

int GlobalHitsHistogrammer::vtxunit
private

Definition at line 93 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer().