CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
cms::CompareTrajLay Class Reference

#include <CosmicTrackFinder.h>

Public Member Functions

void AnalHits (const std::vector< ConstReferenceCountingPointer< TransientTrackingRecHit > > &hits)
 
bool operator() (Trajectory *t1, Trajectory *t2)
 

Private Attributes

bool ltib1
 
bool ltib2
 
bool ltob1
 
bool ltob2
 
unsigned int nlay
 

Detailed Description

Definition at line 21 of file CosmicTrackFinder.h.

Member Function Documentation

void cms::CompareTrajLay::AnalHits ( const std::vector< ConstReferenceCountingPointer< TransientTrackingRecHit > > &  hits)
inline

Definition at line 36 of file CosmicTrackFinder.h.

References ltib1, ltib2, ltob1, ltob2, and nlay.

Referenced by operator()().

36  {
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  }
bool cms::CompareTrajLay::operator() ( Trajectory t1,
Trajectory t2 
)
inline

Definition at line 23 of file CosmicTrackFinder.h.

References AnalHits(), Trajectory::chiSquared(), Trajectory::foundHits(), nlay, and Trajectory::recHits().

24  {
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  }
int foundHits() const
Definition: Trajectory.h:236
void AnalHits(const std::vector< ConstReferenceCountingPointer< TransientTrackingRecHit > > &hits)
ConstRecHitContainer recHits(bool splitting=false) const
Definition: Trajectory.cc:67
double chiSquared() const
Definition: Trajectory.h:254

Member Data Documentation

bool cms::CompareTrajLay::ltib1
private

Definition at line 55 of file CosmicTrackFinder.h.

Referenced by AnalHits().

bool cms::CompareTrajLay::ltib2
private

Definition at line 55 of file CosmicTrackFinder.h.

Referenced by AnalHits().

bool cms::CompareTrajLay::ltob1
private

Definition at line 55 of file CosmicTrackFinder.h.

Referenced by AnalHits().

bool cms::CompareTrajLay::ltob2
private

Definition at line 55 of file CosmicTrackFinder.h.

Referenced by AnalHits().

unsigned int cms::CompareTrajLay::nlay
private

Definition at line 56 of file CosmicTrackFinder.h.

Referenced by AnalHits(), and operator()().