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 
10 using namespace reco;
12 {
13  nTriggers_PlusZ = 0;
14  nTriggers_MinusZ = 0 ;
15  nTracks_PlusZ = 0 ;
16  nTracks_MinusZ = 0;
17  HLTAccept=false;
18 
21  nOutOfTimeHits = 0 ;
22 
23  nTracks_Small_dT = 0;
26 
27  // MLR
29  // End MLR
30 }
31 
33 {
34  if( z == HaloData::plus )
35  return nTriggers_PlusZ;
36  else if( z == HaloData::minus )
37  return nTriggers_MinusZ;
38  else
40 }
41 
42 
43 
45 {
46  if( z == HaloData::plus )
48  else if( z == HaloData::minus )
50  else
52 }
53 
54 
56 {
57  if( z == HaloData::plus )
59  else if( z == HaloData::minus )
61  else
63 }
64 
66 {
67  int n = 0 ;
68  for(unsigned int i = 0 ; i < TheTrackRefs.size() ; i++ )
69  {
71  // Does the track go through both endcaps ?
72  bool Traversing = (iTrack->outerPosition().z() > 0 && iTrack->innerPosition().z() < 0) || (iTrack->outerPosition().z() < 0 && iTrack->innerPosition().z() > 0);
73  // Does the track go through only +Z endcap ?
74  bool PlusZ = (iTrack->outerPosition().z() > 0 && iTrack->innerPosition().z() > 0 ) ;
75  // Does the track go through only -Z endcap ?
76  bool MinusZ = (iTrack->outerPosition().z()< 0 && iTrack->innerPosition().z() < 0) ;
77 
78  if( (z == HaloData::plus) && ( PlusZ || Traversing) )
79  n++;
80  else if( (z == HaloData::minus) && ( MinusZ || Traversing ) )
81  n++;
82  else if( (z == HaloData::both) && (PlusZ || MinusZ || Traversing) )
83  n++ ;
84  }
85  return n;
86 }
int i
Definition: DBlmapReader.cc:9
int NumberOfHaloTracks(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:65
short int nTracks_Small_dT
Definition: CSCHaloData.h:121
short int NumberOfOutOfTimeTriggers(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:55
short int nTracks_Small_beta
Definition: CSCHaloData.h:123
short int nOutOfTimeHits
Definition: CSCHaloData.h:119
int NumberOfHaloTriggers_TrkMuUnVeto(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:44
int NumberOfHaloTriggers(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:32
edm::RefVector< reco::TrackCollection > TheTrackRefs
Definition: CSCHaloData.h:101
short int nOutOfTimeTriggers_MinusZ
Definition: CSCHaloData.h:117
int nTriggers_MinusZ_TrkMuUnVeto
Definition: CSCHaloData.h:108
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
short int nOutOfTimeTriggers_PlusZ
Definition: CSCHaloData.h:116
int nTriggers_PlusZ_TrkMuUnVeto
Definition: CSCHaloData.h:107
short int nTracks_Small_dT_Small_beta
Definition: CSCHaloData.h:126
short int nFlatHaloSegments
Definition: CSCHaloData.h:130