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< TransientTrackingRecHit::ConstRecHitPointer > &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< TransientTrackingRecHit::ConstRecHitPointer > &  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  // ConstRecHitIterator hit;
39  for(auto hit=hits.begin();hit!=hits.end();hit++){
40  unsigned int iid=(*hit)->hit()->geographicalId().rawId();
41 
42  int sub=(iid>>25)&0x7 ;
43  int lay=(iid>>16) & 0xF;
44  if ((lay==1)&&(sub==3)) ltib1=true;
45  if ((lay==2)&&(sub==3)) ltib2=true;
46  if ((lay==1)&&(sub==5)) ltob1=true;
47  if ((lay==2)&&(sub==5)) ltob2=true;
48  }
50 
51  }
bool cms::CompareTrajLay::operator() ( Trajectory t1,
Trajectory t2 
)
inline

Definition at line 23 of file CosmicTrackFinder.h.

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

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:234
void AnalHits(const std::vector< TransientTrackingRecHit::ConstRecHitPointer > &hits)
float chiSquared() const
Definition: Trajectory.h:252

Member Data Documentation

bool cms::CompareTrajLay::ltib1
private

Definition at line 54 of file CosmicTrackFinder.h.

Referenced by AnalHits().

bool cms::CompareTrajLay::ltib2
private

Definition at line 54 of file CosmicTrackFinder.h.

Referenced by AnalHits().

bool cms::CompareTrajLay::ltob1
private

Definition at line 54 of file CosmicTrackFinder.h.

Referenced by AnalHits().

bool cms::CompareTrajLay::ltob2
private

Definition at line 54 of file CosmicTrackFinder.h.

Referenced by AnalHits().

unsigned int cms::CompareTrajLay::nlay
private

Definition at line 55 of file CosmicTrackFinder.h.

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