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 
43 {
44  if( z == HaloData::plus )
46  else if( z == HaloData::minus )
48  else
50 }
51 
53 {
54  int n = 0 ;
55  for(unsigned int i = 0 ; i < TheTrackRefs.size() ; i++ )
56  {
58  // Does the track go through both endcaps ?
59  bool Traversing = (iTrack->outerPosition().z() > 0 && iTrack->innerPosition().z() < 0) || (iTrack->outerPosition().z() < 0 && iTrack->innerPosition().z() > 0);
60  // Does the track go through only +Z endcap ?
61  bool PlusZ = (iTrack->outerPosition().z() > 0 && iTrack->innerPosition().z() > 0 ) ;
62  // Does the track go through only -Z endcap ?
63  bool MinusZ = (iTrack->outerPosition().z()< 0 && iTrack->innerPosition().z() < 0) ;
64 
65  if( (z == HaloData::plus) && ( PlusZ || Traversing) )
66  n++;
67  else if( (z == HaloData::minus) && ( MinusZ || Traversing ) )
68  n++;
69  else if( (z == HaloData::both) && (PlusZ || MinusZ || Traversing) )
70  n++ ;
71  }
72  return n;
73 }
int i
Definition: DBlmapReader.cc:9
int NumberOfHaloTracks(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:52
short int nTracks_Small_dT
Definition: CSCHaloData.h:108
short int NumberOfOutOfTimeTriggers(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:42
short int nTracks_Small_beta
Definition: CSCHaloData.h:110
short int nOutOfTimeHits
Definition: CSCHaloData.h:106
float float float z
int NumberOfHaloTriggers(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:32
edm::RefVector< reco::TrackCollection > TheTrackRefs
Definition: CSCHaloData.h:89
short int nOutOfTimeTriggers_MinusZ
Definition: CSCHaloData.h:104
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
short int nOutOfTimeTriggers_PlusZ
Definition: CSCHaloData.h:103
short int nTracks_Small_dT_Small_beta
Definition: CSCHaloData.h:113
short int nFlatHaloSegments
Definition: CSCHaloData.h:117