CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MultiTrackValidator.cc
Go to the documentation of this file.
3 
6 
27 
31 
32 #include "TMath.h"
33 #include <TF1.h>
34 
35 //#include <iostream>
36 
37 using namespace std;
38 using namespace edm;
39 
41 
43  //theExtractor = IsoDepositExtractorFactory::get()->create( extractorName, extractorPSet, consumesCollector());
44 
45  ParameterSet psetForHistoProducerAlgo = pset.getParameter<ParameterSet>("histoProducerAlgoBlock");
46  string histoProducerAlgoName = psetForHistoProducerAlgo.getParameter<string>("ComponentName");
47  histoProducerAlgo_ = MTVHistoProducerAlgoFactory::get()->create(histoProducerAlgoName ,psetForHistoProducerAlgo, consumesCollector());
48 
49  dirName_ = pset.getParameter<std::string>("dirName");
50  assMapInput = pset.getParameter< edm::InputTag >("associatormap");
51  associatormapStR = mayConsume<reco::SimToRecoCollection>(assMapInput);
52  associatormapRtS = mayConsume<reco::RecoToSimCollection>(assMapInput);
53  UseAssociators = pset.getParameter< bool >("UseAssociators");
54 
55  m_dEdx1Tag = mayConsume<reco::DeDxData>(pset.getParameter< edm::InputTag >("dEdx1Tag"));
56  m_dEdx2Tag = mayConsume<reco::DeDxData>(pset.getParameter< edm::InputTag >("dEdx2Tag"));
57 
58  tpSelector = TrackingParticleSelector(pset.getParameter<double>("ptMinTP"),
59  pset.getParameter<double>("minRapidityTP"),
60  pset.getParameter<double>("maxRapidityTP"),
61  pset.getParameter<double>("tipTP"),
62  pset.getParameter<double>("lipTP"),
63  pset.getParameter<int>("minHitTP"),
64  pset.getParameter<bool>("signalOnlyTP"),
65  pset.getParameter<bool>("chargedOnlyTP"),
66  pset.getParameter<bool>("stableOnlyTP"),
67  pset.getParameter<std::vector<int> >("pdgIdTP"));
68 
70  pset.getParameter<double>("minRapidityTP"),
71  pset.getParameter<double>("maxRapidityTP"),
72  pset.getParameter<double>("tipTP"),
73  pset.getParameter<double>("lipTP"),
74  pset.getParameter<int>("minHitTP"),
75  pset.getParameter<bool>("chargedOnlyTP"),
76  pset.getParameter<std::vector<int> >("pdgIdTP"));
77 
78  useGsf = pset.getParameter<bool>("useGsf");
79  runStandalone = pset.getParameter<bool>("runStandalone");
80 
81  _simHitTpMapTag = mayConsume<SimHitTPAssociationProducer::SimHitTPAssociationList>(pset.getParameter<edm::InputTag>("simHitTpMapTag"));
82 
83  if (!UseAssociators) {
84  associators.clear();
85  associators.push_back(assMapInput.label());
86  }
87 
88 }
89 
90 
92 
93 
95 
96  //int j=0; //is This Necessary ???
97  for (unsigned int ww=0;ww<associators.size();ww++){
98  for (unsigned int www=0;www<label.size();www++){
99  ibook.cd();
100  InputTag algo = label[www];
101  string dirName=dirName_;
102  if (algo.process()!="")
103  dirName+=algo.process()+"_";
104  if(algo.label()!="")
105  dirName+=algo.label()+"_";
106  if(algo.instance()!="")
107  dirName+=algo.instance()+"_";
108  if (dirName.find("Tracks")<dirName.length()){
109  dirName.replace(dirName.find("Tracks"),6,"");
110  }
111  string assoc= associators[ww];
112  if (assoc.find("Track")<assoc.length()){
113  assoc.replace(assoc.find("Track"),5,"");
114  }
115  dirName+=assoc;
116  std::replace(dirName.begin(), dirName.end(), ':', '_');
117 
118  ibook.setCurrentFolder(dirName.c_str());
119 
120  // vector of vector initialization
121  histoProducerAlgo_->initialize(); //TO BE FIXED. I'D LIKE TO AVOID THIS CALL
122 
123  string subDirName = dirName + "/simulation";
124  ibook.setCurrentFolder(subDirName.c_str());
125 
126  //Booking histograms concerning with simulated tracks
128 
129  ibook.cd();
130  ibook.setCurrentFolder(dirName.c_str());
131 
132  //Booking histograms concerning with reconstructed tracks
135 
136  if (UseAssociators) {
138  for (unsigned int w=0;w<associators.size();w++) {
139  setup.get<TrackAssociatorRecord>().get(associators[w],theAssociator);
140  associator.push_back( theAssociator.product() );
141  }//end loop w
142  }
143  }//end loop www
144  }// end loop ww
145 }
146 
147 
149  using namespace reco;
150 
151  edm::LogInfo("TrackValidator") << "\n====================================================" << "\n"
152  << "Analyzing new event" << "\n"
153  << "====================================================\n" << "\n";
154  edm::ESHandle<ParametersDefinerForTP> parametersDefinerTPHandle;
155  setup.get<TrackAssociatorRecord>().get(parametersDefiner,parametersDefinerTPHandle);
156  //Since we modify the object, we must clone it
157  auto parametersDefinerTP = parametersDefinerTPHandle->clone();
158 
159  edm::Handle<TrackingParticleCollection> TPCollectionHeff ;
160  event.getByToken(label_tp_effic,TPCollectionHeff);
161  const TrackingParticleCollection tPCeff = *(TPCollectionHeff.product());
162 
163  edm::Handle<TrackingParticleCollection> TPCollectionHfake ;
164  event.getByToken(label_tp_fake,TPCollectionHfake);
165  const TrackingParticleCollection tPCfake = *(TPCollectionHfake.product());
166 
167  if(parametersDefiner=="CosmicParametersDefinerForTP") {
169  //warning: make sure the TP collection used in the map is the same used in the MTV!
170  event.getByToken(_simHitTpMapTag,simHitsTPAssoc);
171  parametersDefinerTP->initEvent(simHitsTPAssoc);
172  cosmictpSelector.initEvent(simHitsTPAssoc);
173  }
174 
175  //if (tPCeff.size()==0) {edm::LogInfo("TrackValidator")
176  //<< "TP Collection for efficiency studies has size = 0! Skipping Event." ; return;}
177  //if (tPCfake.size()==0) {edm::LogInfo("TrackValidator")
178  //<< "TP Collection for fake rate studies has size = 0! Skipping Event." ; return;}
179 
180  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
181  event.getByToken(bsSrc,recoBeamSpotHandle);
182  reco::BeamSpot bs = *recoBeamSpotHandle;
183 
185  event.getByToken(label_pileupinfo,puinfoH);
186  PileupSummaryInfo puinfo;
187 
188  for (unsigned int puinfo_ite=0;puinfo_ite<(*puinfoH).size();++puinfo_ite){
189  if ((*puinfoH)[puinfo_ite].getBunchCrossing()==0){
190  puinfo=(*puinfoH)[puinfo_ite];
191  break;
192  }
193  }
194 
196  event.getByToken(label_tv,tvH);
197  TrackingVertexCollection tv = *tvH;
198 
199  int w=0; //counter counting the number of sets of histograms
200  for (unsigned int ww=0;ww<associators.size();ww++){
201  for (unsigned int www=0;www<label.size();www++){
202  //
203  //get collections from the event
204  //
205  edm::Handle<View<Track> > trackCollection;
206  if(!event.getByToken(labelToken[www], trackCollection)&&ignoremissingtkcollection_)continue;
207  //if (trackCollection->size()==0)
208  //edm::LogInfo("TrackValidator") << "TrackCollection size = 0!" ;
209  //continue;
210  //}
211  reco::RecoToSimCollection recSimColl;
212  reco::SimToRecoCollection simRecColl;
213  //associate tracks
214  if(UseAssociators){
215  edm::LogVerbatim("TrackValidator") << "Analyzing "
216  << label[www].process()<<":"
217  << label[www].label()<<":"
218  << label[www].instance()<<" with "
219  << associators[ww].c_str() <<"\n";
220 
221  LogTrace("TrackValidator") << "Calling associateRecoToSim method" << "\n";
222  recSimColl=associator[ww]->associateRecoToSim(trackCollection,
223  TPCollectionHfake,
224  &event,&setup);
225  LogTrace("TrackValidator") << "Calling associateSimToReco method" << "\n";
226  simRecColl=associator[ww]->associateSimToReco(trackCollection,
227  TPCollectionHeff,
228  &event,&setup);
229  }
230  else{
231  edm::LogVerbatim("TrackValidator") << "Analyzing "
232  << label[www].process()<<":"
233  << label[www].label()<<":"
234  << label[www].instance()<<" with "
235  << assMapInput.process()<<":"
236  << assMapInput.label()<<":"
237  << assMapInput.instance()<<"\n";
238 
239  Handle<reco::SimToRecoCollection > simtorecoCollectionH;
240  event.getByToken(associatormapStR,simtorecoCollectionH);
241  simRecColl= *(simtorecoCollectionH.product());
242 
243  Handle<reco::RecoToSimCollection > recotosimCollectionH;
244  event.getByToken(associatormapRtS,recotosimCollectionH);
245  recSimColl= *(recotosimCollectionH.product());
246  }
247 
248 
249 
250  // ########################################################
251  // fill simulation histograms (LOOP OVER TRACKINGPARTICLES)
252  // ########################################################
253 
254  //compute number of tracks per eta interval
255  //
256  edm::LogVerbatim("TrackValidator") << "\n# of TrackingParticles: " << tPCeff.size() << "\n";
257  int ats(0); //This counter counts the number of simTracks that are "associated" to recoTracks
258  int st(0); //This counter counts the number of simulated tracks passing the MTV selection (i.e. tpSelector(tp) )
259  unsigned sts(0); //This counter counts the number of simTracks surviving the bunchcrossing cut
260  unsigned asts(0); //This counter counts the number of simTracks that are "associated" to recoTracks surviving the bunchcrossing cut
261  for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){ //loop over TPs collection for tracking efficiency
262  TrackingParticleRef tpr(TPCollectionHeff, i);
263  TrackingParticle* tp=const_cast<TrackingParticle*>(tpr.get());
264  TrackingParticle::Vector momentumTP;
265  TrackingParticle::Point vertexTP;
266  double dxySim(0);
267  double dzSim(0);
268 
269  //---------- THIS PART HAS TO BE CLEANED UP. THE PARAMETER DEFINER WAS NOT MEANT TO BE USED IN THIS WAY ----------
270  //If the TrackingParticle is collison like, get the momentum and vertex at production state
271  if(parametersDefiner=="LhcParametersDefinerForTP")
272  {
273  if(! tpSelector(*tp)) continue;
274  momentumTP = tp->momentum();
275  vertexTP = tp->vertex();
276  //Calcualte the impact parameters w.r.t. PCA
277  TrackingParticle::Vector momentum = parametersDefinerTP->momentum(event,setup,tpr);
278  TrackingParticle::Point vertex = parametersDefinerTP->vertex(event,setup,tpr);
279  dxySim = (-vertex.x()*sin(momentum.phi())+vertex.y()*cos(momentum.phi()));
280  dzSim = vertex.z() - (vertex.x()*momentum.x()+vertex.y()*momentum.y())/sqrt(momentum.perp2())
281  * momentum.z()/sqrt(momentum.perp2());
282  }
283  //If the TrackingParticle is comics, get the momentum and vertex at PCA
284  if(parametersDefiner=="CosmicParametersDefinerForTP")
285  {
286  if(! cosmictpSelector(tpr,&bs,event,setup)) continue;
287  momentumTP = parametersDefinerTP->momentum(event,setup,tpr);
288  vertexTP = parametersDefinerTP->vertex(event,setup,tpr);
289  dxySim = (-vertexTP.x()*sin(momentumTP.phi())+vertexTP.y()*cos(momentumTP.phi()));
290  dzSim = vertexTP.z() - (vertexTP.x()*momentumTP.x()+vertexTP.y()*momentumTP.y())/sqrt(momentumTP.perp2())
291  * momentumTP.z()/sqrt(momentumTP.perp2());
292  }
293  //---------- THE PART ABOVE HAS TO BE CLEANED UP. THE PARAMETER DEFINER WAS NOT MEANT TO BE USED IN THIS WAY ----------
294 
295  st++; //This counter counts the number of simulated tracks passing the MTV selection (i.e. tpSelector(tp) )
296 
297  // in the coming lines, histos are filled using as input
298  // - momentumTP
299  // - vertexTP
300  // - dxySim
301  // - dzSim
302 
304 
305 
306  // ##############################################
307  // fill RecoAssociated SimTracks' histograms
308  // ##############################################
309  // bool isRecoMatched(false); // UNUSED
310  const reco::Track* matchedTrackPointer=0;
311  std::vector<std::pair<RefToBase<Track>, double> > rt;
312  if(simRecColl.find(tpr) != simRecColl.end()){
313  rt = (std::vector<std::pair<RefToBase<Track>, double> >) simRecColl[tpr];
314  if (rt.size()!=0) {
315  ats++; //This counter counts the number of simTracks that have a recoTrack associated
316  // isRecoMatched = true; // UNUSED
317  matchedTrackPointer = rt.begin()->first.get();
318  edm::LogVerbatim("TrackValidator") << "TrackingParticle #" << st
319  << " with pt=" << sqrt(momentumTP.perp2())
320  << " associated with quality:" << rt.begin()->second <<"\n";
321  }
322  }else{
323  edm::LogVerbatim("TrackValidator")
324  << "TrackingParticle #" << st
325  << " with pt,eta,phi: "
326  << sqrt(momentumTP.perp2()) << " , "
327  << momentumTP.eta() << " , "
328  << momentumTP.phi() << " , "
329  << " NOT associated to any reco::Track" << "\n";
330  }
331 
332 
333 
334 
335  int nSimHits = tp->numberOfTrackerHits();
336 
337  double vtx_z_PU = vertexTP.z();
338  for (size_t j = 0; j < tv.size(); j++) {
339  if (tp->eventId().event() == tv[j].eventId().event()) {
340  vtx_z_PU = tv[j].position().z();
341  break;
342  }
343  }
344 
345  histoProducerAlgo_->fill_recoAssociated_simTrack_histos(w,*tp,momentumTP,vertexTP,dxySim,dzSim,nSimHits,matchedTrackPointer,puinfo.getPU_NumInteractions(), vtx_z_PU);
346  sts++;
347  if (matchedTrackPointer) asts++;
348 
349 
350 
351 
352  } // End for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){
353 
354  //if (st!=0) h_tracksSIM[w]->Fill(st); // TO BE FIXED
355 
356 
357  // ##############################################
358  // fill recoTracks histograms (LOOP OVER TRACKS)
359  // ##############################################
360  edm::LogVerbatim("TrackValidator") << "\n# of reco::Tracks with "
361  << label[www].process()<<":"
362  << label[www].label()<<":"
363  << label[www].instance()
364  << ": " << trackCollection->size() << "\n";
365 
366  int sat(0); //This counter counts the number of recoTracks that are associated to SimTracks from Signal only
367  int at(0); //This counter counts the number of recoTracks that are associated to SimTracks
368  int rT(0); //This counter counts the number of recoTracks in general
369 
370 
371  // dE/dx
372  // at some point this could be generalized, with a vector of tags and a corresponding vector of Handles
373  // I'm writing the interface such to take vectors of ValueMaps
376  std::vector<edm::ValueMap<reco::DeDxData> > v_dEdx;
377  v_dEdx.clear();
378  //std::cout << "PIPPO: label is " << label[www] << std::endl;
379  if (label[www].label()=="generalTracks") {
380  try {
381  event.getByToken(m_dEdx1Tag, dEdx1Handle);
382  const edm::ValueMap<reco::DeDxData> dEdx1 = *dEdx1Handle.product();
383  event.getByToken(m_dEdx2Tag, dEdx2Handle);
384  const edm::ValueMap<reco::DeDxData> dEdx2 = *dEdx2Handle.product();
385  v_dEdx.push_back(dEdx1);
386  v_dEdx.push_back(dEdx2);
387  } catch (cms::Exception e){
388  LogTrace("TrackValidator") << "exception found: " << e.what() << "\n";
389  }
390  }
391  //end dE/dx
392 
393  for(View<Track>::size_type i=0; i<trackCollection->size(); ++i){
394 
395  RefToBase<Track> track(trackCollection, i);
396  rT++;
397 
398  bool isSigSimMatched(false);
399  bool isSimMatched(false);
400  bool isChargeMatched(true);
401  int numAssocRecoTracks = 0;
402  int tpbx = 0;
403  int nSimHits = 0;
404  double sharedFraction = 0.;
405  std::vector<std::pair<TrackingParticleRef, double> > tp;
406  if(recSimColl.find(track) != recSimColl.end()){
407  tp = recSimColl[track];
408  if (tp.size()!=0) {
409  nSimHits = tp[0].first->numberOfTrackerHits();
410  sharedFraction = tp[0].second;
411  isSimMatched = true;
412  if (tp[0].first->charge() != track->charge()) isChargeMatched = false;
413  if(simRecColl.find(tp[0].first) != simRecColl.end()) numAssocRecoTracks = simRecColl[tp[0].first].size();
414  //std::cout << numAssocRecoTracks << std::endl;
415  tpbx = tp[0].first->eventId().bunchCrossing();
416  at++;
417  for (unsigned int tp_ite=0;tp_ite<tp.size();++tp_ite){
418  TrackingParticle trackpart = *(tp[tp_ite].first);
419  if ((trackpart.eventId().event() == 0) && (trackpart.eventId().bunchCrossing() == 0)){
420  isSigSimMatched = true;
421  sat++;
422  break;
423  }
424  }
425  edm::LogVerbatim("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt()
426  << " associated with quality:" << tp.begin()->second <<"\n";
427  }
428  } else {
429  edm::LogVerbatim("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt()
430  << " NOT associated to any TrackingParticle" << "\n";
431  }
432 
433 
434  histoProducerAlgo_->fill_generic_recoTrack_histos(w,*track,bs.position(),isSimMatched,isSigSimMatched, isChargeMatched, numAssocRecoTracks, puinfo.getPU_NumInteractions(), tpbx, nSimHits, sharedFraction);
435 
436  // dE/dx
437  // reco::TrackRef track2 = reco::TrackRef( trackCollection, i );
438  if (v_dEdx.size() > 0) histoProducerAlgo_->fill_dedx_recoTrack_histos(w,track, v_dEdx);
439  //if (v_dEdx.size() > 0) histoProducerAlgo_->fill_dedx_recoTrack_histos(track2, v_dEdx);
440 
441 
442  //Fill other histos
443  //try{ //Is this really necessary ????
444 
445  if (tp.size()==0) continue;
446 
448 
449  TrackingParticleRef tpr = tp.begin()->first;
450 
451  /* TO BE FIXED LATER
452  if (associators[ww]=="TrackAssociatorByChi2"){
453  //association chi2
454  double assocChi2 = -tp.begin()->second;//in association map is stored -chi2
455  h_assochi2[www]->Fill(assocChi2);
456  h_assochi2_prob[www]->Fill(TMath::Prob((assocChi2)*5,5));
457  }
458  else if (associators[ww]=="quickTrackAssociatorByHits"){
459  double fraction = tp.begin()->second;
460  h_assocFraction[www]->Fill(fraction);
461  h_assocSharedHit[www]->Fill(fraction*track->numberOfValidHits());
462  }
463  */
464 
465 
466  //Get tracking particle parameters at point of closest approach to the beamline
467  TrackingParticle::Vector momentumTP = parametersDefinerTP->momentum(event,setup,tpr);
468  TrackingParticle::Point vertexTP = parametersDefinerTP->vertex(event,setup,tpr);
469  int chargeTP = tpr->charge();
470 
471  histoProducerAlgo_->fill_ResoAndPull_recoTrack_histos(w,momentumTP,vertexTP,chargeTP,
472  *track,bs.position());
473 
474 
475  //TO BE FIXED
476  //std::vector<PSimHit> simhits=tpr.get()->trackPSimHit(DetId::Tracker);
477  //nrecHit_vs_nsimHit_rec2sim[w]->Fill(track->numberOfValidHits(), (int)(simhits.end()-simhits.begin() ));
478 
479  /*
480  } // End of try{
481  catch (cms::Exception e){
482  LogTrace("TrackValidator") << "exception found: " << e.what() << "\n";
483  }
484  */
485 
486  } // End of for(View<Track>::size_type i=0; i<trackCollection->size(); ++i){
487 
489 
490  edm::LogVerbatim("TrackValidator") << "Total Simulated: " << st << "\n"
491  << "Total Associated (simToReco): " << ats << "\n"
492  << "Total Reconstructed: " << rT << "\n"
493  << "Total Associated (recoToSim): " << at << "\n"
494  << "Total Fakes: " << rT-at << "\n";
495 
496  w++;
497  } // End of for (unsigned int www=0;www<label.size();www++){
498  } //END of for (unsigned int ww=0;ww<associators.size();ww++){
499 
500 }
501 
503  int w=0;
504  for (unsigned int ww=0;ww<associators.size();ww++){
505  for (unsigned int www=0;www<label.size();www++){
509  w++;
510  }
511  }
512  //if ( out.size() != 0 && dbe_ ) dbe_->save(out);
513 }
514 
515 
516 
virtual char const * what() const
Definition: Exception.cc:141
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
void endRun(edm::Run const &, edm::EventSetup const &)
Method called at the end of the event loop.
int event() const
get the contents of the subdetector field (should be protected?)
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
CosmicTrackingParticleSelector cosmictpSelector
std::vector< TrackingParticle > TrackingParticleCollection
const_iterator end() const
last iterator over the map (read only)
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void cd(void)
Definition: DQMStore.cc:266
virtual void fill_dedx_recoTrack_histos(int count, edm::RefToBase< reco::Track > &trackref, const std::vector< edm::ValueMap< reco::DeDxData > > &v_dEdx)=0
Point vertex() const
Parent vertex position.
edm::Ref< GenParticleCollection > GenParticleRef
persistent reference to a GenParticle
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< const TrackAssociatorBase * > associator
void analyze(const edm::Event &, const edm::EventSetup &)
Method called once per event.
edm::EDGetTokenT< reco::RecoToSimCollection > associatormapRtS
virtual void fill_ResoAndPull_recoTrack_histos(int count, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, int chargeTP, const reco::Track &track, const math::XYZPoint &bsPosition)=0
edm::EDGetTokenT< TrackingVertexCollection > label_tv
virtual void bookRecoHistosForStandaloneRunning(DQMStore::IBooker &ibook)=0
uint16_t size_type
edm::EDGetTokenT< reco::SimToRecoCollection > associatormapStR
edm::EDGetTokenT< reco::BeamSpot > bsSrc
math::XYZPointD Point
point in the space
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
virtual void fill_recoAssociated_simTrack_histos(int count, const TrackingParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, int nSimHits, const reco::Track *track, int numVertices, double vertz)=0
std::vector< edm::InputTag > label
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
T sqrt(T t)
Definition: SSEVec.h:48
virtual void fill_generic_recoTrack_histos(int count, const reco::Track &track, const math::XYZPoint &bsPosition, bool isMatched, bool isSigMatched, bool isChargeMatched, int numAssocRecoTracks, int numVertices, int tpbunchcrossing, int nSimHits, double sharedFraction)=0
int bunchCrossing() const
get the detector field from this detid
double pt() const
track transverse momentum
Definition: TrackBase.h:129
TrackingParticleSelector tpSelector
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
unsigned int size_type
Definition: View.h:85
int j
Definition: DBlmapReader.cc:9
void initEvent(edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssocToSet) const
virtual void bookRecoHistos(DQMStore::IBooker &ibook)=0
virtual void fillProfileHistosFromVectors(int counter)=0
virtual void initialize()=0
virtual void bookSimHistos(DQMStore::IBooker &ibook)=0
edm::EDGetTokenT< reco::DeDxData > m_dEdx1Tag
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool first
Definition: L1TdeRCT.cc:75
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
#define LogTrace(id)
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
virtual void finalHistoFits(int counter)=0
MTVHistoProducerAlgo * histoProducerAlgo_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
virtual void fill_simAssociated_recoTrack_histos(int count, const reco::Track &track)=0
std::vector< TrackingVertex > TrackingVertexCollection
const T & get() const
Definition: EventSetup.h:55
virtual void fillHistosFromVectors(int counter)=0
T const * product() const
Definition: ESHandle.h:62
virtual void fill_trackBased_histos(int count, int assTracks, int numRecoTracks, int numSimTracks)=0
T const * product() const
Definition: Handle.h:81
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
Method called to book the DQM histograms.
std::string const & label() const
Definition: InputTag.h:42
EncodedEventId eventId() const
Signal source, crossing number.
std::string const & process() const
Definition: InputTag.h:46
edm::EDGetTokenT< reco::DeDxData > m_dEdx2Tag
Vector momentum() const
spatial momentum vector
Monte Carlo truth information used for tracking validation.
int charge() const
track electric charge
Definition: TrackBase.h:111
T w() const
std::vector< std::string > associators
int numberOfTrackerHits() const
The number of hits in the tracker. Hits on overlaps in the same layer count separately.
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
math::XYZVectorD Vector
point in the space
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
virtual void fill_generic_simTrack_histos(int counter, const TrackingParticle::Vector &, const TrackingParticle::Point &vertex, int bx)=0
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
std::string const & instance() const
Definition: InputTag.h:43
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.
T get(const Candidate &c)
Definition: component.h:55
Definition: Run.h:41
virtual ~MultiTrackValidator()
Destructor.
list at
Definition: asciidump.py:428