CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCHaloData.cc
Go to the documentation of this file.
2 
3 /*
4  [class]: CSCHaloData
5  [authors]: R. Remington, The University of Florida
6  [description]: See CSCHaloData.h
7  [date]: October 15, 2009
8 */
9 
45 
47 
48 
49 using namespace reco;
51 {
52  nTriggers_PlusZ = 0;
53  nTriggers_MinusZ = 0 ;
54  nTracks_PlusZ = 0 ;
55  nTracks_MinusZ = 0;
56  HLTAccept=false;
57 
60  nOutOfTimeHits = 0 ;
61 }
62 
64 {
65  if( z == HaloData::plus )
66  return nTriggers_PlusZ;
67  else if( z == HaloData::minus )
68  return nTriggers_MinusZ;
69  else
71 }
72 
74 {
75  if( z == HaloData::plus )
77  else if( z == HaloData::minus )
79  else
81 }
82 
84 {
85  int n = 0 ;
86  for(unsigned int i = 0 ; i < TheTrackRefs.size() ; i++ )
87  {
89  // Does the track go through both endcaps ?
90  bool Traversing = (iTrack->outerPosition().z() > 0 && iTrack->innerPosition().z() < 0) || (iTrack->outerPosition().z() < 0 && iTrack->innerPosition().z() > 0);
91  // Does the track go through only +Z endcap ?
92  bool PlusZ = (iTrack->outerPosition().z() > 0 && iTrack->innerPosition().z() > 0 ) ;
93  // Does the track go through only -Z endcap ?
94  bool MinusZ = (iTrack->outerPosition().z()< 0 && iTrack->innerPosition().z() < 0) ;
95 
96  if( (z == HaloData::plus) && ( PlusZ || Traversing) )
97  n++;
98  else if( (z == HaloData::minus) && ( MinusZ || Traversing ) )
99  n++;
100  else if( (z == HaloData::both) && (PlusZ || MinusZ || Traversing) )
101  n++ ;
102  }
103  return n;
104 }
int i
Definition: DBlmapReader.cc:9
int NumberOfHaloTracks(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:83
short int NumberOfOutOfTimeTriggers(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:73
short int nOutOfTimeHits
Definition: CSCHaloData.h:95
Definition: DDAxes.h:10
int NumberOfHaloTriggers(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:63
edm::RefVector< reco::TrackCollection > TheTrackRefs
Definition: CSCHaloData.h:78
short int nOutOfTimeTriggers_MinusZ
Definition: CSCHaloData.h:93
size_type size() const
Size of the RefVector.
Definition: RefVector.h:85
short int nOutOfTimeTriggers_PlusZ
Definition: CSCHaloData.h:92