CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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  nTriggers_PlusZ = 0;
13  nTriggers_MinusZ = 0;
14  nTracks_PlusZ = 0;
15  nTracks_MinusZ = 0;
16  HLTAccept = false;
17 
20  nOutOfTimeHits = 0;
21 
22  nTracks_Small_dT = 0;
25 
26  // MLR
28  // End MLR
29 }
30 
32  if (z == HaloData::plus)
33  return nTriggers_PlusZ;
34  else if (z == HaloData::minus)
35  return nTriggers_MinusZ;
36  else
38 }
39 
41  if (z == HaloData::plus)
43  else if (z == HaloData::minus)
45  else
47 }
48 
50  if (z == HaloData::plus)
52  else if (z == HaloData::minus)
54  else
56 }
57 
59  int n = 0;
60  for (unsigned int i = 0; i < TheTrackRefs.size(); i++) {
62  // Does the track go through both endcaps ?
63  bool Traversing = (iTrack->outerPosition().z() > 0 && iTrack->innerPosition().z() < 0) ||
64  (iTrack->outerPosition().z() < 0 && iTrack->innerPosition().z() > 0);
65  // Does the track go through only +Z endcap ?
66  bool PlusZ = (iTrack->outerPosition().z() > 0 && iTrack->innerPosition().z() > 0);
67  // Does the track go through only -Z endcap ?
68  bool MinusZ = (iTrack->outerPosition().z() < 0 && iTrack->innerPosition().z() < 0);
69 
70  if ((z == HaloData::plus) && (PlusZ || Traversing))
71  n++;
72  else if ((z == HaloData::minus) && (MinusZ || Traversing))
73  n++;
74  else if ((z == HaloData::both) && (PlusZ || MinusZ || Traversing))
75  n++;
76  }
77  return n;
78 }
int NumberOfHaloTracks(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:58
short int nTracks_Small_dT
Definition: CSCHaloData.h:141
short int NumberOfOutOfTimeTriggers(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:49
short int nTracks_Small_beta
Definition: CSCHaloData.h:143
short int nOutOfTimeHits
Definition: CSCHaloData.h:139
int NumberOfHaloTriggers_TrkMuUnVeto(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:40
int NumberOfHaloTriggers(HaloData::Endcap z=HaloData::both) const
Definition: CSCHaloData.cc:31
edm::RefVector< reco::TrackCollection > TheTrackRefs
Definition: CSCHaloData.h:121
short int nOutOfTimeTriggers_MinusZ
Definition: CSCHaloData.h:137
int nTriggers_MinusZ_TrkMuUnVeto
Definition: CSCHaloData.h:128
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
short int nOutOfTimeTriggers_PlusZ
Definition: CSCHaloData.h:136
int nTriggers_PlusZ_TrkMuUnVeto
Definition: CSCHaloData.h:127
short int nTracks_Small_dT_Small_beta
Definition: CSCHaloData.h:146
short int nFlatHaloSegments
Definition: CSCHaloData.h:150