CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CosmicTrackFinder.h
Go to the documentation of this file.
1 #ifndef CosmicTrackFinder_h
2 #define CosmicTrackFinder_h
3 
4 // Package: RecoTracker/SingleTrackPattern
5 // Class: CosmicTrackFinder
6 // Original Author: Michele Pioppi-INFN perugia
7 
8 
18 
19 namespace cms
20 {
22  public:
24  Trajectory *t2){
25  AnalHits(t1->recHits());
26  unsigned int alay=nlay;
27  AnalHits(t2->recHits());
28  unsigned int blay=nlay;
29  if (alay!=blay) return alay > blay;
30  if (t1->foundHits() != t2->foundHits())
31  return t1->foundHits()> t2->foundHits();
32  return t1->chiSquared()< t2->chiSquared();
33  // std::cout<<"chi "<<t1.chiSquared()<<" "<<t2.chiSquared()<<std::endl;
34  // return false;
35  }
37  ltob1=false; ltob2=false; ltib1=false; ltib2=false;
38  std::vector< ConstReferenceCountingPointer< TransientTrackingRecHit> >::const_iterator hit;
39  // ConstRecHitIterator hit;
40  for(hit=hits.begin();hit!=hits.end();hit++){
41  unsigned int iid=(*hit)->hit()->geographicalId().rawId();
42 
43  int sub=(iid>>25)&0x7 ;
44  int lay=(iid>>16) & 0xF;
45  if ((lay==1)&&(sub==3)) ltib1=true;
46  if ((lay==2)&&(sub==3)) ltib2=true;
47  if ((lay==1)&&(sub==5)) ltob1=true;
48  if ((lay==2)&&(sub==5)) ltob2=true;
49  }
51 
52  }
53 
54  private:
56  unsigned int nlay;
57 
58  };
60  public:
62  Trajectory *t2){
63  if (t1->foundHits() != t2->foundHits())
64  return t1->foundHits()> t2->foundHits();
65  return t1->chiSquared()< t2->chiSquared();
66  }
67  };
69  {
70 
72  public:
73 
74  explicit CosmicTrackFinder(const edm::ParameterSet& conf);
75 
76  virtual ~CosmicTrackFinder();
77 
78  virtual void produce(edm::Event& e, const edm::EventSetup& c);
79 
80  private:
84  std::string geometry;
85  bool trinevents;
87  };
88 }
89 
90 #endif
int foundHits() const
Definition: Trajectory.h:224
bool operator()(Trajectory *t1, Trajectory *t2)
TrajectoryStateOnSurface TSOS
CosmicTrajectoryBuilder cosmicTrajectoryBuilder_
void AnalHits(std::vector< ConstReferenceCountingPointer< TransientTrackingRecHit > > hits)
ConstRecHitContainer recHits(bool splitting=false) const
Definition: Trajectory.cc:67
CRackTrajectoryBuilder crackTrajectoryBuilder_
bool operator()(Trajectory *t1, Trajectory *t2)
CosmicTrackFinder(const edm::ParameterSet &conf)
tuple conf
Definition: dbtoconf.py:185
virtual void produce(edm::Event &e, const edm::EventSetup &c)
edm::ParameterSet conf_
double chiSquared() const
Definition: Trajectory.h:242