CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HSCPValidator.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HSCP
4 // Class: HSCPValidator
5 //
13 //
14 // Original Author: Seth Cooper,27 1-024,+41227672342,
15 // Created: Wed Apr 14 14:27:52 CEST 2010
16 // $Id: HSCPValidator.cc,v 1.9 2011/10/11 21:14:33 jiechen Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include <vector>
24 #include <string>
25 #include <map>
26 
27 // user include files
50 #include "FastSimulation/Tracking/test/FastTrackAnalyzer.h"
78 
81 
82 #include "TH1.h"
83 #include "TGraph.h"
84 #include "TCanvas.h"
85 
86 //
87 // constants, enums and typedefs
88 //
89 
90 //
91 // static data member definitions
92 //
94 
95 //
96 // constructors and destructor
97 //
99  doGenPlots_ (iConfig.getParameter<bool>("MakeGenPlots")),
100  doHLTPlots_ (iConfig.getParameter<bool>("MakeHLTPlots")),
101  doSimTrackPlots_ (iConfig.getParameter<bool>("MakeSimTrackPlots")),
102  doSimDigiPlots_ (iConfig.getParameter<bool>("MakeSimDigiPlots")),
103  doRecoPlots_ (iConfig.getParameter<bool>("MakeRecoPlots")),
104  label_ (iConfig.getParameter<edm::InputTag>("generatorLabel")),
105  particleIds_ (iConfig.getParameter< std::vector<int> >("particleIds")),
106  particleStatus_ (iConfig.getUntrackedParameter<int>("particleStatus",1)),
107  ebSimHitTag_ (iConfig.getParameter<edm::InputTag>("EBSimHitCollection")),
108  eeSimHitTag_ (iConfig.getParameter<edm::InputTag>("EESimHitCollection")),
109  simTrackTag_ (iConfig.getParameter<edm::InputTag>("SimTrackCollection")),
110  EBDigiCollection_ (iConfig.getParameter<edm::InputTag>("EBDigiCollection")),
111  EEDigiCollection_ (iConfig.getParameter<edm::InputTag>("EEDigiCollection")),
112  RPCRecHitTag_ (iConfig.getParameter<edm::InputTag>("RPCRecHitTag"))
113 {
114  //now do what ever initialization is needed
115  // GEN
116  particleEtaHist_ = fileService->make<TH1F>("particleEta","Eta of gen particle",100,-5,5);
117  particlePhiHist_ = fileService->make<TH1F>("particlePhi","Phi of gen particle",180,-3.15,3.15);
118  particlePHist_ = fileService->make<TH1F>("particleP","Momentum of gen particle",500,0,2000);
119  particlePtHist_ = fileService->make<TH1F>("particlePt","P_{T} of gen particle",500,0,2000);
120  particleMassHist_ = fileService->make<TH1F>("particleMass","Mass of gen particle",1000,0,2000);
121  particleStatusHist_ = fileService->make<TH1F>("particleStatus","Status of gen particle",10,0,10);
122  particleBetaHist_ = fileService->make<TH1F>("particleBeta","Beta of gen particle",100,0,1);
123  particleBetaInverseHist_ = fileService->make<TH1F>("particleBetaInverse","1/#beta of gen particle",100,0,5);
124 
125  h_genhscp_met = fileService->make<TH1F>( "hscp_met" , "missing E_{T} hscp" , 100, 0., 1500. );
126  h_genhscp_met_nohscp = fileService->make<TH1F>( "hscp_met_nohscp" , "missing E_{T} w/o hscp" , 100, 0., 1500. );
127  h_genhscp_scaloret = fileService->make<TH1F>( "hscp_scaloret" , "scalor E_{T} sum" , 100, 0., 1500. );
128  h_genhscp_scaloret_nohscp = fileService->make<TH1F>( "hscp_scaloret_nohscp" , "scalor E_{T} sum w/o hscp" , 100, 0., 1500. );
129 
130 
131 
132 
133  //SIM track Info
134  simTrackParticleEtaHist_ = fileService->make<TH1F>("simTrackParticleEta","Eta of simTrackParticle",100,-5,5);
135  simTrackParticlePhiHist_ = fileService->make<TH1F>("simTrackParticlePhi","Phi of simTrackParticle",180,-3.15,3.15);
136  simTrackParticlePHist_ = fileService->make<TH1F>("simTrackParticleP","Momentum of simTrackParticle",500,0,2000);
137  simTrackParticlePtHist_ = fileService->make<TH1F>("simTrackParticlePt","P_{T} of simTrackParticle",500,0,2000);
138  simTrackParticleBetaHist_ = fileService->make<TH1F>("simTrackParticleBeta","Beta of simTrackParticle",100,0,1);
139 //reco track Info
140 
141  RecoHSCPPtVsGenPt= fileService->make<TH2F>("Recovsgenpt","RecovsGen",100,0,1000,100,0,1000);
142  dedxVsp = fileService->make<TH2F>("dedxvsp","dedxvsp",100,0,1000,100,0,10);
143 //HLT Info
144  hltmet = fileService->make<TH1F>("HLT_MET","MET",3,-1,2);
145  hltjet = fileService->make<TH1F>("HLT_JET","JET",3,-1,2);
146  hltmu = fileService->make<TH1F>("HLT_Mu","Mu",3,-1,2);
147 
148 
149  // SIM-DIGI: ECAL
150  simHitsEcalEnergyHistEB_ = fileService->make<TH1F>("ecalEnergyOfSimHitsEB","HSCP SimTrack-matching SimHit energy EB [GeV]",125,-1,4);
151  simHitsEcalEnergyHistEE_ = fileService->make<TH1F>("ecalEnergyOfSimHitsEE","HSCP SimTrack-matching SimHit energy EE [GeV]",125,-1,4);
152  simHitsEcalTimeHistEB_ = fileService->make<TH1F>("ecalTimingOfSimHitsEB","HSCP SimTrack-matching SimHit time EB [ns]",115,-15,100);
153  simHitsEcalTimeHistEE_ = fileService->make<TH1F>("ecalTimingOfSimHitsEE","HSCP SimTrack-matching SimHit time EE [ns]",115,-15,100);
154  simHitsEcalNumHistEB_ = fileService->make<TH1F>("ecalNumberOfSimHitsEB","Number of HSCP SimTrack-matching EB sim hits in event",100,0,200);
155  simHitsEcalNumHistEE_ = fileService->make<TH1F>("ecalNumberOfSimHitsEE","Number of HSCP SimTrack-matching EE sim hits in event",100,0,200);
156  simHitsEcalEnergyVsTimeHistEB_ = fileService->make<TH2F>("ecalEnergyVsTimeOfSimHitsEB","Energy vs. time of HSCP SimTrack-matching EB sim hits in event",115,-15,100,125,-1,4);
157  simHitsEcalEnergyVsTimeHistEE_ = fileService->make<TH2F>("ecalEnergyVsTimeOfSimHitsEE","Energy vs. time of HSCP SimTrack-matching EE sim hits in event",115,-15,100,125,-1,4);
158  simHitsEcalDigiMatchEnergyHistEB_ = fileService->make<TH1F>("ecalEnergyOfDigiMatSimHitsEB","HSCP digi-matching SimHit energy EB [GeV]",125,-1,4);
159  simHitsEcalDigiMatchEnergyHistEE_ = fileService->make<TH1F>("ecalEnergyOfDigiMatSimHitsEE","HSCP digi-matching SimHit energy EE [GeV]",125,-1,4);
160  simHitsEcalDigiMatchTimeHistEB_ = fileService->make<TH1F>("ecalTimingOfDigiMatSimHitsEB","HSCP digi-matching SimHit time EB [ns]",115,-15,100);
161  simHitsEcalDigiMatchTimeHistEE_ = fileService->make<TH1F>("ecalTimingOfDigiMatSimHitsEE","HSCP digi-matching SimHit time EE [ns]",115,-15,100);
162  simHitsEcalDigiMatchEnergyVsTimeHistEB_ = fileService->make<TH2F>("ecalEnergyVsTimeOfDigiMatSimHitsEB","HSCP digi-matching EB SimHit energy vs. time",115,-15,100,125,-1,4);
163  simHitsEcalDigiMatchEnergyVsTimeHistEE_ = fileService->make<TH2F>("ecalEnergyVsTimeOfDigiMatSimHitsEE","HSCP digi-matching EE SimHit energy vs. time",115,-15,100,125,-1,4);
164  simHitsEcalDigiMatchIEtaHist_ = fileService->make<TH1F>("ecalIEtaOfDigiMatchSimHits","iEta of digi-matching Ecal simHits (EB)",171,-85,86);
165  simHitsEcalDigiMatchIPhiHist_ = fileService->make<TH1F>("ecalIPhiOfDigiMatchSimHits","iPhi of digi-matching Ecal simHits (EB)",360,1,361);
166  digisEcalNumHistEB_ = fileService->make<TH1F>("ecalDigisNumberEB","Number of EB digis matching simhits in event",200,0,1000);
167  digisEcalNumHistEE_ = fileService->make<TH1F>("ecalDigisNumberEE","Number of EE digis matching simhits in event",200,0,1000);
168  digiOccupancyMapEB_ = fileService->make<TH2F>("ecalDigiOccupancyMapEB","Occupancy of simhit-matching digis EB;i#phi;i#eta",360,1,361,171,-85,86);
169  digiOccupancyMapEEP_ = fileService->make<TH2F>("ecalDigiOccupancyMapEEM","Occupancy of simhit-matching digis EEM;ix;iy",100,1,100,100,1,100);
170  digiOccupancyMapEEM_ = fileService->make<TH2F>("ecalDigiOccupancyMapEEP","Occupancy of simhit-matching digis EEP;ix;iy",100,1,100,100,1,100);
171 
172  // SIM-DIGI: RPC
173  residualsRPCRecHitSimDigis_ = fileService->make<TH1F>("residualsRPCRecHitSimDigis","HSCP SimHit - Clossest RPC RecHit",100,-5,5);
174  efficiencyRPCRecHitSimDigis_ = fileService->make<TH1F>("efficiencyRPCRecHitSimDigis","HSCP SimHits RecHits Efficiency",2,-0.5,1.5);
175  cluSizeDistribution_ = fileService->make<TH1F>("RPCCluSizeDistro","RPC HSCP CluSize Distribution",11,-0.5,10.5);
176  rpcTimeOfFlightBarrel_[0] = fileService->make<TH1F>("RPCToFLayer1","RPC HSCP Time Of Flight Layer 1",50,5,100);
177  rpcTimeOfFlightBarrel_[1] = fileService->make<TH1F>("RPCToFLayer2","RPC HSCP Time Of Flight Layer 2",50,5,100);
178  rpcTimeOfFlightBarrel_[2] = fileService->make<TH1F>("RPCToFLayer3","RPC HSCP Time Of Flight Layer 3",50,5,100);
179  rpcTimeOfFlightBarrel_[3] = fileService->make<TH1F>("RPCToFLayer4","RPC HSCP Time Of Flight Layer 4",50,5,100);
180  rpcTimeOfFlightBarrel_[4] = fileService->make<TH1F>("RPCToFLayer5","RPC HSCP Time Of Flight Layer 5",50,5,100);
181  rpcTimeOfFlightBarrel_[5] = fileService->make<TH1F>("RPCToFLayer6","RPC HSCP Time Of Flight Layer 6",50,5,100);
182  rpcBXBarrel_[0] = fileService->make<TH1F>("RPCBXLayer1","RPC HSCP BX Layer 1",5,-0.5,4.5);
183  rpcBXBarrel_[1] = fileService->make<TH1F>("RPCBXLayer2","RPC HSCP BX Layer 2",5,-0.5,4.5);
184  rpcBXBarrel_[2] = fileService->make<TH1F>("RPCBXLayer3","RPC HSCP BX Layer 3",5,-0.5,4.5);
185  rpcBXBarrel_[3] = fileService->make<TH1F>("RPCBXLayer4","RPC HSCP BX Layer 4",5,-0.5,4.5);
186  rpcBXBarrel_[4] = fileService->make<TH1F>("RPCBXLayer5","RPC HSCP BX Layer 5",5,-0.5,4.5);
187  rpcBXBarrel_[5] = fileService->make<TH1F>("RPCBXLayer6","RPC HSCP BX Layer 6",5,-0.5,4.5);
188  rpcTimeOfFlightEndCap_[0]= fileService->make<TH1F>("RPCToFDisk1","RPC HSCP Time Of Flight Disk 1",50,5,100);
189  rpcTimeOfFlightEndCap_[1]= fileService->make<TH1F>("RPCToFDisk2","RPC HSCP Time Of Flight Disk 2",50,5,100);
190  rpcTimeOfFlightEndCap_[2]= fileService->make<TH1F>("RPCToFDisk3","RPC HSCP Time Of Flight Disk 3",50,5,100);
191  rpcBXEndCap_[0] = fileService->make<TH1F>("RPCBXDisk1","RPC HSCP BX Disk 1",5,-0.5,4.5);
192  rpcBXEndCap_[1] = fileService->make<TH1F>("RPCBXDisk2","RPC HSCP BX Disk 2",5,-0.5,4.5);
193  rpcBXEndCap_[2] = fileService->make<TH1F>("RPCBXDisk3","RPC HSCP BX Disk 3",5,-0.5,4.5);
194 }
195 
196 
198 {
199 
200  // do anything here that needs to be done at desctruction time
201  // (e.g. close files, deallocate resources etc.)
202 // particleEtaHist_ = fileService->make<TH1F>("particleEta","Eta of gen particle",100,-5,5);
203 // particlePhiHist_ = fileService->make<TH1F>("particlePhi","Phi of gen particle",180,-3.15,3.15);
204 // particlePHist_ = fileService->make<TH1F>("particleP","Momentum of gen particle",500,0,2000);
205 // particlePtHist_ = fileService->make<TH1F>("particlePt","P_{T} of gen particle",500,0,2000);
206 // particleMassHist_ = fileService->make<TH1F>("particleMass","Mass of gen particle",1000,0,2000);
207 // particleStatusHist_ = fileService->make<TH1F>("particleStatus","Status of gen particle",10,0,10);
208 // particleBetaHist_ = fileService->make<TH1F>("particleBeta","Beta of gen particle",100,0,1);
209 // particleBetaInverseHist_ = fileService->make<TH1F>("particleBetaInverse","1/#beta of gen particle",100,0,5);
210 
211 }
212 
213 
214 //
215 // member functions
216 //
217 
218 // ------------ method called to for each event ------------
219 void
221 {
222  using namespace edm;
223  iSetup.get<MuonGeometryRecord>().get(rpcGeo);
224 
225 
226  if(doGenPlots_)
227  makeGenPlots(iEvent);
228  if(doSimTrackPlots_)
229  makeSimTrackPlots(iEvent);
230  if(doSimDigiPlots_){
231  makeSimDigiPlotsECAL(iEvent);
232  makeSimDigiPlotsRPC(iEvent);
233  }
234  if(doHLTPlots_){
235  makeHLTPlots(iEvent);
236  }
237  if(doRecoPlots_){
238  makeRecoPlots(iEvent);
239  }
240 }
241 
242 
243 // ------------ method called once each job just before starting event loop ------------
244 void
246 {
247 }
248 
249 // ------------ method called once each job just after ending the event loop ------------
250 void
252 {
253  std::string frequencies = "";
254  for(std::map<int,int>::const_iterator itr = particleIdsFoundMap_.begin();
255  itr != particleIdsFoundMap_.end(); ++itr)
256  {
257  frequencies+="PDG ID: ";
258  frequencies+=intToString(itr->first);
259  frequencies+=" Frequency: ";
260  frequencies+=intToString(itr->second);
261  frequencies+="\n";
262  }
263  std::cout << "Found PDGIds: " << "\n\n" << frequencies << std::endl;
264 
265 }
266 
267 // ------------- Make gen plots ---------------------------------------------------------
269 {
270  using namespace edm;
271 
272  double missingpx=0;
273  double missingpy=0;
274  double missingpx_nohscp=0;
275  double missingpy_nohscp=0;
276  double scalorEt=0;
277  double scalorEt_nohscp=0;
278 
279 
281  iEvent.getByLabel(label_, evt);
282 
283  HepMC::GenEvent * myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
284  for(HepMC::GenEvent::particle_iterator p = myGenEvent->particles_begin();
285  p != myGenEvent->particles_end(); ++p )
286  {
287 
288  if((*p)->status() != particleStatus_)
289  continue;
290  //calculate MET(neutrino as MET)
291  if(abs((*p)->pdg_id())!=12 && abs((*p)->pdg_id())!=14 && abs((*p)->pdg_id())!=16){ //for non-neutrino particles.
292  missingpx-=(*p)->momentum().px();
293  missingpy-=(*p)->momentum().py();
294  scalorEt+=(*p)->momentum().perp();
295  }
296 
297  // Check if the particleId is in our R-hadron list
298  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(),particleIds_.end(),(*p)->pdg_id());
299  if(partIdItr==particleIds_.end()){
300 
301  //calculate MET(neutrino+ HSCP as MET)
302  if(abs((*p)->pdg_id())!=12 && abs((*p)->pdg_id())!=14 && abs((*p)->pdg_id())!=16){ //for non-neutrino particles.
303  missingpx_nohscp-=(*p)->momentum().px();
304  missingpy_nohscp-=(*p)->momentum().py();
305  scalorEt_nohscp+=(*p)->momentum().perp();
306  }
307  }
308  else{
309 
310  particleStatusHist_->Fill((*p)->status());
311 
312  std::pair<std::map<int,int>::iterator,bool> pair = particleIdsFoundMap_.insert(std::make_pair<int,int>((*p)->pdg_id(),1));
313  if(!pair.second)
314  {
315  ++(pair.first->second);
316  }
317 
318  double mag = sqrt(pow((*p)->momentum().px(),2) + pow((*p)->momentum().py(),2) + pow((*p)->momentum().pz(),2) );
319  particleEtaHist_->Fill((*p)->momentum().eta());
320  particlePhiHist_->Fill((*p)->momentum().phi());
321  particlePHist_->Fill(mag);
322  particlePtHist_->Fill((*p)->momentum().perp());
323  particleMassHist_->Fill((*p)->generated_mass());
324  float particleP = mag;
325  float particleM = (*p)->generated_mass();
326  particleBetaHist_->Fill(particleP/sqrt(particleP*particleP+particleM*particleM));
327  particleBetaInverseHist_->Fill(sqrt(particleP*particleP+particleM*particleM)/particleP);
328  }
329 
330  }
331 
332  h_genhscp_met->Fill(sqrt(missingpx*missingpx+missingpy*missingpy));
333  h_genhscp_met_nohscp->Fill(sqrt(missingpx_nohscp*missingpx_nohscp+missingpy_nohscp*missingpy_nohscp));
334  h_genhscp_scaloret->Fill(scalorEt);
335  h_genhscp_scaloret_nohscp->Fill(scalorEt_nohscp);
336 
337 
338  delete myGenEvent;
339 
340 
341 
342 }
343 
344 // ------------- Make SimTrack plots ---------------------------------------------------------
346 { using namespace edm;
347  //get sim track infos
348  Handle<edm::SimTrackContainer> simTracksHandle;
349  iEvent.getByLabel("g4SimHits",simTracksHandle);
350  const SimTrackContainer simTracks = *(simTracksHandle.product());
351 
352  SimTrackContainer::const_iterator simTrack;
353 
354  for (simTrack = simTracks.begin(); simTrack != simTracks.end(); ++simTrack){
355  // Check if the particleId is in our list
356  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(),particleIds_.end(),simTrack->type());
357  if(partIdItr==particleIds_.end()) continue;
358 
359  simTrackParticleEtaHist_->Fill((*simTrack).momentum().eta());
360  simTrackParticlePhiHist_->Fill((*simTrack).momentum().phi());
361  simTrackParticlePHist_->Fill((*simTrack).momentum().P());
362 
363  simTrackParticlePtHist_->Fill((*simTrack).momentum().pt());
364 
365  simTrackParticleBetaHist_->Fill((*simTrack).momentum().P()/(*simTrack).momentum().e());
366 
367  // std::cout<<"Particle:"<<simTrack->type()<<" Charge:"<<simTrack->charge()<<std::endl;
368 
369  }
370 }
371 // ------------- Make HLT plots ---------------------------------------------------------
373 {
374  using namespace edm;
375  //get HLT infos
376 
377 
379 
380  if(!tr.isValid()){
381  std::cout<<"Tirgger Results not available"<<std::endl;
382  }
383 
385  iEvent.getByLabel("hltTriggerSummaryAOD", trEvHandle);
386  trigger::TriggerEvent trEv = *trEvHandle;
387 
388 
389  unsigned int TrIndex_Unknown = tr.size();
390 
391 
392  // HLT TRIGGER BASED ON 1 MUON!
393  if(TrIndex_Unknown != tr.triggerIndex("HLT_Mu40_v1")){
394  if(tr.accept(tr.triggerIndex("HLT_Mu40_v1"))) hltmu->Fill(1);
395  else {hltmu->Fill(0);}
396  }
397  else{
398  if(TrIndex_Unknown != tr.triggerIndex("HLT_Mu30_v1")){
399  if(IncreasedTreshold(trEv, InputTag("hltSingleMu30L3Filtered30","","HLT"), 40,2.1, 1, false)) hltmu->Fill(1);
400  else hltmu->Fill(0);
401  }else{
402  printf("BUG with HLT_Mu\n");
403  std::cout<<"trigger names are : ";
404  for(unsigned int i=0;i<tr.size();i++){
405  std::cout<<" "<<tr.triggerName(i);
406  }
407  std::cout<<std::endl;
408  }
409  }
410 
411 
412  // HLT TRIGGER BASED ON MET!
413  if(TrIndex_Unknown != tr.triggerIndex("HLT_PFMHT150_v3")){
414  if(tr.accept(tr.triggerIndex("HLT_PFMHT150_v3")))hltmet->Fill(1);
415  else hltmet->Fill(0);
416  }else{
417  if(TrIndex_Unknown != tr.triggerIndex("HLT_PFMHT150_v2")){
418  if(tr.accept(tr.triggerIndex("HLT_PFMHT150_v2"))) hltmet->Fill(1);
419  else hltmet->Fill(0);
420  }
421  else{
422  printf("BUG with HLT_MET\n");
423 
424  }
425  }
426 
427 
428  // HLT TRIGGER BASED ON 1 JET!
429  if(TrIndex_Unknown != tr.triggerIndex("HLT_Jet370_v1")){
430  if(tr.accept(tr.triggerIndex("HLT_Jet370_v1")))hltjet->Fill(1);
431  else hltjet->Fill(0);
432  }else{
433  if(TrIndex_Unknown != tr.triggerIndex("HLT_Jet100U")){
434  if(IncreasedTreshold(trEv, InputTag("hlt1jet100U","","HLT"), 140, 5.,1, false))hltjet->Fill(1);
435  else hltjet->Fill(0);
436  }else{
437  if(TrIndex_Unknown != tr.triggerIndex("HLT_Jet70U")){
438  if(IncreasedTreshold(trEv, InputTag("hlt1jet70U","","HLT"), 140, 5.,1, false))hltjet->Fill(1);
439  else hltjet->Fill(0);
440  }else{
441  if(TrIndex_Unknown != tr.triggerIndex("HLT_Jet50U")){
442  if(IncreasedTreshold(trEv, InputTag("hlt1jet50U","","HLT"), 140,2.5, 1, false))hltjet->Fill(1);
443  else hltjet->Fill(0);
444  }else{
445  printf("BUG with HLT_Jet\n");
446 
447  }
448  }
449  }
450  }
451 
452 
453 
454 
455 
456 }
457 
458 // ------------- Make simDigi plots ECAL ------------------------------------------------
460 {
461  using namespace edm;
462  // EB SimHits
463  Handle<PCaloHitContainer> ebSimHits;
464  iEvent.getByLabel(ebSimHitTag_, ebSimHits);
465  if(!ebSimHits.isValid())
466  {
467  std::cout << "Cannot get EBSimHits from event!" << std::endl;
468  return;
469  }
470  // EE SimHits
471  Handle<PCaloHitContainer> eeSimHits;
472  iEvent.getByLabel(eeSimHitTag_, eeSimHits);
473  if(!eeSimHits.isValid())
474  {
475  std::cout << "Cannot get EESimHits from event!" << std::endl;
476  return;
477  }
478  // SimTracks
479  Handle<SimTrackContainer> simTracks;
480  iEvent.getByLabel(simTrackTag_,simTracks);
481  if(!simTracks.isValid())
482  {
483  std::cout << "Cannot get SimTracks from event!" << std::endl;
484  return;
485  }
486  // EB Digis
487  Handle<EBDigiCollection> ebDigis;
488  iEvent.getByLabel(EBDigiCollection_,ebDigis);
489  if(!ebDigis.isValid())
490  {
491  std::cout << "Cannot get EBDigis from event!" << std::endl;
492  return;
493  }
494  // EE Digis
495  Handle<EEDigiCollection> eeDigis;
496  iEvent.getByLabel(EEDigiCollection_,eeDigis);
497  if(!eeDigis.isValid())
498  {
499  std::cout << "Cannot get EEDigis from event!" << std::endl;
500  return;
501  }
502 
503  // EB first
504  // 1) Look at SimTracks, getting only the HSCP tracks
505  // 2) Match to PCaloHits
506  // 3) Match to digis
507  int numMatchedSimHitsEventEB = 0;
508  int numMatchedDigisEventEB = 0;
509  const PCaloHitContainer* phitsEB=0;
510  phitsEB = ebSimHits.product();
511  for(SimTrackContainer::const_iterator simTrack = simTracks->begin(); simTrack != simTracks->end(); ++simTrack)
512  {
513  // Check if the particleId is in our list
514  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(),particleIds_.end(),simTrack->type());
515  if(partIdItr==particleIds_.end())
516  continue;
517 
518  PCaloHitContainer mySimHitsEB;
519  std::vector<EBDataFrame> myDigisEB;
520 
521  //int particleId = simTrack->type();
522  int trackId = simTrack->trackId();
523  PCaloHitContainer::const_iterator simHitItr = phitsEB->begin();
524  while(simHitItr != phitsEB->end())
525  {
526  if(simHitItr->geantTrackId()==trackId)
527  mySimHitsEB.push_back(*simHitItr);
528  ++simHitItr;
529  }
530  if(mySimHitsEB.size()==0)
531  {
532  std::cout << "Could not find matching EB PCaloHits for SimTrack id: " << trackId << ". Skipping this SimTrack" << std::endl;
533  continue;
534  }
535 
536  // Loop over matching PCaloHits
537  for(simHitItr = mySimHitsEB.begin(); simHitItr != mySimHitsEB.end(); ++simHitItr)
538  {
539  simHitsEcalEnergyHistEB_->Fill(simHitItr->energy());
540  simHitsEcalTimeHistEB_->Fill(simHitItr->time());
541  simHitsEcalEnergyVsTimeHistEB_->Fill(simHitItr->time(),simHitItr->energy());
542  EBDetId simHitId = EBDetId(simHitItr->id());
543  std::cout << "SimHit DetId found: " << simHitId << " for PDGid: " << simTrack->type() << std::endl;
544  //std::cout << "SimHit hashedIndex: " << simHitId.hashedIndex() << std::endl;
545  std::cout << "SimHit energy: " << simHitItr->energy() << " time: " << simHitItr->time() << std::endl;
546  ++numMatchedSimHitsEventEB;
547 
548  EBDigiCollection::const_iterator digiItr = ebDigis->begin();
549  while(digiItr != ebDigis->end() && (digiItr->id() != simHitId))
550  ++digiItr;
551  if(digiItr==ebDigis->end())
552  {
553  // Commented out for debugging ease, Aug 3 2009
554  std::cout << "Could not find simHit detId: " << simHitId << "in EBDigiCollection!" << std::endl;
555  continue;
556  }
557  std::vector<EBDataFrame>::const_iterator myDigiItr = myDigisEB.begin();
558  while(myDigiItr != myDigisEB.end() && (digiItr->id() != myDigiItr->id()))
559  ++myDigiItr;
560  if(myDigiItr!=myDigisEB.end())
561  continue; // if this digi is already in the list, skip it
562 
563  ++numMatchedDigisEventEB;
564  EBDataFrame df = *digiItr;
565  myDigisEB.push_back(df);
566  std::cout << "SAMPLE ADCs: " << "\t";
567  for(int i=0; i<10;++i)
568  std::cout << i << "\t";
569  std::cout << std::endl << "\t\t";
570  for(int i=0; i < df.size(); ++i)
571  {
572  std::cout << df.sample(i).adc() << "\t";
573  }
574  std::cout << std::endl << std::endl;
575 
576  simHitsEcalDigiMatchEnergyHistEB_->Fill(simHitItr->energy());
577  simHitsEcalDigiMatchTimeHistEB_->Fill(simHitItr->time());
578  simHitsEcalDigiMatchEnergyVsTimeHistEB_->Fill(simHitItr->time(),simHitItr->energy());
579  simHitsEcalDigiMatchIEtaHist_->Fill(((EBDetId)digiItr->id()).ieta());
580  simHitsEcalDigiMatchIPhiHist_->Fill(((EBDetId)digiItr->id()).iphi());
581  digiOccupancyMapEB_->Fill(((EBDetId)digiItr->id()).iphi(),((EBDetId)digiItr->id()).ieta());
582  }
583  }
584  simHitsEcalNumHistEB_->Fill(numMatchedSimHitsEventEB);
585  digisEcalNumHistEB_->Fill(numMatchedDigisEventEB);
586 
587  // EE next
588  int numMatchedSimHitsEventEE = 0;
589  int numMatchedDigisEventEE = 0;
590  const PCaloHitContainer* phitsEE=0;
591  phitsEE = eeSimHits.product();
592  for(SimTrackContainer::const_iterator simTrack = simTracks->begin(); simTrack != simTracks->end(); ++simTrack)
593  {
594  // Check if the particleId is in our list
595  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(),particleIds_.end(),simTrack->type());
596  if(partIdItr==particleIds_.end())
597  continue;
598 
599  PCaloHitContainer mySimHitsEE;
600  std::vector<EEDataFrame> myDigisEE;
601 
602  //int particleId = simTrack->type();
603  int trackId = simTrack->trackId();
604  PCaloHitContainer::const_iterator simHitItr = phitsEE->begin();
605  while(simHitItr != phitsEE->end())
606  {
607  if(simHitItr->geantTrackId()==trackId)
608  mySimHitsEE.push_back(*simHitItr);
609  ++simHitItr;
610  }
611  if(mySimHitsEE.size()==0)
612  {
613  std::cout << "Could not find matching EE PCaloHits for SimTrack id: " << trackId << ". Skipping this SimTrack" << std::endl;
614  continue;
615  }
616 
617  // Loop over matching PCaloHits
618  for(simHitItr = mySimHitsEE.begin(); simHitItr != mySimHitsEE.end(); ++simHitItr)
619  {
620  simHitsEcalEnergyHistEE_->Fill(simHitItr->energy());
621  simHitsEcalTimeHistEE_->Fill(simHitItr->time());
622  simHitsEcalEnergyVsTimeHistEE_->Fill(simHitItr->time(),simHitItr->energy());
623  EEDetId simHitId = EEDetId(simHitItr->id());
624  std::cout << "SimHit DetId found: " << simHitId << " for PDGid: " << simTrack->type() << std::endl;
625  //std::cout << "SimHit hashedIndex: " << simHitId.hashedIndex() << std::endl;
626  std::cout << "SimHit energy: " << simHitItr->energy() << " time: " << simHitItr->time() << std::endl;
627  ++numMatchedSimHitsEventEE;
628 
629  EEDigiCollection::const_iterator digiItr = eeDigis->begin();
630  while(digiItr != eeDigis->end() && (digiItr->id() != simHitId))
631  ++digiItr;
632  if(digiItr==eeDigis->end())
633  {
634  // Commented out for debugging ease, Aug 3 2009
635  std::cout << "Could not find simHit detId: " << simHitId << "in EEDigiCollection!" << std::endl;
636  continue;
637  }
638  std::vector<EEDataFrame>::const_iterator myDigiItr = myDigisEE.begin();
639  while(myDigiItr != myDigisEE.end() && (digiItr->id() != myDigiItr->id()))
640  ++myDigiItr;
641  if(myDigiItr!=myDigisEE.end())
642  continue; // if this digi is already in the list, skip it
643 
644  ++numMatchedDigisEventEE;
645  EEDataFrame df = *digiItr;
646  myDigisEE.push_back(df);
647  std::cout << "SAMPLE ADCs: " << "\t";
648  for(int i=0; i<10;++i)
649  std::cout << i << "\t";
650  std::cout << std::endl << "\t\t";
651  for(int i=0; i < df.size(); ++i)
652  {
653  std::cout << df.sample(i).adc() << "\t";
654  }
655  std::cout << std::endl << std::endl;
656 
657  simHitsEcalDigiMatchEnergyHistEE_->Fill(simHitItr->energy());
658  simHitsEcalDigiMatchTimeHistEE_->Fill(simHitItr->time());
659  simHitsEcalDigiMatchEnergyVsTimeHistEE_->Fill(simHitItr->time(),simHitItr->energy());
660  if(((EEDetId)digiItr->id()).zside() > 0)
661  digiOccupancyMapEEP_->Fill(((EEDetId)digiItr->id()).ix(),((EEDetId)digiItr->id()).iy());
662  else if(((EEDetId)digiItr->id()).zside() < 0)
663  digiOccupancyMapEEM_->Fill(((EEDetId)digiItr->id()).ix(),((EEDetId)digiItr->id()).iy());
664  }
665  }
666  simHitsEcalNumHistEE_->Fill(numMatchedSimHitsEventEE);
667  digisEcalNumHistEE_->Fill(numMatchedDigisEventEE);
668 
669 }
670 // ------------- Make Reco plots ---------------------------------------------------------
672 {
673  using namespace edm;
674  using namespace reco;
675 
677  iEvent.getByLabel(label_, evt);
678 
679  Handle<TrackCollection> tkTracks;
680  iEvent.getByLabel("generalTracks",tkTracks);
681  const reco::TrackCollection tkTC = *(tkTracks.product());
682 
683  Handle<ValueMap<DeDxData> > dEdxTrackHandle;
684  iEvent.getByLabel("dedxHarmonic2", dEdxTrackHandle);
685  const ValueMap<DeDxData> dEdxTrack = *dEdxTrackHandle.product();
686 
687  for(size_t i=0; i<tkTracks->size(); i++){
688 
689  reco::TrackRef trkRef = reco::TrackRef(tkTracks, i);
690 
691  if(trkRef->pt()<5 || trkRef->normalizedChi2()>10) continue;
692 
693  double minR= 999;
694  double hscpgenPt =-1;
695 
696  HepMC::GenEvent * myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
697  for(HepMC::GenEvent::particle_iterator p = myGenEvent->particles_begin();
698  p != myGenEvent->particles_end(); ++p )
699  {
700 
701  if((*p)->status() != particleStatus_)
702  continue;
703  // Check if the particleId is in our R-hadron list
704  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(),particleIds_.end(),(*p)->pdg_id());
705  if(partIdItr!=particleIds_.end()){
706 
707  //calculate DeltaR
708  double distance =pow((*p)->momentum().eta()-trkRef->eta(),2)+pow((*p)->momentum().phi()-trkRef->phi(),2);
709  distance =sqrt(distance);
710  if(distance <minR ){
711  minR = distance;
712  hscpgenPt= (*p)->momentum().perp();
713  }
714  }
715  }
716  RecoHSCPPtVsGenPt->Fill(trkRef->pt(),hscpgenPt);
717 
718  delete myGenEvent;
719  double dedx = dEdxTrack[trkRef].dEdx();
720  dedxVsp->Fill( trkRef->p(),dedx);
721 
722  }
723 
724 }
725 
726 // ------------- Make simDigi plots RPC -------------------------------------------------
728 {
729  using namespace edm;
730 
731  //std::cout << " Getting the SimHits " <<std::endl;
732  std::vector<Handle<edm::PSimHitContainer> > theSimHitContainers;
733  iEvent.getManyByType(theSimHitContainers);
734  //std::cout << " The Number of sim Hits is " << theSimHitContainers.size() <<std::endl;
735 
737  iEvent.getByLabel("rpcRecHits","",rpcRecHits);
738 
739  //SimTrack Stuff
740  std::vector<PSimHit> theSimHits;
741 
742  for (int i = 0; i < int(theSimHitContainers.size()); i++){
743  theSimHits.insert(theSimHits.end(),theSimHitContainers.at(i)->begin(),theSimHitContainers.at(i)->end());
744  }
745 
746 
747  for (std::vector<PSimHit>::const_iterator iHit = theSimHits.begin(); iHit != theSimHits.end(); iHit++){
748 
749  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(),particleIds_.end(),(*iHit).particleType());
750  if(partIdItr==particleIds_.end())
751  continue;
752 
753  DetId theDetUnitId((*iHit).detUnitId());
754 
755  DetId simdetid= DetId((*iHit).detUnitId());
756 
757  if(simdetid.det()==DetId::Muon && simdetid.subdetId()== MuonSubdetId::RPC){//Only RPCs
758 
759  RPCDetId rollId(theDetUnitId);
760  RPCGeomServ rpcsrv(rollId);
761 
762  //std::cout << " Reading the Roll"<<std::endl;
763  const RPCRoll* rollasociated = rpcGeo->roll(rollId);
764 
765  //std::cout << " Getting the Surface"<<std::endl;
766  const BoundPlane & RPCSurface = rollasociated->surface();
767 
768  GlobalPoint SimHitInGlobal = RPCSurface.toGlobal((*iHit).localPosition());
769 
770  std::cout<<"\t\t We have an RPC Sim Hit! in t="<<(*iHit).timeOfFlight()<<"ns "<<rpcsrv.name()<<" Global postition="<<SimHitInGlobal<<std::endl;
771 
772  int layer = 0;
773 
774  if(rollId.station()==1&&rollId.layer()==1) layer = 1;
775  else if(rollId.station()==1&&rollId.layer()==2) layer = 2;
776  else if(rollId.station()==2&&rollId.layer()==1) layer = 3;
777  else if(rollId.station()==2&&rollId.layer()==2) layer = 4;
778  else if(rollId.station()==3) layer = 5;
779  else if(rollId.station()==4) layer = 6;
780 
781  if(rollId.region()==0){
782  rpcTimeOfFlightBarrel_[layer-1]->Fill((*iHit).timeOfFlight());
783  }else{
784  rpcTimeOfFlightEndCap_[rollId.station()-1]->Fill((*iHit).timeOfFlight());
785  }
786 
787  std::cout<<"\t\t r="<<SimHitInGlobal.mag()<<" phi="<<SimHitInGlobal.phi()<<" eta="<<SimHitInGlobal.eta()<<std::endl;
788 
789  int cluSize = 0;
790  int bx = 100;
791  float minres = 3000.;
792 
793  std::cout<<"\t \t \t \t Getting RecHits in Roll Asociated"<<std::endl;
794 
795  typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
796  rangeRecHits recHitCollection = rpcRecHits->get(rollId);
798 
800 
801  for(recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++){
802  LocalPoint recHitPos=recHit->localPosition();
803  float res=(*iHit).localPosition().x()- recHitPos.x();
804  if(fabs(res)<fabs(minres)){
805  minres=res;
806  cluSize = recHit->clusterSize();
807  bx=recHit->BunchX();
808  std::cout<<"\t New Min Res "<<res<<"cm."<<std::endl;
809  }
810  }
811 
812  if(minres<3000.){
813  residualsRPCRecHitSimDigis_->Fill(minres);
815  cluSizeDistribution_->Fill(cluSize);
816  if(rollId.region()==0) rpcBXBarrel_[layer-1]->Fill(bx);
817  else rpcBXEndCap_[rollId.station()-1]->Fill(bx);
818  }
819  }
820  }
821 }
822 
823 // ------------- Convert int to string for printing -------------------------------------
825 {
826  using namespace std;
827  ostringstream myStream;
828  myStream << num << flush;
829  return(myStream.str()); //returns the string form of the stringstream object
830 }
831 
832 
833 
834 //------Increase trigger thresold----
835 
836 
837 bool HSCPValidator::IncreasedTreshold(const trigger::TriggerEvent& trEv, const edm::InputTag& InputPath, double NewThreshold, double etaCut, int NObjectAboveThreshold, bool averageThreshold)
838 {
839  unsigned int filterIndex = trEv.filterIndex(InputPath);
840  //if(filterIndex<trEv.sizeFilters())printf("SELECTED INDEX =%i --> %s XXX %s\n",filterIndex,trEv.filterTag(filterIndex).label().c_str(), trEv.filterTag(filterIndex).process().c_str());
841 
842  if (filterIndex<trEv.sizeFilters()){
843  const trigger::Vids& VIDS(trEv.filterIds(filterIndex));
844  const trigger::Keys& KEYS(trEv.filterKeys(filterIndex));
845  const int nI(VIDS.size());
846  const int nK(KEYS.size());
847  assert(nI==nK);
848  const int n(std::max(nI,nK));
849  const trigger::TriggerObjectCollection& TOC(trEv.getObjects());
850 
851 
852  if(!averageThreshold){
853  int NObjectAboveThresholdObserved = 0;
854  for (int i=0; i!=n; ++i) {
855  if(TOC[KEYS[i]].pt()> NewThreshold && fabs(TOC[KEYS[i]].eta())<etaCut) NObjectAboveThresholdObserved++;
856  //cout << " " << i << " " << VIDS[i] << "/" << KEYS[i] << ": "<< TOC[KEYS[i]].id() << " " << TOC[KEYS[i]].pt() << " " << TOC[KEYS[i]].eta() << " " << TOC[KEYS[i]].phi() << " " << TOC[KEYS[i]].mass()<< endl;
857  }
858  if(NObjectAboveThresholdObserved>=NObjectAboveThreshold)return true;
859 
860  }else{
861  std::vector<double> ObjPt;
862 
863  for (int i=0; i!=n; ++i) {
864  ObjPt.push_back(TOC[KEYS[i]].pt());
865  //cout << " " << i << " " << VIDS[i] << "/" << KEYS[i] << ": "<< TOC[KEYS[i]].id() << " " << TOC[KEYS[i]].pt() << " " << TOC[KEYS[i]].eta() << " " << TOC[KEYS[i]].phi() << " " << TOC[KEYS[i]].mass()<< endl;
866  }
867  if((int)(ObjPt.size())<NObjectAboveThreshold)return false;
868  std::sort(ObjPt.begin(), ObjPt.end());
869 
870  double Average = 0;
871  for(int i=0; i<NObjectAboveThreshold;i++){
872  Average+= ObjPt[ObjPt.size()-1-i];
873  }Average/=NObjectAboveThreshold;
874  //cout << "AVERAGE = " << Average << endl;
875 
876  if(Average>NewThreshold)return true;
877  }
878  }
879  return false;
880 }
881 
882 
883 //define this as a plug-in
bool doSimDigiPlots_
Definition: HSCPValidator.h:63
void getManyByType(std::vector< Handle< PROD > > &results) const
Definition: Event.h:395
TH1F * particleMassHist_
Definition: HSCPValidator.h:75
TH2F * simHitsEcalDigiMatchEnergyVsTimeHistEE_
virtual TriggerResultsByName triggerResultsByName(std::string const &process) const
Definition: Event.cc:217
int i
Definition: DBlmapReader.cc:9
TH1F * rpcTimeOfFlightBarrel_[6]
TH1F * rpcTimeOfFlightEndCap_[3]
std::vector< PCaloHit > PCaloHitContainer
TH1F * simHitsEcalTimeHistEE_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:27
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:137
virtual void analyze(const edm::Event &, const edm::EventSetup &)
TH1F * particlePhiHist_
Definition: HSCPValidator.h:72
TH2F * simHitsEcalEnergyVsTimeHistEB_
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
TH1F * simHitsEcalEnergyHistEE_
TH1F * h_genhscp_met_nohscp
Definition: HSCPValidator.h:80
TH1F * digisEcalNumHistEE_
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:113
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
edm::InputTag label_
Definition: HSCPValidator.h:67
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:125
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
TH1F * particleBetaHist_
Definition: HSCPValidator.h:77
TH2F * digiOccupancyMapEEM_
#define abs(x)
Definition: mlp_lapack.h:159
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:30
bool IncreasedTreshold(const trigger::TriggerEvent &trEv, const edm::InputTag &InputPath, double NewThreshold, double etaCut, int NObjectAboveThreshold, bool averageThreshold)
T eta() const
TH1F * cluSizeDistribution_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
TH1F * simHitsEcalDigiMatchTimeHistEB_
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
void makeSimTrackPlots(const edm::Event &iEvent)
HSCPValidator(const edm::ParameterSet &)
void makeRecoPlots(const edm::Event &iEvent)
std::vector< int > particleIds_
Definition: HSCPValidator.h:68
int size() const
Definition: EcalDataFrame.h:27
std::map< int, int > particleIdsFoundMap_
Definition: HSCPValidator.h:70
TH1F * simTrackParticlePtHist_
Definition: HSCPValidator.h:89
TH1F * particleEtaHist_
Definition: HSCPValidator.h:71
TH1F * simHitsEcalNumHistEE_
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
const Vids & filterIds(trigger::size_type index) const
Definition: TriggerEvent.h:112
int iEvent
Definition: GenABIO.cc:243
TH2F * digiOccupancyMapEEP_
virtual std::string name()
Definition: RPCGeomServ.cc:20
T mag() const
Definition: PV3DBase.h:67
TH1F * particlePtHist_
Definition: HSCPValidator.h:74
virtual void beginJob()
const T & max(const T &a, const T &b)
TH1F * h_genhscp_scaloret
Definition: HSCPValidator.h:81
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:100
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T sqrt(T t)
Definition: SSEVec.h:48
TH2F * digiOccupancyMapEB_
TH1F * efficiencyRPCRecHitSimDigis_
TH2F * simHitsEcalDigiMatchEnergyVsTimeHistEB_
TH1F * simHitsEcalDigiMatchEnergyHistEE_
TH1F * h_genhscp_scaloret_nohscp
Definition: HSCPValidator.h:82
edm::InputTag ebSimHitTag_
Definition: HSCPValidator.h:93
TH1F * simHitsEcalDigiMatchTimeHistEE_
std::string intToString(int num)
void makeSimDigiPlotsECAL(const edm::Event &iEvent)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
TH2F * simHitsEcalEnergyVsTimeHistEE_
TH1F * rpcBXBarrel_[6]
edm::InputTag eeSimHitTag_
Definition: HSCPValidator.h:94
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
TH1F * residualsRPCRecHitSimDigis_
TH1F * simHitsEcalDigiMatchIEtaHist_
int layer() const
Definition: RPCDetId.h:111
Definition: DetId.h:20
TH1F * rpcBXEndCap_[3]
TH1F * simHitsEcalNumHistEB_
void makeGenPlots(const edm::Event &iEvent)
edm::Service< TFileService > fileService
TH1F * digisEcalNumHistEB_
TH1F * simTrackParticleEtaHist_
Definition: HSCPValidator.h:86
bool doSimTrackPlots_
Definition: HSCPValidator.h:62
TH1F * simHitsEcalDigiMatchIPhiHist_
std::vector< size_type > Keys
TH1F * simHitsEcalDigiMatchEnergyHistEB_
const T & get() const
Definition: EventSetup.h:55
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:14
long long int num
Definition: procUtils.cc:71
TH1F * particleStatusHist_
Definition: HSCPValidator.h:76
edm::InputTag EBDigiCollection_
Definition: HSCPValidator.h:96
TH1F * particlePHist_
Definition: HSCPValidator.h:73
TH1F * h_genhscp_met
Definition: HSCPValidator.h:79
edm::InputTag EEDigiCollection_
Definition: HSCPValidator.h:97
T eta() const
Definition: PV3DBase.h:76
TH2F * RecoHSCPPtVsGenPt
static const int RPC
Definition: MuonSubdetId.h:16
edm::ESHandle< RPCGeometry > rpcGeo
Definition: HSCPValidator.h:99
TH1F * simTrackParticlePhiHist_
Definition: HSCPValidator.h:87
T * make() const
make new ROOT object
void makeSimDigiPlotsRPC(const edm::Event &iEvent)
tuple cout
Definition: gather_cfg.py:121
void makeHLTPlots(const edm::Event &iEvent)
TH1F * simTrackParticleBetaHist_
Definition: HSCPValidator.h:90
T x() const
Definition: PV3DBase.h:62
std::vector< SimTrack > SimTrackContainer
edm::InputTag simTrackTag_
Definition: HSCPValidator.h:95
TH1F * simHitsEcalEnergyHistEB_
std::vector< int > Vids
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
TH1F * simTrackParticlePHist_
Definition: HSCPValidator.h:88
virtual void endJob()
TH1F * particleBetaInverseHist_
Definition: HSCPValidator.h:78
int adc() const
get the ADC sample (12 bits)
TH1F * simHitsEcalTimeHistEB_
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:66
int station() const
Definition: RPCDetId.h:99