CMS 3D CMS Logo

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 19 of file CosmicTrackFinder.h.

Member Function Documentation

◆ AnalHits()

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

Definition at line 34 of file CosmicTrackFinder.h.

34  {
35  ltob1 = false;
36  ltob2 = false;
37  ltib1 = false;
38  ltib2 = false;
39  // ConstRecHitIterator hit;
40  for (auto 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))
46  ltib1 = true;
47  if ((lay == 2) && (sub == 3))
48  ltib2 = true;
49  if ((lay == 1) && (sub == 5))
50  ltob1 = true;
51  if ((lay == 2) && (sub == 5))
52  ltob2 = true;
53  }
54  nlay = ltib1 + ltib2 + ltob1 + ltob2;
55  }

References hfClusterShapes_cfi::hits, ltib1, ltib2, ltob1, ltob2, and nlay.

Referenced by operator()().

◆ operator()()

bool cms::CompareTrajLay::operator() ( Trajectory t1,
Trajectory t2 
)
inline

Definition at line 21 of file CosmicTrackFinder.h.

21  {
22  AnalHits(t1->recHits());
23  unsigned int alay = nlay;
24  AnalHits(t2->recHits());
25  unsigned int blay = nlay;
26  if (alay != blay)
27  return alay > blay;
28  if (t1->foundHits() != t2->foundHits())
29  return t1->foundHits() > t2->foundHits();
30  return t1->chiSquared() < t2->chiSquared();
31  // std::cout<<"chi "<<t1.chiSquared()<<" "<<t2.chiSquared()<<std::endl;
32  // return false;
33  }

References AnalHits(), nlay, RandomServiceHelper::t1, and RandomServiceHelper::t2.

Member Data Documentation

◆ ltib1

bool cms::CompareTrajLay::ltib1
private

Definition at line 58 of file CosmicTrackFinder.h.

Referenced by AnalHits().

◆ ltib2

bool cms::CompareTrajLay::ltib2
private

Definition at line 58 of file CosmicTrackFinder.h.

Referenced by AnalHits().

◆ ltob1

bool cms::CompareTrajLay::ltob1
private

Definition at line 58 of file CosmicTrackFinder.h.

Referenced by AnalHits().

◆ ltob2

bool cms::CompareTrajLay::ltob2
private

Definition at line 58 of file CosmicTrackFinder.h.

Referenced by AnalHits().

◆ nlay

unsigned int cms::CompareTrajLay::nlay
private

Definition at line 59 of file CosmicTrackFinder.h.

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

RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
cms::CompareTrajLay::ltob2
bool ltob2
Definition: CosmicTrackFinder.h:58
cms::CompareTrajLay::ltob1
bool ltob1
Definition: CosmicTrackFinder.h:58
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
cms::CompareTrajLay::ltib2
bool ltib2
Definition: CosmicTrackFinder.h:58
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
cms::CompareTrajLay::nlay
unsigned int nlay
Definition: CosmicTrackFinder.h:59
cms::CompareTrajLay::ltib1
bool ltib1
Definition: CosmicTrackFinder.h:58
cms::CompareTrajLay::AnalHits
void AnalHits(const std::vector< TransientTrackingRecHit::ConstRecHitPointer > &hits)
Definition: CosmicTrackFinder.h:34
hit
Definition: SiStripHitEffFromCalibTree.cc:88