CMS 3D CMS Logo

TestOutliers.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: TestOutliers
4 // Class: TestOutliers
5 //
13 //
14 // Original Author: Giuseppe Cerati
15 // Created: Mon Sep 17 10:31:30 CEST 2007
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 #include <vector>
22 
23 // user include files
26 
29 
35 #include <TH1.h>
36 #include <TH2.h>
37 #include <TFile.h>
49 
50 //
51 // class decleration
52 //
53 
54 class TestOutliers : public edm::EDAnalyzer {
55 public:
56  explicit TestOutliers(const edm::ParameterSet &);
57  ~TestOutliers() override;
58 
59 private:
60  void beginRun(edm::Run const &run, const edm::EventSetup &) override;
61  void analyze(const edm::Event &, const edm::EventSetup &) override;
62  void endJob() override;
63 
64  // ----------member data ---------------------------
65  edm::InputTag trackTagsOut_; //used to select what tracks to read from configuration file
66  edm::InputTag trackTagsOld_; //used to select what tracks to read from configuration file
67  edm::InputTag tpTags_; //used to select what tracks to read from configuration file
73  TFile *file;
86  TH2F *posxy, *poszr;
102  *mergedhittype;
108 };
109 //
110 // constants, enums and typedefs
111 //
112 
113 //
114 // static data member definitions
115 //
116 
117 using namespace edm;
118 
119 //
120 // constructors and destructor
121 //
123  : trackTagsOut_(iConfig.getUntrackedParameter<edm::InputTag>("tracksOut")),
124  trackTagsOld_(iConfig.getUntrackedParameter<edm::InputTag>("tracksOld")),
125  tpTags_(iConfig.getUntrackedParameter<edm::InputTag>("tp")),
126  trackerHitAssociatorConfig_(consumesCollector()),
127  theAssociatorOldToken(consumes<reco::TrackToTrackingParticleAssociator>(
128  iConfig.getUntrackedParameter<edm::InputTag>("TrackAssociatorByHitsOld"))),
129  theAssociatorOutToken(consumes<reco::TrackToTrackingParticleAssociator>(
130  iConfig.getUntrackedParameter<edm::InputTag>("TrackAssociatorByHitsOut"))),
131  out(iConfig.getParameter<std::string>("out")) {
132  LogTrace("TestOutliers") << "constructor";
133  // ParameterSet cuts = iConfig.getParameter<ParameterSet>("RecoTracksCuts");
134  // selectRecoTracks = RecoTrackSelector(cuts.getParameter<double>("ptMin"),
135  // cuts.getParameter<double>("minRapidity"),
136  // cuts.getParameter<double>("maxRapidity"),
137  // cuts.getParameter<double>("tip"),
138  // cuts.getParameter<double>("lip"),
139  // cuts.getParameter<int>("minHit"),
140  // cuts.getParameter<double>("maxChi2"));
141 
142  LogTrace("TestOutliers") << "end constructor";
143 }
144 
146  // do anything here that needs to be done at desctruction time
147  // (e.g. close files, deallocate resources etc.)
148 }
149 
150 //
151 // member functions
152 //
153 
154 // ------------ method called to for each event ------------
156  //Retrieve tracker topology from geometry
158  iSetup.get<TrackerTopologyRcd>().get(tTopo);
159 
160  using namespace edm;
161  using namespace std;
162  using reco::TrackCollection;
163 
164  LogTrace("TestOutliers") << "analyze event #" << iEvent.id();
165 
167  iEvent.getByLabel(trackTagsOut_, tracksOut);
169  iEvent.getByLabel(trackTagsOld_, tracksOld);
171  iEvent.getByLabel(tpTags_, tps);
173  iEvent.getByLabel("offlineBeamSpot", beamSpot);
174 
176 
178  iEvent.getByToken(theAssociatorOldToken, hAssociatorOld);
179  const reco::TrackToTrackingParticleAssociator *theAssociatorOld = hAssociatorOld.product();
180 
182  iEvent.getByToken(theAssociatorOutToken, hAssociatorOut);
183  const reco::TrackToTrackingParticleAssociator *theAssociatorOut = hAssociatorOut.product();
184 
185  reco::RecoToSimCollection recSimCollOut = theAssociatorOut->associateRecoToSim(tracksOut, tps);
186  reco::RecoToSimCollection recSimCollOld = theAssociatorOld->associateRecoToSim(tracksOld, tps);
187  sizeOut->Fill(recSimCollOut.size());
188  sizeOld->Fill(recSimCollOld.size());
189  sizeOutT->Fill(tracksOut->size());
190  sizeOldT->Fill(tracksOld->size());
191 
192  LogTrace("TestOutliers") << "tOld size=" << tracksOld->size() << " tOut size=" << tracksOut->size()
193  << " aOld size=" << recSimCollOld.size() << " aOut size=" << recSimCollOut.size();
194 
195 #if 0
196  LogTrace("TestOutliers") << "recSimCollOld.size()=" << recSimCollOld.size() ;
197  for(reco::TrackCollection::size_type j=0; j<tracksOld->size(); ++j){
198  reco::TrackRef trackOld(tracksOld, j);
199  //if ( !selectRecoTracks( *trackOld,beamSpot.product() ) ) continue;
200  LogTrace("TestOutliers") << "trackOld->pt()=" << trackOld->pt() << " trackOld->numberOfValidHits()=" << trackOld->numberOfValidHits();
201  std::vector<pair<TrackingParticleRef, double> > tpOld;
202  if(recSimCollOld.find(trackOld) != recSimCollOld.end()){
203  tpOld = recSimCollOld[trackOld];
204  if (tpOld.size()!=0) LogTrace("TestOutliers") << " associated" ;
205  else LogTrace("TestOutliers") << " NOT associated" ;
206  } else LogTrace("TestOutliers") << " NOT associated" ;
207  }
208  LogTrace("TestOutliers") << "recSimCollOut.size()=" << recSimCollOut.size() ;
209  for(reco::TrackCollection::size_type j=0; j<tracksOut->size(); ++j){
210  reco::TrackRef trackOut(tracksOut, j);
211  //if ( !selectRecoTracks( *trackOut,beamSpot.product() ) ) continue;
212  LogTrace("TestOutliers") << "trackOut->pt()=" << trackOut->pt() << " trackOut->numberOfValidHits()=" << trackOut->numberOfValidHits();
213  std::vector<pair<TrackingParticleRef, double> > tpOut;
214  if(recSimCollOut.find(trackOut) != recSimCollOut.end()){
215  tpOut = recSimCollOut[trackOut];
216  if (tpOut.size()!=0) LogTrace("TestOutliers") << " associated" ;
217  else LogTrace("TestOutliers") << " NOT associated" ;
218  } else LogTrace("TestOutliers") << " NOT associated" ;
219  }
220 #endif
221 
222  LogTrace("TestOutliers") << "tracksOut->size()=" << tracksOut->size();
223  LogTrace("TestOutliers") << "tracksOld->size()=" << tracksOld->size();
224 
225  std::vector<unsigned int> outused;
226  for (unsigned int j = 0; j < tracksOld->size(); ++j) {
227  countOldT->Fill(1);
228  edm::RefToBase<reco::Track> trackOld(tracksOld, j);
229  LogTrace("TestOutliers") << "now track old with id=" << j << " seed ref=" << trackOld->seedRef().get()
230  << " pt=" << trackOld->pt() << " eta=" << trackOld->eta()
231  << " chi2=" << trackOld->normalizedChi2()
232  << " tip= " << fabs(trackOld->dxy(beamSpot->position()))
233  << " lip= " << fabs(trackOld->dsz(beamSpot->position()));
234 
235  // if (i==tracksOut->size()) {
236  // if(recSimCollOld.find(trackOld) != recSimCollOld.end()){
237  // vector<pair<TrackingParticleRef, double> > tpOld;
238  // tpOld = recSimCollOld[trackOld];
239  // if (tpOld.size()!=0) {
240  // LogTrace("TestOutliers") <<"no match: old associated and out lost! old has #hits=" << trackOld->numberOfValidHits()
241  // << " and fraction=" << tpOld.begin()->second;
242  // if (tpOld.begin()->second>0.5) hitsPerTrackLost->Fill(trackOld->numberOfValidHits());
243  // }
244  // }
245  // continue;
246  // }
247 
248  std::vector<unsigned int> outtest; //all the out tracks with the same seed ref
249  for (unsigned int k = 0; k < tracksOut->size(); ++k) {
251  if (tmpOut->seedRef() == trackOld->seedRef()) {
252  outtest.push_back(k);
253  }
254  }
255 
257  if (outtest.size() == 1) { // if only one that's it
258  trackOut = edm::RefToBase<reco::Track>(tracksOut, outtest[0]);
259  LogTrace("TestOutliers") << "now track out with id=" << outtest[0] << " seed ref=" << trackOut->seedRef().get()
260  << " pt=" << trackOut->pt();
261  outused.push_back(outtest[0]);
262  } else if (outtest.size() > 1) { //if > 1 take the one that shares all the hits with the old track
263  for (unsigned int p = 0; p < outtest.size(); ++p) {
264  edm::RefToBase<reco::Track> tmpOut = edm::RefToBase<reco::Track>(tracksOut, outtest[p]);
265  bool allhits = true;
266  for (trackingRecHit_iterator itOut = tmpOut->recHitsBegin(); itOut != tmpOut->recHitsEnd(); itOut++) {
267  if ((*itOut)->isValid()) {
268  bool thishit = false;
269  for (trackingRecHit_iterator itOld = trackOld->recHitsBegin(); itOld != trackOld->recHitsEnd(); itOld++) {
270  if ((*itOld)->isValid()) {
271  const TrackingRecHit *kt = &(**itOld);
272  if ((*itOut)->sharesInput(kt, TrackingRecHit::some)) {
273  thishit = true;
274  break;
275  }
276  }
277  }
278  if (!thishit)
279  allhits = false;
280  }
281  }
282  if (allhits) {
283  trackOut = edm::RefToBase<reco::Track>(tracksOut, outtest[p]);
284  LogTrace("TestOutliers") << "now track out with id=" << outtest[p]
285  << " seed ref=" << trackOut->seedRef().get() << " pt=" << trackOut->pt();
286  outused.push_back(outtest[p]);
287  }
288  }
289  }
290 
291  if (outtest.empty() || trackOut.get() == nullptr) { //no out track found for the old track
292  if (recSimCollOld.find(trackOld) != recSimCollOld.end()) {
293  vector<pair<TrackingParticleRef, double> > tpOld;
294  tpOld = recSimCollOld[trackOld];
295  if (!tpOld.empty()) {
296  LogTrace("TestOutliers") << "no match: old associated and out lost! old has #hits="
297  << trackOld->numberOfValidHits() << " and fraction=" << tpOld.begin()->second;
298  if (tpOld.begin()->second > 0.5)
299  hitsPerTrackLost->Fill(trackOld->numberOfValidHits());
300  }
301  }
302  LogTrace("TestOutliers") << "...skip to next old track";
303  continue;
304  }
305 
306  //look if old and out are associated
307  LogTrace("TestOutliers") << "trackOut->seedRef()=" << trackOut->seedRef().get()
308  << " trackOld->seedRef()=" << trackOld->seedRef().get();
309  bool oldAssoc = recSimCollOld.find(trackOld) != recSimCollOld.end();
310  bool outAssoc = recSimCollOut.find(trackOut) != recSimCollOut.end();
311  LogTrace("TestOutliers") << "outAssoc=" << outAssoc << " oldAssoc=" << oldAssoc;
312 
313  // if ( trackOut->seedRef()!= trackOld->seedRef() ||
314  // (trackOut->seedRef() == trackOld->seedRef() && trackOut->numberOfValidHits()>trackOld->numberOfValidHits()) ) {
315  // LogTrace("TestOutliers") <<"out and old tracks does not match...";
316  // LogTrace("TestOutliers") <<"old has #hits=" << trackOld->numberOfValidHits();
317  // std::vector<pair<TrackingParticleRef, double> > tpOld;
318  // if(recSimCollOld.find(trackOld) != recSimCollOld.end()) {
319  // tpOld = recSimCollOld[trackOld];
320  // if (tpOld.size()!=0) {
321  // LogTrace("TestOutliers") <<"old was associated with fraction=" << tpOld.begin()->second;
322  // if (tpOld.begin()->second>0.5) hitsPerTrackLost->Fill(trackOld->numberOfValidHits());
323  // }
324  // }
325  // LogTrace("TestOutliers") <<"...skip to next old track";
326  // continue;
327  // }
328  // //++i;
329  countOutT->Fill(1);
330 
331  //if ( !selectRecoTracks( *trackOld,beamSpot.product() ) ) continue;//no more cuts
332 
333  tracks->Fill(0); //FIXME
334 
336  TrackingParticleRef tprOut;
337  TrackingParticleRef tprOld;
338  double fracOut;
339  std::vector<unsigned int> tpids;
340  std::vector<std::pair<TrackingParticleRef, double> > tpOut;
341  std::vector<pair<TrackingParticleRef, double> > tpOld;
342  //contare outliers delle tracce che erano associate e non lo sono piu!!!!
343 
344  if (outAssoc) { //save the ids od the tp associate to the out track
345  tpOut = recSimCollOut[trackOut];
346  if (!tpOut.empty()) {
347  countOutA->Fill(1);
348  tprOut = tpOut.begin()->first;
349  fracOut = tpOut.begin()->second;
350  for (TrackingParticle::g4t_iterator g4T = tprOut->g4Track_begin(); g4T != tprOut->g4Track_end(); ++g4T) {
351  tpids.push_back(g4T->trackId());
352  }
353  }
354  }
355 
356  if (oldAssoc) { //save the ids od the tp associate to the old track
357  tpOld = recSimCollOld[trackOld];
358  if (!tpOld.empty()) {
359  tprOld = tpOld.begin()->first;
360  // LogTrace("TestOutliers") <<"old associated and out not! old has #hits=" << trackOld->numberOfValidHits()
361  // << " and fraction=" << tpOld.begin()->second;
362  // if (tpOld.begin()->second>0.5) hitsPerTrackLost->Fill(trackOld->numberOfValidHits());//deve essere un plot diverso tipo LostAssoc
363  if (tpOut.empty()) {
364  for (TrackingParticle::g4t_iterator g4T = tprOld->g4Track_begin(); g4T != tprOld->g4Track_end(); ++g4T) {
365  tpids.push_back(g4T->trackId());
366  }
367  }
368  }
369  }
370 
371  if (tprOut.get() != nullptr || tprOld.get() != nullptr) { //at least one of the tracks has to be associated
372 
373  tpr = tprOut.get() != nullptr ? tprOut : tprOld;
374 
375  const SimTrack *assocTrack = &(*tpr->g4Track_begin());
376 
377  //if ( trackOut->numberOfValidHits() < trackOld->numberOfValidHits() ) {
378  if (trackOut->numberOfValidHits() != trackOld->numberOfValidHits() ||
379  !(*trackOut->recHitsBegin())->sharesInput((*trackOld->recHitsBegin()), TrackingRecHit::some) ||
380  !(*(trackOut->recHitsEnd() - 1))
381  ->sharesInput(
382  (*(trackOld->recHitsEnd() - 1)),
384  some)) { //there are outliers if the number of valid hits is != or if the first and last hit does not match
385  LogTrace("TestOutliers") << "outliers for track with #hits=" << trackOut->numberOfValidHits();
386  tracks->Fill(1);
387  LogTrace("TestOutliers")
388  << "Out->pt=" << trackOut->pt() << " Old->pt=" << trackOld->pt() << " tp->pt="
389  << sqrt(tpr->momentum().perp2())
390  //<< " trackOut->ptError()=" << trackOut->ptError() << " trackOld->ptError()=" << trackOld->ptError()
391  << " Old->validHits=" << trackOld->numberOfValidHits() << " Out->validHits="
392  << trackOut->numberOfValidHits()
393  /*<< " fracOld=" << fracOld*/
394  << " fracOut=" << fracOut << " deltaHits=" << trackOld->numberOfValidHits() - trackOut->numberOfValidHits();
395 
396  //compute all the track parameters
397  double PtPullOut = (trackOut->pt() - sqrt(tpr->momentum().perp2())) / trackOut->ptError();
398  double PtPullOld = (trackOld->pt() - sqrt(tpr->momentum().perp2())) / trackOld->ptError();
399  histoPtOut->Fill(PtPullOut);
400  histoPtOld->Fill(PtPullOld);
401 
402  //LogTrace("TestOutliers") << "MagneticField";
404  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
405  FreeTrajectoryState ftsAtProduction(
406  GlobalPoint(tpr->vertex().x(), tpr->vertex().y(), tpr->vertex().z()),
407  GlobalVector(assocTrack->momentum().x(), assocTrack->momentum().y(), assocTrack->momentum().z()),
408  TrackCharge(trackOld->charge()),
409  theMF.product());
410  TSCPBuilderNoMaterial tscpBuilder;
411  TrajectoryStateClosestToPoint tsAtClosestApproach =
412  tscpBuilder(ftsAtProduction, GlobalPoint(0, 0, 0)); //as in TrackProducerAlgorithm
413  GlobalPoint v = tsAtClosestApproach.theState().position();
414  GlobalVector p = tsAtClosestApproach.theState().momentum();
415 
416  //LogTrace("TestOutliers") << "qoverpSim";
417  double qoverpSim = tsAtClosestApproach.charge() / p.mag();
418  double lambdaSim = M_PI / 2 - p.theta();
419  double phiSim = p.phi();
420  double dxySim = (-v.x() * sin(p.phi()) + v.y() * cos(p.phi()));
421  double dszSim = v.z() * p.perp() / p.mag() - (v.x() * p.x() + v.y() * p.y()) / p.perp() * p.z() / p.mag();
422  double d0Sim = -dxySim;
423  double dzSim = dszSim * p.mag() / p.perp();
424 
425  //LogTrace("TestOutliers") << "qoverpPullOut";
426  double qoverpPullOut = (trackOut->qoverp() - qoverpSim) / trackOut->qoverpError();
427  double qoverpPullOld = (trackOld->qoverp() - qoverpSim) / trackOld->qoverpError();
428  double lambdaPullOut = (trackOut->lambda() - lambdaSim) / trackOut->thetaError();
429  double lambdaPullOld = (trackOld->lambda() - lambdaSim) / trackOld->thetaError();
430  double phi0PullOut = (trackOut->phi() - phiSim) / trackOut->phiError();
431  double phi0PullOld = (trackOld->phi() - phiSim) / trackOld->phiError();
432  double d0PullOut = (trackOut->d0() - d0Sim) / trackOut->d0Error();
433  double d0PullOld = (trackOld->d0() - d0Sim) / trackOld->d0Error();
434  double dzPullOut = (trackOut->dz() - dzSim) / trackOut->dzError();
435  double dzPullOld = (trackOld->dz() - dzSim) / trackOld->dzError();
436 
437  //LogTrace("TestOutliers") << "histoQoverpOut";
438  histoQoverpOut->Fill(qoverpPullOut);
439  histoQoverpOld->Fill(qoverpPullOld);
440  histoPhiOut->Fill(phi0PullOut);
441  histoPhiOld->Fill(phi0PullOld);
442  histoD0Out->Fill(d0PullOut);
443  histoD0Old->Fill(d0PullOld);
444  histoDzOut->Fill(dzPullOut);
445  histoDzOld->Fill(dzPullOld);
446  histoLambdaOut->Fill(lambdaPullOut);
447  histoLambdaOld->Fill(lambdaPullOld);
448 
449  //delta number of valid hits
450  LogTrace("TestOutliers") << "deltahits=" << trackOld->numberOfValidHits() - trackOut->numberOfValidHits();
451  deltahits->Fill(trackOld->numberOfValidHits() - trackOut->numberOfValidHits());
452 
453  if (tprOut.get() != nullptr && tprOld.get() == nullptr) { //out associated and old not: gained track
454  if (!tpOld.empty() && tpOld.begin()->second <= 0.5) {
455  deltahitsAssocGained->Fill(trackOld->numberOfValidHits() - trackOut->numberOfValidHits());
456  hitsPerTrackAssocGained->Fill(trackOut->numberOfValidHits());
457  LogTrace("TestOutliers") << "a) gained (assoc) track out #hits==" << trackOut->numberOfValidHits()
458  << " old #hits=" << trackOld->numberOfValidHits();
459  } else {
460  deltahitsAssocGained->Fill(trackOld->numberOfValidHits() - trackOut->numberOfValidHits());
461  hitsPerTrackAssocGained->Fill(trackOut->numberOfValidHits());
462  LogTrace("TestOutliers") << "b) gained (assoc) track out #hits==" << trackOut->numberOfValidHits()
463  << " old #hits=" << trackOld->numberOfValidHits();
464  }
465  } else if (tprOut.get() == nullptr && tprOld.get() != nullptr) { //old associated and out not: lost track
466  LogTrace("TestOutliers") << "old associated and out not! old has #hits=" << trackOld->numberOfValidHits()
467  << " and fraction=" << tpOld.begin()->second;
468  if (tpOld.begin()->second > 0.5) {
469  hitsPerTrackAssocLost->Fill(trackOld->numberOfValidHits());
470  deltahitsAssocLost->Fill(trackOld->numberOfValidHits() - trackOut->numberOfValidHits());
471  }
472  }
473 
474  if (fabs(PtPullOut) < fabs(PtPullOld))
475  deltahitsOK->Fill(trackOld->numberOfValidHits() - trackOut->numberOfValidHits());
476  else
477  deltahitsNO->Fill(trackOld->numberOfValidHits() - trackOut->numberOfValidHits());
478 
479  //LogTrace("TestOutliers") << "RecoTrackSelector";
480  //if (selectRecoTracks(*trackOut,beamSpot.product())) okcutsOut->Fill(1); else okcutsOut->Fill(0);
481  //if (selectRecoTracks(*trackOld,beamSpot.product())) okcutsOld->Fill(1); else okcutsOld->Fill(0);
482 
483  LogTrace("TestOutliers") << "track old";
484  for (trackingRecHit_iterator itOld = trackOld->recHitsBegin(); itOld != trackOld->recHitsEnd(); itOld++) {
485  LogTrace("TestOutliers") << (*itOld)->isValid() << " " << (*itOld)->geographicalId().rawId();
486  }
487  LogTrace("TestOutliers") << "track out";
488  for (trackingRecHit_iterator itOut = trackOut->recHitsBegin(); itOut != trackOut->recHitsEnd(); itOut++) {
489  LogTrace("TestOutliers") << (*itOut)->isValid() << " " << (*itOut)->geographicalId().rawId();
490  }
491  //LogTrace("TestOutliers") << "itOut";
492 
493  vector<pair<int, trackingRecHit_iterator> > gainedlostoutliers;
494  //look for gained hits
495  for (trackingRecHit_iterator itOut = trackOut->recHitsBegin(); itOut != trackOut->recHitsEnd(); itOut++) {
496  bool gained = true;
497  if ((*itOut)->isValid()) {
498  for (trackingRecHit_iterator itOld = trackOld->recHitsBegin(); itOld != trackOld->recHitsEnd(); itOld++) {
499  if ((*itOld)->geographicalId().rawId() == (*itOut)->geographicalId().rawId())
500  gained = false;
501  }
502  if (gained) {
503  gainedlostoutliers.push_back(pair<int, trackingRecHit_iterator>(1, itOut));
504  LogTrace("TestOutliers") << "broken trajectory during old fit... gained hit "
505  << (*itOut)->geographicalId().rawId();
506  gainedhits->Fill(1);
507  }
508  }
509  }
510 
511  //look for outliers and lost hits
512  for (trackingRecHit_iterator itOld = trackOld->recHitsBegin(); itOld != trackOld->recHitsEnd(); itOld++) {
513  bool outlier = false;
514  bool lost = true;
515 
516  for (trackingRecHit_iterator itOut = trackOut->recHitsBegin(); itOut != trackOut->recHitsEnd(); itOut++) {
517  if ((*itOld)->geographicalId().rawId() == (*itOut)->geographicalId().rawId()) {
518  lost = false;
519  if ((*itOld)->isValid() && !(*itOut)->isValid() &&
520  (*itOld)->geographicalId().rawId() == (*itOut)->geographicalId().rawId()) {
521  LogTrace("TestOutliers") << (*itOld)->isValid() << " " << (*itOut)->isValid() << " "
522  << (*itOld)->geographicalId().rawId() << " "
523  << (*itOut)->geographicalId().rawId();
524  outlier = true;
525  }
526  }
527  }
528  if (lost)
529  gainedlostoutliers.push_back(pair<int, trackingRecHit_iterator>(2, itOld));
530  if (lost)
531  LogTrace("TestOutliers") << "lost";
532  else if (outlier)
533  gainedlostoutliers.push_back(pair<int, trackingRecHit_iterator>(3, itOld));
534  }
535 
536  for (std::vector<pair<int, trackingRecHit_iterator> >::iterator it = gainedlostoutliers.begin();
537  it != gainedlostoutliers.end();
538  ++it) {
539  LogTrace("TestOutliers") << "type of processed hit:" << it->first;
540  trackingRecHit_iterator itHit = it->second;
541  bool gained = false;
542  bool lost = false;
543  bool outlier = false;
544  if (it->first == 1)
545  gained = true;
546  else if (it->first == 2)
547  lost = true;
548  else if (it->first == 3)
549  outlier = true;
550 
551  if (outlier || lost || gained) {
552  //if (1) {
553 
554  if (lost && (*itHit)->isValid() == false) {
555  goodbadmergedLost->Fill(0);
556  LogTrace("TestOutliers") << "lost invalid";
557  continue;
558  } else if (gained && (*itHit)->isValid() == false) {
559  goodbadmergedGained->Fill(0);
560  LogTrace("TestOutliers") << "gained invalid";
561  continue;
562  }
563 
564  //LogTrace("TestOutliers") << "vector<SimHitIdpr>";
565  //look if the hit comes from a correct sim track
566  std::vector<SimHitIdpr> simTrackIds = hitAssociator.associateHitId(**itHit);
567  bool goodhit = false;
568  for (size_t j = 0; j < simTrackIds.size(); j++) {
569  for (size_t jj = 0; jj < tpids.size(); jj++) {
570  if (simTrackIds[j].first == tpids[jj])
571  goodhit = true;
572  break;
573  }
574  }
575 
576  //find what kind of hit is it
577  int clustersize = 0;
578  int hittypeval = 0;
579  int layerval = 0;
580  if (dynamic_cast<const SiPixelRecHit *>(&**itHit)) {
581  LogTrace("TestOutliers") << "SiPixelRecHit";
582  clustersize = ((const SiPixelRecHit *)(&**itHit))->cluster()->size();
583  hittypeval = 1;
584  } else if (dynamic_cast<const SiStripRecHit2D *>(&**itHit)) {
585  LogTrace("TestOutliers") << "SiStripRecHit2D";
586  clustersize = ((const SiStripRecHit2D *)(&**itHit))->cluster()->amplitudes().size();
587  hittypeval = 2;
588  } else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&**itHit)) {
589  LogTrace("TestOutliers") << "SiStripMatchedRecHit2D";
590  int clsize1 = ((const SiStripMatchedRecHit2D *)(&**itHit))->monoCluster().amplitudes().size();
591  int clsize2 = ((const SiStripMatchedRecHit2D *)(&**itHit))->stereoCluster().amplitudes().size();
592  if (clsize1 > clsize2)
593  clustersize = clsize1;
594  else
595  clustersize = clsize2;
596  hittypeval = 3;
597  } else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&**itHit)) {
598  LogTrace("TestOutliers") << "ProjectedSiStripRecHit2D";
599  clustersize =
600  ((const ProjectedSiStripRecHit2D *)(&**itHit))->originalHit().cluster()->amplitudes().size();
601  hittypeval = 4;
602  }
603 
604  //find the layer of the hit
605  int subdetId = (*itHit)->geographicalId().subdetId();
606  DetId id = (*itHit)->geographicalId();
607  int layerId = tTopo->layer(id);
608  layerval = subdetId * 10 + layerId;
609 
610  //LogTrace("TestOutliers") << "gpos";
611  GlobalPoint gpos = theG->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition());
612 
613  //get the vector of sim hit associated and choose the one with the largest energy loss
614  //double delta = 99999;
615  //LocalPoint rhitLPv = (*itHit)->localPosition();
616  //vector<PSimHit> assSimHits = hitAssociator.associateHit(**itHit);
617  //if (assSimHits.size()==0) continue;
618  //PSimHit shit;
619  //for(std::vector<PSimHit>::const_iterator m=assSimHits.begin(); m<assSimHits.end(); m++){
620  //if ((m->localPosition()-rhitLPv).mag()<delta) {
621  // shit=*m;
622  // delta = (m->localPosition()-rhitLPv).mag();
623  // }
624  //}
625  //LogTrace("TestOutliers") << "energyLoss_";
626  double energyLoss_ = 0.;
627  unsigned int monoId = 0;
628  std::vector<double> energyLossM;
629  std::vector<double> energyLossS;
630  std::vector<PSimHit> assSimHits = hitAssociator.associateHit(**itHit);
631  if (assSimHits.empty())
632  continue;
633  PSimHit shit;
634  std::vector<unsigned int> trackIds;
635  energyLossS.clear();
636  energyLossM.clear();
637  //LogTrace("TestOutliers") << "energyLossM";
638  for (std::vector<PSimHit>::const_iterator m = assSimHits.begin(); m < assSimHits.end(); m++) {
639  if (outlier)
640  energyLoss->Fill(m->energyLoss());
641  unsigned int tId = m->trackId();
642  if (find(trackIds.begin(), trackIds.end(), tId) == trackIds.end())
643  trackIds.push_back(tId);
644  LogTrace("TestOutliers") << "id=" << tId;
645  if (m->energyLoss() > energyLoss_) {
646  shit = *m;
647  energyLoss_ = m->energyLoss();
648  }
649  if (hittypeval == 3) {
650  if (monoId == 0)
651  monoId = m->detUnitId();
652  if (monoId == m->detUnitId()) {
653  energyLossM.push_back(m->energyLoss());
654  } else {
655  energyLossS.push_back(m->energyLoss());
656  }
657  //std::cout << "detUnitId=" << m->detUnitId() << " trackId=" << m->trackId() << " energyLoss=" << m->energyLoss() << std::endl;
658  } else {
659  energyLossM.push_back(m->energyLoss());
660  }
661  }
662  unsigned int nIds = trackIds.size();
663 
664  if (outlier) {
665  goodbadhits->Fill(goodhit);
666  posxy->Fill(fabs(gpos.x()), fabs(gpos.y()));
667  poszr->Fill(fabs(gpos.z()), sqrt(gpos.x() * gpos.x() + gpos.y() * gpos.y()));
668  process->Fill(shit.processType());
669  energyLossMax->Fill(energyLoss_);
670  }
671 
672  //look if the hit is shared and if is produced only by ionization processes
673  bool shared = true;
674  bool ioniOnly = true;
675  unsigned int idc = 0;
676  for (size_t jj = 0; jj < tpids.size(); jj++) {
677  idc += std::count(trackIds.begin(), trackIds.end(), tpids[jj]);
678  }
679  if (idc == trackIds.size()) {
680  shared = false;
681  }
682  for (std::vector<PSimHit>::const_iterator m = assSimHits.begin() + 1; m < assSimHits.end(); m++) {
683  if ((m->processType() != 7 && m->processType() != 8 && m->processType() != 9) &&
684  abs(m->particleType()) != 11) {
685  ioniOnly = false;
686  break;
687  }
688  }
689  if (ioniOnly && !shared) {
690  LogTrace("TestOutliers") << "delta";
691  }
692 
693  if (goodhit) {
694  if (outlier) {
695  goodprocess->Fill(shit.processType());
696  if (clustersize >= 4) {
697  goodhittype_clgteq4->Fill(hittypeval);
698  goodlayer_clgteq4->Fill(layerval);
699  } else {
700  goodhittype_cllt4->Fill(hittypeval);
701  goodlayer_cllt4->Fill(layerval);
702  }
703  //LogTrace("TestOutliers") << "hittypeval && clustersize";
704  if (hittypeval == 1 && clustersize >= 4)
705  goodpixgteq4_simvecsize->Fill(assSimHits.size());
706  if (hittypeval == 1 && clustersize < 4)
707  goodpixlt4_simvecsize->Fill(assSimHits.size());
708  if (hittypeval == 2 && clustersize >= 4)
709  goodst1gteq4_simvecsize->Fill(assSimHits.size());
710  if (hittypeval == 2 && clustersize < 4)
711  goodst1lt4_simvecsize->Fill(assSimHits.size());
712  if (hittypeval == 3 && clustersize >= 4)
713  goodst2gteq4_simvecsize->Fill(assSimHits.size());
714  if (hittypeval == 3 && clustersize < 4)
715  goodst2lt4_simvecsize->Fill(assSimHits.size());
716  if (hittypeval == 4 && clustersize >= 4)
717  goodprjgteq4_simvecsize->Fill(assSimHits.size());
718  if (hittypeval == 4 && clustersize < 4)
719  goodprjlt4_simvecsize->Fill(assSimHits.size());
720 
721  //LogTrace("TestOutliers") << "hittypeval";
722  if (hittypeval == 1)
723  goodpix_clustersize->Fill(clustersize);
724  if (hittypeval == 2)
725  goodst1_clustersize->Fill(clustersize);
726  if (hittypeval == 3)
727  goodst2_clustersize->Fill(clustersize);
728  if (hittypeval == 4)
729  goodprj_clustersize->Fill(clustersize);
730  if (hittypeval == 1)
731  goodpix_simvecsize->Fill(assSimHits.size());
732  if (hittypeval == 2)
733  goodst1_simvecsize->Fill(assSimHits.size());
734  if (hittypeval == 3)
735  goodst2_simvecsize->Fill(assSimHits.size());
736  if (hittypeval == 4)
737  goodprj_simvecsize->Fill(assSimHits.size());
738 
739  //LogTrace("TestOutliers") << "nOfTrackIds";
740  nOfTrackIds->Fill(nIds);
741  if (hittypeval != 3) {
742  if (energyLossM.size() > 1) {
743  sort(energyLossM.begin(), energyLossM.end(), greater<double>());
744  energyLossRatio->Fill(energyLossM[1] / energyLossM[0]);
745  }
746  } else {
747  //LogTrace("TestOutliers") << "hittypeval==3";
748  if (energyLossM.size() > 1 && energyLossS.size() <= 1) {
749  sort(energyLossM.begin(), energyLossM.end(), greater<double>());
750  energyLossRatio->Fill(energyLossM[1] / energyLossM[0]);
751  } else if (energyLossS.size() > 1 && energyLossM.size() <= 1) {
752  sort(energyLossS.begin(), energyLossS.end(), greater<double>());
753  energyLossRatio->Fill(energyLossS[1] / energyLossS[0]);
754  } else if (energyLossS.size() > 1 && energyLossM.size() > 1) {
755  sort(energyLossM.begin(), energyLossM.end(), greater<double>());
756  sort(energyLossS.begin(), energyLossS.end(), greater<double>());
757  energyLossM[1] / energyLossM[0] > energyLossS[1] / energyLossS[0]
758  ? energyLossRatio->Fill(energyLossM[1] / energyLossM[0])
759  : energyLossRatio->Fill(energyLossS[1] / energyLossS[0]);
760  }
761  }
762 
763  LogTrace("TestOutliers") << "before merged";
764  const SiStripMatchedRecHit2D *tmp = dynamic_cast<const SiStripMatchedRecHit2D *>(&**itHit);
765  LogTrace("TestOutliers") << "tmp=" << tmp;
766  LogTrace("TestOutliers") << "assSimHits.size()=" << assSimHits.size();
767  if ((assSimHits.size() > 1 && tmp == nullptr) || (assSimHits.size() > 2 && tmp != nullptr)) {
768  //std::cout << "MERGED HIT" << std::endl;
769  //LogTrace("TestOutliers") << "merged";
770  mergedlayer->Fill(layerval);
771  mergedcluster->Fill(clustersize);
772  mergedhittype->Fill(hittypeval);
773 
774  for (std::vector<PSimHit>::const_iterator m = assSimHits.begin(); m < assSimHits.end(); m++) {
775  unsigned int tId = m->trackId();
776  LogTrace("TestOutliers") << "component with id=" << tId << " eLoss=" << m->energyLoss()
777  << " proc=" << m->processType() << " part=" << m->particleType();
778  if (find(tpids.begin(), tpids.end(), tId) == tpids.end())
779  continue;
780  if (m->processType() == 2) {
781  //GlobalPoint gpos = theG->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition());
782  //GlobalPoint gpr = rhit->globalPosition();
784  .transform((*itHit)->localPositionError(),
785  theG->idToDet((*itHit)->geographicalId())->surface())
786  .matrix();
787  //AlgebraicSymMatrix ger = rhit->globalPositionError().matrix();
788  GlobalPoint gps =
789  theG->idToDet((*itHit)->geographicalId())->surface().toGlobal(m->localPosition());
790  //LogTrace("TestOutliers") << gpr << " " << gps << " " << ger;
791  ROOT::Math::SVector<double, 3> delta;
792  delta[0] = gpos.x() - gps.x();
793  delta[1] = gpos.y() - gps.y();
794  delta[2] = gpos.z() - gps.z();
795  LogTrace("TestOutliers") << delta << " " << ger;
796  double mpull = sqrt(delta[0] * delta[0] / ger[0][0] + delta[1] * delta[1] / ger[1][1] +
797  delta[2] * delta[2] / ger[2][2]);
798  LogTrace("TestOutliers") << "hit pull=" << mpull; //ger.similarity(delta);
799  mergedPull->Fill(mpull);
800  }
801  }
802  LogTrace("TestOutliers") << "end merged";
803  } else { //not merged=>good
804  //LogTrace("TestOutliers") << "goodlayer";
805  goodlayer->Fill(layerval);
806  goodcluster->Fill(clustersize);
807  goodhittype->Fill(hittypeval);
808  }
809  } //if (outlier)
810 
811  const SiPixelRecHit *pix = dynamic_cast<const SiPixelRecHit *>(&**itHit);
812  if ((hittypeval != 3 && assSimHits.size() < 2) || (hittypeval == 3 && assSimHits.size() < 3)) {
813  if (outlier) {
814  goodhittype_simvecsmall->Fill(hittypeval);
815  goodlayer_simvecsmall->Fill(layerval);
816  goodbadmerged->Fill(1);
817  if (pix) {
818  probXgood->Fill(pix->probabilityX());
819  probYgood->Fill(pix->probabilityY());
820  }
821  LogTrace("TestOutliers") << "out good";
822  } else if (lost) {
823  goodbadmergedLost->Fill(1);
824  LogTrace("TestOutliers") << "lost good";
825  } else if (gained) {
826  goodbadmergedGained->Fill(1);
827  LogTrace("TestOutliers") << "gained good";
828  }
829  LogTrace("TestOutliers") << "good";
830  } else {
831  if (outlier) {
832  goodhittype_simvecbig->Fill(hittypeval);
833  goodlayer_simvecbig->Fill(layerval);
834  if (ioniOnly && !shared) {
835  goodbadmerged->Fill(3);
836  if (pix) {
837  probXdelta->Fill(pix->probabilityX());
838  probYdelta->Fill(pix->probabilityY());
839  }
840  } else if (!ioniOnly && !shared) {
841  goodbadmerged->Fill(4);
842  if (pix) {
843  probXnoshare->Fill(pix->probabilityX());
844  probYnoshare->Fill(pix->probabilityY());
845  }
846  } else {
847  goodbadmerged->Fill(5);
848  if (pix) {
849  probXshared->Fill(pix->probabilityX());
850  probYshared->Fill(pix->probabilityY());
851  }
852  }
853  LogTrace("TestOutliers") << "out merged, ioniOnly=" << ioniOnly << " shared=" << shared;
854  } else if (lost) {
855  if (ioniOnly && !shared)
856  goodbadmergedLost->Fill(3);
857  else if (!ioniOnly && !shared)
858  goodbadmergedLost->Fill(4);
859  else
860  goodbadmergedLost->Fill(5);
861  LogTrace("TestOutliers") << "lost merged, ioniOnly=" << ioniOnly << " shared=" << shared;
862  } else if (gained) {
863  if (ioniOnly && !shared)
864  goodbadmergedGained->Fill(3);
865  else if (!ioniOnly && !shared)
866  goodbadmergedGained->Fill(4);
867  else
868  goodbadmergedGained->Fill(5);
869  LogTrace("TestOutliers") << "gained merged, ioniOnly=" << ioniOnly << " shared=" << shared;
870  }
871  LogTrace("TestOutliers") << "merged, ioniOnly=" << ioniOnly << " shared=" << shared;
872  }
873  } //if (goodhit)
874  else { //badhit
875  //LogTrace("TestOutliers") << "badhit";
876  if (outlier) {
877  badcluster->Fill(clustersize);
878  badhittype->Fill(hittypeval);
879  badlayer->Fill(layerval);
880  badprocess->Fill(shit.processType());
881  goodbadmerged->Fill(2);
882  const SiPixelRecHit *pix = dynamic_cast<const SiPixelRecHit *>(&**itHit);
883  if (pix) {
884  probXbad->Fill(pix->probabilityX());
885  probYbad->Fill(pix->probabilityY());
886  }
887  LogTrace("TestOutliers") << "out bad";
888  } else if (lost) {
889  goodbadmergedLost->Fill(2);
890  LogTrace("TestOutliers") << "lost bad";
891  } else if (gained) {
892  goodbadmergedGained->Fill(2);
893  LogTrace("TestOutliers") << "gained bad";
894  }
895  LogTrace("TestOutliers") << "bad";
896  }
897  }
898  }
899  }
900  //else if ( trackOut->numberOfValidHits() > trackOld->numberOfValidHits() ) {
901  else if (false) {
902  LogTrace("TestOutliers") << "outliers for track with #hits=" << trackOut->numberOfValidHits();
903  tracks->Fill(1);
904  LogTrace("TestOutliers")
905  << "Out->pt=" << trackOut->pt() << " Old->pt=" << trackOld->pt() << " tp->pt="
906  << sqrt(tpr->momentum().perp2())
907  //<< " trackOut->ptError()=" << trackOut->ptError() << " trackOld->ptError()=" << trackOld->ptError()
908  << " Old->validHits=" << trackOld->numberOfValidHits() << " Out->validHits="
909  << trackOut->numberOfValidHits()
910  /*<< " fracOld=" << fracOld*/
911  << " fracOut=" << fracOut << " deltaHits=" << trackOld->numberOfValidHits() - trackOut->numberOfValidHits();
912  LogTrace("TestOutliers") << "track with gained hits";
913  gainedhits2->Fill(trackOut->numberOfValidHits() - trackOld->numberOfValidHits());
914  } else {
915  LogTrace("TestOutliers") << "no outliers for track with #hits=" << trackOut->numberOfValidHits();
916  }
917  }
918  LogTrace("TestOutliers") << "end track old #" << j;
919  }
920 
921  for (unsigned int k = 0; k < tracksOut->size(); ++k) {
922  if (find(outused.begin(), outused.end(), k) == outused.end()) {
923  edm::RefToBase<reco::Track> trackOut(tracksOut, k);
924  bool outAssoc = recSimCollOut.find(trackOut) != recSimCollOut.end();
925  if (outAssoc) {
926  hitsPerTrackGained->Fill(trackOut->numberOfValidHits());
927  LogTrace("TestOutliers") << "gained track out id=" << k << " #hits==" << trackOut->numberOfValidHits();
928  }
929  }
930  }
931 }
932 
933 // ------------ method called once each job just before starting event loop ------------
936  const bool oldAddDir = TH1::AddDirectoryStatus();
937  TH1::AddDirectory(true);
938  file = new TFile(out.c_str(), "recreate");
939  histoPtOut = new TH1F("histoPtOut", "histoPtOut", 100, -10, 10);
940  histoPtOld = new TH1F("histoPtOld", "histoPtOld", 100, -10, 10);
941  histoQoverpOut = new TH1F("histoQoverpOut", "histoQoverpOut", 250, -25, 25);
942  histoQoverpOld = new TH1F("histoQoverpOld", "histoQoverpOld", 250, -25, 25);
943  histoPhiOut = new TH1F("histoPhiOut", "histoPhiOut", 250, -25, 25);
944  histoPhiOld = new TH1F("histoPhiOld", "histoPhiOld", 250, -25, 25);
945  histoD0Out = new TH1F("histoD0Out", "histoD0Out", 250, -25, 25);
946  histoD0Old = new TH1F("histoD0Old", "histoD0Old", 250, -25, 25);
947  histoDzOut = new TH1F("histoDzOut", "histoDzOut", 250, -25, 25);
948  histoDzOld = new TH1F("histoDzOld", "histoDzOld", 250, -25, 25);
949  histoLambdaOut = new TH1F("histoLambdaOut", "histoLambdaOut", 250, -25, 25);
950  histoLambdaOld = new TH1F("histoLambdaOld", "histoLambdaOld", 250, -25, 25);
951  deltahits = new TH1F("deltahits", "deltahits", 80, -40, 40);
952  deltahitsOK = new TH1F("deltahitsOK", "deltahitsOK", 20, 0, 20);
953  deltahitsNO = new TH1F("deltahitsNO", "deltahitsNO", 20, 0, 20);
954  okcutsOut = new TH1F("okcutsOut", "okcutsOut", 2, -0.5, 1.5);
955  okcutsOld = new TH1F("okcutsOld", "okcutsOld", 2, -0.5, 1.5);
956  tracks = new TH1F("tracks_", "tracks_", 2, -0.5, 1.5);
957  goodbadhits = new TH1F("goodbadhits", "goodbadhits", 2, -0.5, 1.5);
958  process = new TH1F("process", "process", 20, -0.5, 19.5);
959  goodcluster = new TH1F("goodcluster", "goodcluster", 40, -0.5, 39.5);
960  goodprocess = new TH1F("goodprocess", "goodprocess", 20, -0.5, 19.5);
961  badcluster = new TH1F("badcluster", "badcluster", 40, -0.5, 39.5);
962  badprocess = new TH1F("badprocess", "badprocess", 20, -0.5, 19.5);
963  goodhittype = new TH1F("goodhittype", "goodhittype", 5, -0.5, 4.5);
964  goodlayer = new TH1F("goodlayer", "goodlayer", 70, -0.5, 69.5);
965  goodhittype_clgteq4 = new TH1F("goodhittype_clgteq4", "goodhittype_clgteq4", 5, -0.5, 4.5);
966  goodlayer_clgteq4 = new TH1F("goodlayer_clgteq4", "goodlayer_clgteq4", 70, -0.5, 69.5);
967  goodhittype_cllt4 = new TH1F("goodhittype_cllt4", "goodhittype_cllt4", 5, -0.5, 4.5);
968  goodlayer_cllt4 = new TH1F("goodlayer_cllt4", "goodlayer_cllt4", 70, -0.5, 69.5);
969  badhittype = new TH1F("badhittype", "badhittype", 5, -0.5, 4.5);
970  badlayer = new TH1F("badlayer", "badlayer", 70, -0.5, 69.5);
971  posxy = new TH2F("posxy", "posxy", 1200, 0, 120, 1200, 0, 120);
972  poszr = new TH2F("poszr", "poszr", 3000, 0, 300, 1200, 0, 120);
973  goodpixgteq4_simvecsize = new TH1F("goodpixgteq4_simvecsize", "goodpixgteq4_simvecsize", 40, -0.5, 39.5);
974  goodpixlt4_simvecsize = new TH1F("goodpixlt4_simvecsize", "goodpixlt4_simvecsize", 40, -0.5, 39.5);
975  goodst1gteq4_simvecsize = new TH1F("goodst1gteq4_simvecsize", "goodst1gteq4_simvecsize", 40, -0.5, 39.5);
976  goodst1lt4_simvecsize = new TH1F("goodst1lt4_simvecsize", "goodst1lt4_simvecsize", 40, -0.5, 39.5);
977  goodst2gteq4_simvecsize = new TH1F("goodst2gteq4_simvecsize", "goodst2gteq4_simvecsize", 40, -0.5, 39.5);
978  goodst2lt4_simvecsize = new TH1F("goodst2lt4_simvecsize", "goodst2lt4_simvecsize", 40, -0.5, 39.5);
979  goodprjgteq4_simvecsize = new TH1F("goodprjgteq4_simvecsize", "goodprjgteq4_simvecsize", 40, -0.5, 39.5);
980  goodprjlt4_simvecsize = new TH1F("goodprjlt4_simvecsize", "goodprjlt4_simvecsize", 40, -0.5, 39.5);
981  goodpix_clustersize = new TH1F("goodpix_clustersize", "goodpix_clustersize", 40, -0.5, 39.5);
982  goodst1_clustersize = new TH1F("goodst1_clustersize", "goodst1_clustersize", 40, -0.5, 39.5);
983  goodst2_clustersize = new TH1F("goodst2_clustersize", "goodst2_clustersize", 40, -0.5, 39.5);
984  goodprj_clustersize = new TH1F("goodprj_clustersize", "goodprj_clustersize", 40, -0.5, 39.5);
985  goodpix_simvecsize = new TH1F("goodpix_simvecsize", "goodpix_simvecsize", 40, -0.5, 39.5);
986  goodst1_simvecsize = new TH1F("goodst1_simvecsize", "goodst1_simvecsize", 40, -0.5, 39.5);
987  goodst2_simvecsize = new TH1F("goodst2_simvecsize", "goodst2_simvecsize", 40, -0.5, 39.5);
988  goodprj_simvecsize = new TH1F("goodprj_simvecsize", "goodprj_simvecsize", 40, -0.5, 39.5);
989  goodhittype_simvecsmall = new TH1F("goodhittype_simvecsmall", "goodhittype_simvecsmall", 5, -0.5, 4.5);
990  goodlayer_simvecsmall = new TH1F("goodlayer_simvecsmall", "goodlayer_simvecsmall", 70, -0.5, 69.5);
991  goodhittype_simvecbig = new TH1F("goodhittype_simvecbig", "goodhittype_simvecbig", 5, -0.5, 4.5);
992  goodlayer_simvecbig = new TH1F("goodlayer_simvecbig", "goodlayer_simvecbig", 70, -0.5, 69.5);
993  goodbadmerged = new TH1F("goodbadmerged", "goodbadmerged", 5, 0.5, 5.5);
994  goodbadmergedLost = new TH1F("goodbadmergedLost", "goodbadmergedLost", 5, 0.5, 5.5);
995  goodbadmergedGained = new TH1F("goodbadmergedGained", "goodbadmergedGained", 5, 0.5, 5.5);
996  energyLoss = new TH1F("energyLoss", "energyLoss", 1000, 0, 0.1);
997  energyLossMax = new TH1F("energyLossMax", "energyLossMax", 1000, 0, 0.1);
998  energyLossRatio = new TH1F("energyLossRatio", "energyLossRatio", 100, 0, 1);
999  nOfTrackIds = new TH1F("nOfTrackIds", "nOfTrackIds", 10, 0, 10);
1000  mergedPull = new TH1F("mergedPull", "mergedPull", 100, 0, 10);
1001  mergedlayer = new TH1F("mergedlayer", "mergedlayer", 70, -0.5, 69.5);
1002  mergedhittype = new TH1F("mergedhittype", "mergedhittype", 5, -0.5, 4.5);
1003  mergedcluster = new TH1F("mergedcluster", "mergedcluster", 40, -0.5, 39.5);
1004  deltahitsAssocGained = new TH1F("deltahitsAssocGained", "deltahitsAssocGained", 80, -40, 40);
1005  deltahitsAssocLost = new TH1F("deltahitsAssocLost", "deltahitsAssocLost", 80, -40, 40);
1006  hitsPerTrackLost = new TH1F("hitsPerTrackLost", "hitsPerTrackLost", 40, -0.5, 39.5);
1007  hitsPerTrackAssocLost = new TH1F("hitsPerTrackAssocLost", "hitsPerTrackAssocLost", 40, -0.5, 39.5);
1008  hitsPerTrackGained = new TH1F("hitsPerTrackGained", "hitsPerTrackGained", 40, -0.5, 39.5);
1009  hitsPerTrackAssocGained = new TH1F("hitsPerTrackAssocGained", "hitsPerTrackAssocGained", 40, -0.5, 39.5);
1010  sizeOut = new TH1F("sizeOut", "sizeOut", 900, -0.5, 899.5);
1011  sizeOld = new TH1F("sizeOld", "sizeOld", 900, -0.5, 899.5);
1012  sizeOutT = new TH1F("sizeOutT", "sizeOutT", 900, -0.5, 899.5);
1013  sizeOldT = new TH1F("sizeOldT", "sizeOldT", 900, -0.5, 899.5);
1014  countOutA = new TH1F("countOutA", "countOutA", 2, 0, 2);
1015  countOutT = new TH1F("countOutT", "countOutT", 2, 0, 2);
1016  countOldT = new TH1F("countOldT", "countOldT", 2, 0, 2);
1017  gainedhits = new TH1F("gainedhits", "gainedhits", 2, 0, 2);
1018  gainedhits2 = new TH1F("gainedhits2", "gainedhits2", 30, -0.5, 29.5);
1019  probXgood = new TH1F("probXgood", "probXgood", 110, 0, 1.1);
1020  probXbad = new TH1F("probXbad", "probXbad", 110, 0, 1.1);
1021  probXdelta = new TH1F("probXdelta", "probXdelta", 110, 0, 1.1);
1022  probXshared = new TH1F("probXshared", "probXshared", 110, 0, 1.1);
1023  probXnoshare = new TH1F("probXnoshare", "probXnoshare", 110, 0, 1.1);
1024  probYgood = new TH1F("probYgood", "probYgood", 110, 0, 1.1);
1025  probYbad = new TH1F("probYbad", "probYbad", 110, 0, 1.1);
1026  probYdelta = new TH1F("probYdelta", "probYdelta", 110, 0, 1.1);
1027  probYshared = new TH1F("probYshared", "probYshared", 110, 0, 1.1);
1028  probYnoshare = new TH1F("probYnoshare", "probYnoshare", 110, 0, 1.1);
1029  TH1::AddDirectory(oldAddDir);
1030 }
1031 // ------------ method called once each job just after ending the event loop ------------
1033  LogTrace("TestOutliers") << "TestOutliers::endJob";
1034  file->Write();
1035  LogTrace("TestOutliers") << "outfile written";
1036  file->Close();
1037  LogTrace("TestOutliers") << "oufile closed";
1038  LogTrace("TestOutliers") << "exiting TestOutliers::endJob";
1039 }
1040 
1041 //define this as a plug-in
Vector3DBase
Definition: Vector3DBase.h:8
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
TestOutliers::goodprj_simvecsize
TH1F * goodprj_simvecsize
Definition: TestOutliers.cc:98
TestOutliers::histoD0Old
TH1F * histoD0Old
Definition: TestOutliers.cc:77
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TestOutliers::goodhittype_clgteq4
TH1F * goodhittype_clgteq4
Definition: TestOutliers.cc:84
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
TestOutliers::goodpix_simvecsize
TH1F * goodpix_simvecsize
Definition: TestOutliers.cc:95
TestOutliers::mergedcluster
TH1F * mergedcluster
Definition: TestOutliers.cc:101
CoreSimTrack::momentum
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:19
TestOutliers::gainedhits2
TH1F * gainedhits2
Definition: TestOutliers.cc:105
AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Definition: AlgebraicROOTObjects.h:21
TestOutliers::sizeOld
TH1F * sizeOld
Definition: TestOutliers.cc:103
edm::AssociationMap::find
const_iterator find(const key_type &k) const
find element with specified reference key
Definition: AssociationMap.h:173
reco::TrackBase::qoverpError
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:732
TestOutliers::tracks
TH1F * tracks
Definition: TestOutliers.cc:83
FreeTrajectoryState.h
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
reco::TrackBase::ptError
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:754
TestOutliers::goodlayer_clgteq4
TH1F * goodlayer_clgteq4
Definition: TestOutliers.cc:84
TestOutliers::probYbad
TH1F * probYbad
Definition: TestOutliers.cc:107
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
TrackerGeometry.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
TestOutliers::histoDzOld
TH1F * histoDzOld
Definition: TestOutliers.cc:78
TestOutliers::out
std::string out
Definition: TestOutliers.cc:72
makeMuonMisalignmentScenario.matrix
list matrix
Definition: makeMuonMisalignmentScenario.py:141
TestOutliers::probXbad
TH1F * probXbad
Definition: TestOutliers.cc:106
reco::Track::recHitsBegin
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
TestOutliers::probYdelta
TH1F * probYdelta
Definition: TestOutliers.cc:107
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator >
TestOutliers::histoPhiOut
TH1F * histoPhiOut
Definition: TestOutliers.cc:76
edm
HLT enums.
Definition: AlignableModifier.h:19
TestOutliers::tpTags_
edm::InputTag tpTags_
Definition: TestOutliers.cc:67
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::TrackToTrackingParticleAssociator::associateRecoToSim
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
Definition: TrackToTrackingParticleAssociator.h:64
TestOutliers::hitsPerTrackLost
TH1F * hitsPerTrackLost
Definition: TestOutliers.cc:80
TestOutliers::TestOutliers
TestOutliers(const edm::ParameterSet &)
Definition: TestOutliers.cc:122
reco::TrackBase::thetaError
double thetaError() const
error on theta
Definition: TrackBase.h:757
TestOutliers::goodpixgteq4_simvecsize
TH1F * goodpixgteq4_simvecsize
Definition: TestOutliers.cc:87
TrackingParticle::g4t_iterator
std::vector< SimTrack >::const_iterator g4t_iterator
Definition: TrackingParticle.h:41
TestOutliers::sizeOut
TH1F * sizeOut
Definition: TestOutliers.cc:103
reco::TrackToTrackingParticleAssociator
Definition: TrackToTrackingParticleAssociator.h:51
TestOutliers::histoPtOut
TH1F * histoPtOut
Definition: TestOutliers.cc:74
TestOutliers::goodbadhits
TH1F * goodbadhits
Definition: TestOutliers.cc:83
TestOutliers::goodbadmergedGained
TH1F * goodbadmergedGained
Definition: TestOutliers.cc:99
reco::TrackBase::dsz
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0,...
Definition: TrackBase.h:614
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
TestOutliers::goodprocess
TH1F * goodprocess
Definition: TestOutliers.cc:83
TestOutliers::trackTagsOld_
edm::InputTag trackTagsOld_
Definition: TestOutliers.cc:66
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
SiStripRecHit2D
Definition: SiStripRecHit2D.h:7
TrackerHitAssociator.h
TestOutliers::~TestOutliers
~TestOutliers() override
Definition: TestOutliers.cc:145
EDAnalyzer.h
TestOutliers::histoQoverpOld
TH1F * histoQoverpOld
Definition: TestOutliers.cc:75
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
TestOutliers::goodpix_clustersize
TH1F * goodpix_clustersize
Definition: TestOutliers.cc:91
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TrackerHitAssociator::Config
Definition: TrackerHitAssociator.h:57
TestOutliers::probXdelta
TH1F * probXdelta
Definition: TestOutliers.cc:106
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::Handle
Definition: AssociativeIterator.h:50
TrackQuality_cff.hitAssociator
hitAssociator
Definition: TrackQuality_cff.py:10
reco::TrackBase::numberOfValidHits
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:798
dqmdumpme.first
first
Definition: dqmdumpme.py:55
TestOutliers::goodbadmerged
TH1F * goodbadmerged
Definition: TestOutliers.cc:99
TrackToTrackingParticleAssociator
TestOutliers::histoPtOld
TH1F * histoPtOld
Definition: TestOutliers.cc:74
TestOutliers::endJob
void endJob() override
Definition: TestOutliers.cc:1032
ProjectedSiStripRecHit2D
Definition: ProjectedSiStripRecHit2D.h:8
TestOutliers::probYnoshare
TH1F * probYnoshare
Definition: TestOutliers.cc:107
SiPixelRecHit
Our base class.
Definition: SiPixelRecHit.h:23
TestOutliers::probYgood
TH1F * probYgood
Definition: TestOutliers.cc:107
TestOutliers::deltahitsAssocLost
TH1F * deltahitsAssocLost
Definition: TestOutliers.cc:80
edm::Ref< TrackCollection >
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
DetId
Definition: DetId.h:17
edm::AssociationMap::end
const_iterator end() const
last iterator over the map (read only)
Definition: AssociationMap.h:171
MakerMacros.h
TrackerTopology.h
TestOutliers::mergedlayer
TH1F * mergedlayer
Definition: TestOutliers.cc:101
TestOutliers::sizeOldT
TH1F * sizeOldT
Definition: TestOutliers.cc:103
ErrorFrameTransformer
Definition: ErrorFrameTransformer.h:12
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
TrackerTopologyRcd.h
Track.h
PSimHit::processType
unsigned short processType() const
Definition: PSimHit.h:120
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TestOutliers::nOfTrackIds
TH1F * nOfTrackIds
Definition: TestOutliers.cc:101
BeamSpot.h
TestOutliers::goodhittype
TH1F * goodhittype
Definition: TestOutliers.cc:84
TestOutliers::histoLambdaOut
TH1F * histoLambdaOut
Definition: TestOutliers.cc:79
TestOutliers
Definition: TestOutliers.cc:54
TestOutliers::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: TestOutliers.cc:155
TestOutliers::trackerHitAssociatorConfig_
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: TestOutliers.cc:68
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Track::recHitsEnd
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
TestOutliers::countOutT
TH1F * countOutT
Definition: TestOutliers.cc:104
IdealMagneticFieldRecord.h
edm::ESHandle< TrackerGeometry >
TestOutliers::countOldT
TH1F * countOldT
Definition: TestOutliers.cc:104
TestOutliers::process
TH1F * process
Definition: TestOutliers.cc:83
TestOutliers::deltahitsNO
TH1F * deltahitsNO
Definition: TestOutliers.cc:80
TestOutliers::countOutA
TH1F * countOutA
Definition: TestOutliers.cc:104
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
TestOutliers::goodlayer_cllt4
TH1F * goodlayer_cllt4
Definition: TestOutliers.cc:84
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
reco::TrackBase::dz
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:622
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
dqmdumpme.k
k
Definition: dqmdumpme.py:60
TestOutliers::posxy
TH2F * posxy
Definition: TestOutliers.cc:86
Point3DBase< float, GlobalTag >
TrackingRecHit::some
Definition: TrackingRecHit.h:59
TestOutliers::goodlayer_simvecsmall
TH1F * goodlayer_simvecsmall
Definition: TestOutliers.cc:99
edm::RefToBase::get
value_type const * get() const
Definition: RefToBase.h:209
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
TestOutliers::goodst1lt4_simvecsize
TH1F * goodst1lt4_simvecsize
Definition: TestOutliers.cc:88
TestOutliers::deltahits
TH1F * deltahits
Definition: TestOutliers.cc:80
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TestOutliers::energyLossMax
TH1F * energyLossMax
Definition: TestOutliers.cc:101
TestOutliers::badlayer
TH1F * badlayer
Definition: TestOutliers.cc:84
TestOutliers::badhittype
TH1F * badhittype
Definition: TestOutliers.cc:84
TrackerDigiGeometryRecord.h
TrackToTrackingParticleAssociator.h
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
TestOutliers::goodlayer
TH1F * goodlayer
Definition: TestOutliers.cc:84
TestOutliers::goodst2_simvecsize
TH1F * goodst2_simvecsize
Definition: TestOutliers.cc:97
edm::ParameterSet
Definition: ParameterSet.h:47
edm::AssociationMap::size
size_type size() const
map size
Definition: AssociationMap.h:162
TestOutliers::theAssociatorOldToken
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > theAssociatorOldToken
Definition: TestOutliers.cc:69
Event.h
TestOutliers::hitsPerTrackGained
TH1F * hitsPerTrackGained
Definition: TestOutliers.cc:80
TestOutliers::energyLoss
TH1F * energyLoss
Definition: TestOutliers.cc:101
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > >
TestOutliers::sizeOutT
TH1F * sizeOutT
Definition: TestOutliers.cc:103
SiPixelRecHit::probabilityX
float probabilityX() const
Definition: SiPixelRecHit.h:82
TestOutliers::goodst1_simvecsize
TH1F * goodst1_simvecsize
Definition: TestOutliers.cc:96
TestOutliers::theAssociatorOutToken
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > theAssociatorOutToken
Definition: TestOutliers.cc:70
TestOutliers::histoPhiOld
TH1F * histoPhiOld
Definition: TestOutliers.cc:76
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
TestOutliers::beginRun
void beginRun(edm::Run const &run, const edm::EventSetup &) override
Definition: TestOutliers.cc:934
reco::TrackBase::dzError
double dzError() const
error on dz
Definition: TrackBase.h:778
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TestOutliers::probYshared
TH1F * probYshared
Definition: TestOutliers.cc:107
TestOutliers::goodprjlt4_simvecsize
TH1F * goodprjlt4_simvecsize
Definition: TestOutliers.cc:90
iEvent
int iEvent
Definition: GenABIO.cc:224
TestOutliers::hitsPerTrackAssocLost
TH1F * hitsPerTrackAssocLost
Definition: TestOutliers.cc:80
reco::TrackBase::d0
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:611
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
TestOutliers::deltahitsAssocGained
TH1F * deltahitsAssocGained
Definition: TestOutliers.cc:80
TestOutliers::theG
edm::ESHandle< TrackerGeometry > theG
Definition: TestOutliers.cc:71
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:57
TestOutliers::mergedPull
TH1F * mergedPull
Definition: TestOutliers.cc:101
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
reco::TrackBase::normalizedChi2
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:593
TestOutliers::badprocess
TH1F * badprocess
Definition: TestOutliers.cc:83
TestOutliers::okcutsOut
TH1F * okcutsOut
Definition: TestOutliers.cc:82
TSCPBuilderNoMaterial.h
get
#define get
TestOutliers::trackTagsOut_
edm::InputTag trackTagsOut_
Definition: TestOutliers.cc:65
TestOutliers::goodst2gteq4_simvecsize
TH1F * goodst2gteq4_simvecsize
Definition: TestOutliers.cc:89
InputTag.h
TrackingRecHit
Definition: TrackingRecHit.h:21
TestOutliers::probXgood
TH1F * probXgood
Definition: TestOutliers.cc:106
TestOutliers::goodlayer_simvecbig
TH1F * goodlayer_simvecbig
Definition: TestOutliers.cc:99
TestOutliers::poszr
TH2F * poszr
Definition: TestOutliers.cc:86
TestOutliers::goodpixlt4_simvecsize
TH1F * goodpixlt4_simvecsize
Definition: TestOutliers.cc:87
TestOutliers::goodhittype_simvecbig
TH1F * goodhittype_simvecbig
Definition: TestOutliers.cc:99
TrackerHitAssociator
Definition: TrackerHitAssociator.h:55
TestOutliers::goodbadmergedLost
TH1F * goodbadmergedLost
Definition: TestOutliers.cc:99
GeomDet.h
TestOutliers::histoLambdaOld
TH1F * histoLambdaOld
Definition: TestOutliers.cc:79
TestOutliers::gainedhits
TH1F * gainedhits
Definition: TestOutliers.cc:105
TestOutliers::goodst2_clustersize
TH1F * goodst2_clustersize
Definition: TestOutliers.cc:93
std
Definition: JetResolutionObject.h:76
TSCPBuilderNoMaterial
Definition: TSCPBuilderNoMaterial.h:17
writedatasetfile.run
run
Definition: writedatasetfile.py:27
reco::TrackBase::d0Error
double d0Error() const
error on d0
Definition: TrackBase.h:772
ErrorFrameTransformer.h
TestOutliers::goodcluster
TH1F * goodcluster
Definition: TestOutliers.cc:83
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
SiStripMatchedRecHit2D
Definition: SiStripMatchedRecHit2D.h:8
SimTrack
Definition: SimTrack.h:6
reco::Track::seedRef
const edm::RefToBase< TrajectorySeed > & seedRef() const
Definition: Track.h:155
Frameworkfwd.h
TestOutliers::hitsPerTrackAssocGained
TH1F * hitsPerTrackAssocGained
Definition: TestOutliers.cc:80
TestOutliers::goodhittype_cllt4
TH1F * goodhittype_cllt4
Definition: TestOutliers.cc:84
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
TestOutliers::histoD0Out
TH1F * histoD0Out
Definition: TestOutliers.cc:77
edm::RefToBase< reco::Track >
SiPixelRecHit::probabilityY
float probabilityY() const
Definition: SiPixelRecHit.h:83
TestOutliers::mergedhittype
TH1F * mergedhittype
Definition: TestOutliers.cc:101
TestOutliers::badcluster
TH1F * badcluster
Definition: TestOutliers.cc:83
TestOutliers::deltahitsOK
TH1F * deltahitsOK
Definition: TestOutliers.cc:80
reco::TrackBase::phiError
double phiError() const
error on phi
Definition: TrackBase.h:766
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
TestOutliers::goodprjgteq4_simvecsize
TH1F * goodprjgteq4_simvecsize
Definition: TestOutliers.cc:90
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TestOutliers::energyLossRatio
TH1F * energyLossRatio
Definition: TestOutliers.cc:101
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
TestOutliers::goodprj_clustersize
TH1F * goodprj_clustersize
Definition: TestOutliers.cc:94
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
PSimHit
Definition: PSimHit.h:15
TestOutliers::goodst2lt4_simvecsize
TH1F * goodst2lt4_simvecsize
Definition: TestOutliers.cc:89
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
ErrorFrameTransformer::transform
static GlobalError transform(const LocalError &le, const Surface &surf)
Definition: ErrorFrameTransformer.h:16
TrajectoryStateClosestToPoint::theState
const FreeTrajectoryState & theState() const
Definition: TrajectoryStateClosestToPoint.h:96
edm::Event
Definition: Event.h:73
reco::TrackBase::lambda
double lambda() const
Lambda angle.
Definition: TrackBase.h:605
TestOutliers::goodhittype_simvecsmall
TH1F * goodhittype_simvecsmall
Definition: TestOutliers.cc:99
TestOutliers::histoDzOut
TH1F * histoDzOut
Definition: TestOutliers.cc:78
reco::TrackBase::dxy
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:608
edm::InputTag
Definition: InputTag.h:15
TestOutliers::file
TFile * file
Definition: TestOutliers.cc:73
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
TestOutliers::goodst1_clustersize
TH1F * goodst1_clustersize
Definition: TestOutliers.cc:92
TestOutliers::probXnoshare
TH1F * probXnoshare
Definition: TestOutliers.cc:106
reco::TrackBase::qoverp
double qoverp() const
q / p
Definition: TrackBase.h:599
TestOutliers::goodst1gteq4_simvecsize
TH1F * goodst1gteq4_simvecsize
Definition: TestOutliers.cc:88
TestOutliers::histoQoverpOut
TH1F * histoQoverpOut
Definition: TestOutliers.cc:75
TrajectoryStateClosestToPoint::charge
TrackCharge charge() const
Definition: TrajectoryStateClosestToPoint.h:94
TestOutliers::probXshared
TH1F * probXshared
Definition: TestOutliers.cc:106
TestOutliers::okcutsOld
TH1F * okcutsOld
Definition: TestOutliers.cc:82