CMS 3D CMS Logo

Public Member Functions | Private Attributes

cms::CompareTrajLay Class Reference

#include <CosmicTrackFinder.h>

List of all members.

Public Member Functions

void AnalHits (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 22 of file CosmicTrackFinder.h.


Member Function Documentation

void cms::CompareTrajLay::AnalHits ( std::vector< ConstReferenceCountingPointer< TransientTrackingRecHit > >  hits) [inline]

Definition at line 37 of file CosmicTrackFinder.h.

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

Referenced by operator()().

                                                                                             {
      ltob1=false; ltob2=false; ltib1=false; ltib2=false;
      std::vector< ConstReferenceCountingPointer< TransientTrackingRecHit> >::const_iterator hit;
      //     ConstRecHitIterator hit;
      for(hit=hits.begin();hit!=hits.end();hit++){
        unsigned int iid=(*hit)->hit()->geographicalId().rawId();
        
        int sub=(iid>>25)&0x7 ;
        int lay=(iid>>16) & 0xF;
        if ((lay==1)&&(sub==3)) ltib1=true;
        if ((lay==2)&&(sub==3)) ltib2=true;
        if ((lay==1)&&(sub==5)) ltob1=true;
        if ((lay==2)&&(sub==5)) ltob2=true;
    }
      nlay=ltib1+ltib2+ltob1+ltob2;
      
    }
bool cms::CompareTrajLay::operator() ( Trajectory t1,
Trajectory t2 
) [inline]

Definition at line 24 of file CosmicTrackFinder.h.

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

                                   {
      AnalHits(t1->recHits());
      unsigned int alay=nlay;
      AnalHits(t2->recHits());
      unsigned int blay=nlay;
      if (alay!=blay) return alay > blay;
      if (t1->foundHits() != t2->foundHits()) 
        return t1->foundHits()> t2->foundHits();
      return t1->chiSquared()< t2->chiSquared();
      // std::cout<<"chi "<<t1.chiSquared()<<" "<<t2.chiSquared()<<std::endl;
      // return false;
    }

Member Data Documentation

Definition at line 56 of file CosmicTrackFinder.h.

Referenced by AnalHits().

Definition at line 56 of file CosmicTrackFinder.h.

Referenced by AnalHits().

Definition at line 56 of file CosmicTrackFinder.h.

Referenced by AnalHits().

Definition at line 56 of file CosmicTrackFinder.h.

Referenced by AnalHits().

unsigned int cms::CompareTrajLay::nlay [private]

Definition at line 57 of file CosmicTrackFinder.h.

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