CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackerSeedValidator.cc
Go to the documentation of this file.
3 
7 
28 
29 #include <TF1.h>
30 
31 using namespace std;
32 using namespace edm;
33 
35 
37  //theExtractor = IsoDepositExtractorFactory::get()->create( extractorName, extractorPSet, consumesCollector());
38 
39  ParameterSet psetForHistoProducerAlgo = pset.getParameter<ParameterSet>("histoProducerAlgoBlock");
40  string histoProducerAlgoName = psetForHistoProducerAlgo.getParameter<string>("ComponentName");
41  histoProducerAlgo_ = MTVHistoProducerAlgoFactory::get()->create(histoProducerAlgoName ,psetForHistoProducerAlgo, consumesCollector());
42 
43  dirName_ = pset.getParameter<std::string>("dirName");
44 
45  tpSelector = TrackingParticleSelector(pset.getParameter<double>("ptMinTP"),
46  pset.getParameter<double>("minRapidityTP"),
47  pset.getParameter<double>("maxRapidityTP"),
48  pset.getParameter<double>("tipTP"),
49  pset.getParameter<double>("lipTP"),
50  pset.getParameter<int>("minHitTP"),
51  pset.getParameter<bool>("signalOnlyTP"),
52  pset.getParameter<bool>("chargedOnlyTP"),
53  pset.getParameter<bool>("stableOnlyTP"),
54  pset.getParameter<std::vector<int> >("pdgIdTP"));
55 
56  builderName = pset.getParameter<std::string>("TTRHBuilder");
57 
58  for (auto const& associator: associators) {
59  associatorTokens.push_back(consumes<reco::TrackToTrackingParticleAssociator>(associator));
60  }
61 }
62 
64 
66  setup.get<IdealMagneticFieldRecord>().get(theMF);
68 
69  for (unsigned int ww=0;ww<associators.size();ww++){
70  for (unsigned int www=0;www<label.size();www++){
71 
72  ibook.cd();
73  InputTag algo = label[www];
74  string dirName=dirName_;
75  if (algo.process()!="")
76  dirName+=algo.process()+"_";
77  if(algo.label()!="")
78  dirName+=algo.label()+"_";
79  if(algo.instance()!="")
80  dirName+=algo.instance()+"_";
81  // if (dirName.find("Seeds")<dirName.length()){
82  // dirName.replace(dirName.find("Seeds"),6,"");
83  // }
84  string assoc= associators[ww].label();;
85  if (assoc.find("Track")<assoc.length()){
86  assoc.replace(assoc.find("Track"),5,"");
87  }
88  dirName+=assoc;
89  std::replace(dirName.begin(), dirName.end(), ':', '_');
90 
91  ibook.setCurrentFolder(dirName.c_str());
92 
93  string subDirName = dirName + "/simulation";
94  ibook.setCurrentFolder(subDirName.c_str());
95 
96  //Booking histograms concerning with simulated tracks
98 
99  ibook.cd();
100  ibook.setCurrentFolder(dirName.c_str());
101 
102  //Booking histograms concerning with reconstructed tracks
105  }//end loop www
106  }// end loop ww
107 }
108 
109 
111 
112  edm::LogInfo("TrackValidator") << "\n====================================================" << "\n"
113  << "Analyzing new event" << "\n"
114  << "====================================================\n" << "\n";
115 
116  edm::ESHandle<ParametersDefinerForTP> parametersDefinerTP;
117  setup.get<TrackAssociatorRecord>().get(parametersDefiner,parametersDefinerTP);
118 
119  edm::Handle<TrackingParticleCollection> TPCollectionHeff ;
120  event.getByToken(label_tp_effic,TPCollectionHeff);
121  const TrackingParticleCollection tPCeff = *(TPCollectionHeff.product());
122 
123  edm::Handle<TrackingParticleCollection> TPCollectionHfake ;
124  event.getByToken(label_tp_fake,TPCollectionHfake);
125  const TrackingParticleCollection tPCfake = *(TPCollectionHfake.product());
126 
127  if (tPCeff.size()==0) {edm::LogInfo("TrackValidator") << "TP Collection for efficiency studies has size = 0! Skipping Event." ; return;}
128  if (tPCfake.size()==0) {edm::LogInfo("TrackValidator") << "TP Collection for fake rate studies has size = 0! Skipping Event." ; return;}
129 
130  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
131  event.getByToken(bsSrc,recoBeamSpotHandle);
132  reco::BeamSpot bs = *recoBeamSpotHandle;
133 
135  event.getByToken(label_pileupinfo,puinfoH);
136  PileupSummaryInfo puinfo;
137 
138  for (unsigned int puinfo_ite=0;puinfo_ite<(*puinfoH).size();++puinfo_ite){
139  if ((*puinfoH)[puinfo_ite].getBunchCrossing()==0){
140  puinfo=(*puinfoH)[puinfo_ite];
141  break;
142  }
143  }
144 
146  event.getByToken(label_tv,tvH);
147  TrackingVertexCollection tv = *tvH;
148 
149  // Calculate the number of 3D layers for TPs
150  //
151  // I would have preferred to produce the ValueMap to Event and read
152  // it from there, but there would have been quite some number of
153  // knock-on effects, and again the fact that we take two TP
154  // collections do not support Ref<TP>'s would have complicated that.
155  //
156  // In principle we could use the SimHitTPAssociationList read above
157  // for parametersDefinerIsCosmic_, but since we don't currently
158  // support Ref<TP>s, we can't in general use it since eff/fake TP
159  // collections can, in general, be different.
160  TrackingParticleNumberOfLayers tpNumberOfLayersAlgo(event, simHitTokens_);
161  auto nlayers_tPCeff_ptrs = tpNumberOfLayersAlgo.calculate(TPCollectionHeff, setup);
162  const auto& nLayers_tPCeff = *(std::get<TrackingParticleNumberOfLayers::nTrackerLayers>(nlayers_tPCeff_ptrs));
163  const auto& nPixelLayers_tPCeff = *(std::get<TrackingParticleNumberOfLayers::nPixelLayers>(nlayers_tPCeff_ptrs));
164  const auto& nStripMonoAndStereoLayers_tPCeff = *(std::get<TrackingParticleNumberOfLayers::nStripMonoAndStereoLayers>(nlayers_tPCeff_ptrs));
165 
166  int w=0;
167  for (unsigned int ww=0;ww<associators.size();ww++){
169  event.getByToken(associatorTokens[ww], theAssociator);
170  const reco::TrackToTrackingParticleAssociator *associator = theAssociator.product();
171 
172  for (unsigned int www=0;www<label.size();www++){
173  edm::LogVerbatim("TrackValidator") << "Analyzing "
174  << label[www].process()<<":"
175  << label[www].label()<<":"
176  << label[www].instance()<<" with "
177  << associators[ww] <<"\n";
178  //
179  //get collections from the event
180  //
181  edm::Handle<edm::View<TrajectorySeed> > seedCollection;
182  event.getByToken(labelTokenSeed[www], seedCollection);
183  if (seedCollection->size()==0) {
184  edm::LogInfo("TrackValidator") << "SeedCollection size = 0!" ;
185  continue;
186  }
187 
188  //associate seeds
189  LogTrace("TrackValidator") << "Calling associateRecoToSim method" << "\n";
190  reco::RecoToSimCollectionSeed recSimColl=associator->associateRecoToSim(seedCollection,
191  TPCollectionHfake);
192  LogTrace("TrackValidator") << "Calling associateSimToReco method" << "\n";
193  reco::SimToRecoCollectionSeed simRecColl=associator->associateSimToReco(seedCollection,
194  TPCollectionHeff);
195 
196  //
197  //fill simulation histograms
198  //compute number of seeds per eta interval
199  //
200  edm::LogVerbatim("TrackValidator") << "\n# of TrackingParticles: " << tPCeff.size() << "\n";
201  int ats(0); //This counter counts the number of simTracks that are "associated" to recoTracks
202  int st(0); //This counter counts the number of simulated tracks passing the MTV selection (i.e. tpSelector(tp) )
203  unsigned sts(0); //This counter counts the number of simTracks surviving the bunchcrossing cut
204  unsigned asts(0); //This counter counts the number of simTracks that are "associated" to recoTracks surviving the bunchcrossing cut
205  for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){
206  TrackingParticleRef tp(TPCollectionHeff, i);
207 
208  if (tp->charge()==0) continue;
209 
210  if(! tpSelector(*tp)) continue;
211 
212  TrackingParticle::Vector momentumTP = tp->momentum();
213  TrackingParticle::Point vertexTP = tp->vertex();
214  //Calcualte the impact parameters w.r.t. PCA
215  TrackingParticle::Vector momentum = parametersDefinerTP->momentum(event,setup,tp);
216  TrackingParticle::Point vertex = parametersDefinerTP->vertex(event,setup,tp);
217  double dxySim = (-vertex.x()*sin(momentum.phi())+vertex.y()*cos(momentum.phi()));
218  double dzSim = vertex.z() - (vertex.x()*momentum.x()+vertex.y()*momentum.y())/sqrt(momentum.perp2())
219  * momentum.z()/sqrt(momentum.perp2());
220 
221  if(tp->eventId().bunchCrossing() == 0) {
222  st++;
223  }
224 
225  histoProducerAlgo_->fill_generic_simTrack_histos(w,momentumTP,vertexTP, tp->eventId().bunchCrossing());
226 
227  const TrajectorySeed* matchedSeedPointer=0;
228  std::vector<std::pair<edm::RefToBase<TrajectorySeed>, double> > rt;
229  if(simRecColl.find(tp) != simRecColl.end()){
230  rt = simRecColl[tp];
231  if (rt.size()!=0) {
232  ats++;
233  matchedSeedPointer = rt.begin()->first.get();
234  edm::LogVerbatim("TrackValidator") << "TrackingParticle #" << st
235  << " with pt=" << sqrt(tp->momentum().perp2())
236  << " associated with quality:" << rt.begin()->second <<"\n";
237  }
238  }else{
239  edm::LogVerbatim("TrackValidator") << "TrackingParticle #" << st
240  << " with pt=" << sqrt(tp->momentum().perp2())
241  << " NOT associated to any TrajectorySeed" << "\n";
242  }
243 
244  int nSimHits = tp->numberOfTrackerHits();
245  int nSimLayers = nLayers_tPCeff[tp];
246  int nSimPixelLayers = nPixelLayers_tPCeff[tp];
247  int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tp];
248 
249  //fixme convert seed into track
250  reco::Track* matchedTrackPointer = 0;
251  if (matchedSeedPointer) {
252  TSCBLBuilderNoMaterial tscblBuilder;
253  TransientTrackingRecHit::RecHitPointer recHit = theTTRHBuilder->build(&*(matchedSeedPointer->recHits().second-1));
254  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( matchedSeedPointer->startingState(), recHit->surface(), theMF.product());
255  TrajectoryStateClosestToBeamLine tsAtClosestApproachSeed = tscblBuilder(*state.freeState(),bs);//as in TrackProducerAlgorithm
256  if(!(tsAtClosestApproachSeed.isValid())){
257  edm::LogVerbatim("SeedValidator")<<"TrajectoryStateClosestToBeamLine not valid";
258  continue;
259  }
260  const reco::TrackBase::Point vSeed1(tsAtClosestApproachSeed.trackStateAtPCA().position().x(),
261  tsAtClosestApproachSeed.trackStateAtPCA().position().y(),
262  tsAtClosestApproachSeed.trackStateAtPCA().position().z());
263  const reco::TrackBase::Vector pSeed(tsAtClosestApproachSeed.trackStateAtPCA().momentum().x(),
264  tsAtClosestApproachSeed.trackStateAtPCA().momentum().y(),
265  tsAtClosestApproachSeed.trackStateAtPCA().momentum().z());
266  //GlobalPoint vSeed(vSeed1.x()-bs.x0(),vSeed1.y()-bs.y0(),vSeed1.z()-bs.z0());
267  PerigeeTrajectoryError seedPerigeeErrors = PerigeeConversions::ftsToPerigeeError(tsAtClosestApproachSeed.trackStateAtPCA());
268  matchedTrackPointer = new reco::Track(0.,0., vSeed1, pSeed, 1, seedPerigeeErrors.covarianceMatrix());
269  matchedTrackPointer->appendHits(matchedSeedPointer->recHits().first,matchedSeedPointer->recHits().second);
270  }
271 
272  double dR=0;//fixme: plots vs dR not implemented for now
273  histoProducerAlgo_->fill_recoAssociated_simTrack_histos(w,*tp,tp->momentum(),tp->vertex(),dxySim,dzSim,nSimHits,nSimLayers,nSimPixelLayers,nSimStripMonoAndStereoLayers,
274  matchedTrackPointer,puinfo.getPU_NumInteractions(),dR);
275 
276  sts++;
277  if (matchedTrackPointer) asts++;
278 
279  } // End for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){
280 
282 
283  //
284  //fill reconstructed seed histograms
285  //
286  edm::LogVerbatim("TrackValidator") << "\n# of TrajectorySeeds with "
287  << label[www].process()<<":"
288  << label[www].label()<<":"
289  << label[www].instance()
290  << ": " << seedCollection->size() << "\n";
291  int sat(0); //This counter counts the number of recoTracks that are associated to SimTracks from Signal only
292  int at(0); //This counter counts the number of recoTracks that are associated to SimTracks
293  int rT(0); //This counter counts the number of recoTracks in general
294 
295  TSCBLBuilderNoMaterial tscblBuilder;
296  for(TrajectorySeedCollection::size_type i=0; i<seedCollection->size(); ++i){
297  edm::RefToBase<TrajectorySeed> seed(seedCollection, i);
298  rT++;
299 
300  //get parameters and errors from the seed state
301  TransientTrackingRecHit::RecHitPointer recHit = theTTRHBuilder->build(&*(seed->recHits().second-1));
303  TrajectoryStateClosestToBeamLine tsAtClosestApproachSeed = tscblBuilder(*state.freeState(),bs);//as in TrackProducerAlgorithm
304  if(!(tsAtClosestApproachSeed.isValid())){
305  edm::LogVerbatim("SeedValidator")<<"TrajectoryStateClosestToBeamLine not valid";
306  continue;
307  }
308  const reco::TrackBase::Point vSeed1(tsAtClosestApproachSeed.trackStateAtPCA().position().x(),
309  tsAtClosestApproachSeed.trackStateAtPCA().position().y(),
310  tsAtClosestApproachSeed.trackStateAtPCA().position().z());
311  const reco::TrackBase::Vector pSeed(tsAtClosestApproachSeed.trackStateAtPCA().momentum().x(),
312  tsAtClosestApproachSeed.trackStateAtPCA().momentum().y(),
313  tsAtClosestApproachSeed.trackStateAtPCA().momentum().z());
314  //GlobalPoint vSeed(vSeed1.x()-bs.x0(),vSeed1.y()-bs.y0(),vSeed1.z()-bs.z0());
315  PerigeeTrajectoryError seedPerigeeErrors = PerigeeConversions::ftsToPerigeeError(tsAtClosestApproachSeed.trackStateAtPCA());
316 
317  //fixme
318  reco::Track* trackFromSeed = new reco::Track(0.,0., vSeed1, pSeed, 1, seedPerigeeErrors.covarianceMatrix());
319  trackFromSeed->appendHits(seed->recHits().first,seed->recHits().second);
320 
321  bool isSigSimMatched(false);
322  bool isSimMatched(false);
323  bool isChargeMatched(true);
324  int numAssocSeeds = 0;
325  int nSimHits = 0;
326  double sharedFraction = 0.;
327  std::vector<std::pair<TrackingParticleRef, double> > tp;
328  if(recSimColl.find(seed) != recSimColl.end()) {
329  tp = recSimColl[seed];
330  if (tp.size()!=0) {
331 
332  nSimHits = tp[0].first->numberOfTrackerHits();
333  sharedFraction = tp[0].second;
334  isSimMatched = true;
335  if (tp[0].first->charge() != seed->startingState().parameters().charge()) isChargeMatched = false;
336  if(simRecColl.find(tp[0].first) != simRecColl.end()) numAssocSeeds = simRecColl[tp[0].first].size();
337  //std::cout << numAssocRecoTracks << std::endl;
338 
339  at++;
340 
341  for (unsigned int tp_ite=0;tp_ite<tp.size();++tp_ite){
342  TrackingParticle trackpart = *(tp[tp_ite].first);
343  if ((trackpart.eventId().event() == 0) && (trackpart.eventId().bunchCrossing() == 0)){
344  isSigSimMatched = true;
345  sat++;
346  break;
347  }
348  }
349 
350 
351  edm::LogVerbatim("SeedValidator") << "TrajectorySeed #" << rT << " associated with quality:" << tp.begin()->second <<"\n";
352  }
353  } else {
354  edm::LogVerbatim("SeedValidator") << "TrajectorySeed #" << rT << " NOT associated to any TrackingParticle" << "\n";
355  }
356 
357  double dR = 0.;//fixme: plots vs dR not implemented for now
358  histoProducerAlgo_->fill_generic_recoTrack_histos(w,*trackFromSeed,bs.position(),isSimMatched,isSigSimMatched,
359  isChargeMatched, numAssocSeeds,
360  puinfo.getPU_NumInteractions(),
361  nSimHits, sharedFraction, dR);
362 
363  //Fill other histos
364  try{
365  if (tp.size()==0) continue;
366 
368 
369  TrackingParticleRef tpr = tp.begin()->first;
370 
371  //compute tracking particle parameters at point of closest approach to the beamline
372  TrackingParticle::Vector momentumTP = parametersDefinerTP->momentum(event,setup,tpr);
373  TrackingParticle::Point vertexTP = parametersDefinerTP->vertex(event,setup,tpr);
374 
375  // LogTrace("SeedValidatorTEST") << "assocChi2=" << tp.begin()->second << "\n"
376  // << "" << "\n"
377  // << "ptREC=" << ptSeed << "\n"
378  // << "etaREC=" << etaSeed << "\n"
379  // << "qoverpREC=" << qoverpSeed << "\n"
380  // << "dxyREC=" << dxySeed << "\n"
381  // << "dzREC=" << dzSeed << "\n"
382  // << "thetaREC=" << thetaSeed << "\n"
383  // << "phiREC=" << phiSeed << "\n"
384  // << "" << "\n"
385  // << "qoverpError()=" << qoverpErrorSeed << "\n"
386  // << "dxyError()=" << dxyErrorSeed << "\n"
387  // << "dzError()=" << dzErrorSeed << "\n"
388  // << "thetaError()=" << lambdaErrorSeed << "\n"
389  // << "phiError()=" << phiErrorSeed << "\n"
390  // << "" << "\n"
391  // << "ptSIM=" << sqrt(assocTrack->momentum().perp2()) << "\n"
392  // << "etaSIM=" << assocTrack->momentum().Eta() << "\n"
393  // << "qoverpSIM=" << qoverpSim << "\n"
394  // << "dxySIM=" << dxySim << "\n"
395  // << "dzSIM=" << dzSim << "\n"
396  // << "thetaSIM=" << M_PI/2-lambdaSim << "\n"
397  // << "phiSIM=" << phiSim << "\n"
398  // << "" << "\n"
399  // << "contrib_Qoverp=" << contrib_Qoverp << "\n"
400  // << "contrib_dxy=" << contrib_dxy << "\n"
401  // << "contrib_dz=" << contrib_dz << "\n"
402  // << "contrib_theta=" << contrib_theta << "\n"
403  // << "contrib_phi=" << contrib_phi << "\n"
404  // << "" << "\n"
405  // <<"chi2PULL="<<contrib_Qoverp+contrib_dxy+contrib_dz+contrib_theta+contrib_phi<<"\n";
406 
407  histoProducerAlgo_->fill_ResoAndPull_recoTrack_histos(w,momentumTP,vertexTP,tpr->charge(),
408  *trackFromSeed,bs.position());
409 
410 
411  } catch (cms::Exception e){
412  LogTrace("SeedValidator") << "exception found: " << e.what() << "\n";
413  }
414  }// End of for(TrajectorySeedCollection::size_type i=0; i<seedCollection->size(); ++i)
415 
417 
418  edm::LogVerbatim("SeedValidator") << "Total Simulated: " << st << "\n"
419  << "Total Associated (simToReco): " << ats << "\n"
420  << "Total Reconstructed: " << rT << "\n"
421  << "Total Associated (recoToSim): " << at << "\n"
422  << "Total Fakes: " << rT-at << "\n";
423  w++;
424  }
425  }
426 }
virtual char const * what() const
Definition: Exception.cc:141
T getParameter(std::string const &) const
void analyze(const edm::Event &, const edm::EventSetup &) override
Method called once per event.
int i
Definition: DBlmapReader.cc:9
std::vector< edm::InputTag > associators
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, int nSimLayers, int nSimPixelLayers, int nSimStripMonoAndStereoLayers, const reco::Track *track, int numVertices, double dR)=0
int event() const
get the contents of the subdetector field (should be protected?)
const double w
Definition: UKUtility.cc:23
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
std::vector< TrackingParticle > TrackingParticleCollection
const_iterator end() const
last iterator over the map (read only)
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
void cd(void)
Definition: DQMStore.cc:266
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
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
uint16_t size_type
TrackingParticleSelector tpSelector
edm::EDGetTokenT< reco::BeamSpot > bsSrc
math::XYZPointD Point
point in the space
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
bool appendHits(const C &c)
append hit patterns from vector of hit references
Definition: TrackBase.h:448
std::vector< edm::InputTag > label
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > labelTokenSeed
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
T sqrt(T t)
Definition: SSEVec.h:48
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Method called to book the DQM histograms.
int bunchCrossing() const
get the detector field from this detid
FreeTrajectoryState const * freeState(bool withErrors=true) const
TrackerSeedValidator(const edm::ParameterSet &pset)
Constructor.
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
virtual void bookRecoHistos(DQMStore::IBooker &ibook)=0
virtual void bookSimHistos(DQMStore::IBooker &ibook)=0
math::XYZPoint Point
point in the space
Definition: TrackBase.h:83
virtual void bookSimTrackHistos(DQMStore::IBooker &ibook)=0
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
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
#define LogTrace(id)
std::shared_ptr< TrackingRecHit const > RecHitPointer
PTrajectoryStateOnDet const & startingState() const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
virtual void fill_simAssociated_recoTrack_histos(int count, const reco::Track &track)=0
T const * product() const
Definition: Handle.h:81
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
std::vector< TrackingVertex > TrackingVertexCollection
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
range recHits() const
virtual void fill_trackBased_histos(int count, int assTracks, int numRecoTracks, int numSimTracks)=0
TrackCharge charge() const
Charge (-1, 0 or 1)
const int getPU_NumInteractions() const
std::string const & label() const
Definition: InputTag.h:43
EncodedEventId eventId() const
Signal source, crossing number.
std::string const & process() const
Definition: InputTag.h:47
std::tuple< std::unique_ptr< edm::ValueMap< unsigned int > >, std::unique_ptr< edm::ValueMap< unsigned int > >, std::unique_ptr< edm::ValueMap< unsigned int > > > calculate(const edm::Handle< TrackingParticleCollection > &tps, const edm::EventSetup &iSetup) const
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 nSimHits, double sharedFraction, double dR)=0
Monte Carlo truth information used for tracking validation.
virtual void fill_simTrackBased_histos(int count, int numSimTracks)=0
PerigeeTrajectoryError ftsToPerigeeError(const FTS &originalFTS)
virtual ~TrackerSeedValidator()
Destructor.
const Point & position() const
position
Definition: BeamSpot.h:62
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
math::XYZVectorD Vector
point in the space
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
MTVHistoProducerAlgo * histoProducerAlgo_
virtual void fill_generic_simTrack_histos(int counter, const TrackingParticle::Vector &, const TrackingParticle::Point &vertex, int bx)=0
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:80
std::string const & instance() const
Definition: InputTag.h:44
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
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
const LocalTrajectoryParameters & parameters() const
Definition: Run.h:41
edm::ESHandle< MagneticField > theMF
list at
Definition: asciidump.py:428