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