DataFormats
METReco
src
CSCHaloData.cc
Go to the documentation of this file.
1
#include "
DataFormats/METReco/interface/CSCHaloData.h
"
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
;
11
CSCHaloData::CSCHaloData
() {
12
nTriggers_PlusZ
= 0;
13
nTriggers_MinusZ
= 0;
14
nTracks_PlusZ
= 0;
15
nTracks_MinusZ
= 0;
16
HLTAccept
=
false
;
17
18
nOutOfTimeTriggers_PlusZ
= 0;
19
nOutOfTimeTriggers_MinusZ
= 0;
20
nOutOfTimeHits
= 0;
21
22
nTracks_Small_dT
= 0;
23
nTracks_Small_beta
= 0;
24
nTracks_Small_dT_Small_beta
= 0;
25
26
// MLR
27
nFlatHaloSegments
= 0;
28
// End MLR
29
}
30
31
int
CSCHaloData::NumberOfHaloTriggers
(
HaloData::Endcap
z)
const
{
32
if
(z ==
HaloData::plus
)
33
return
nTriggers_PlusZ
;
34
else
if
(z ==
HaloData::minus
)
35
return
nTriggers_MinusZ
;
36
else
37
return
nTriggers_MinusZ
+
nTriggers_PlusZ
;
38
}
39
40
int
CSCHaloData::NumberOfHaloTriggers_TrkMuUnVeto
(
HaloData::Endcap
z)
const
{
41
if
(z ==
HaloData::plus
)
42
return
nTriggers_PlusZ_TrkMuUnVeto
;
43
else
if
(z ==
HaloData::minus
)
44
return
nTriggers_MinusZ_TrkMuUnVeto
;
45
else
46
return
nTriggers_MinusZ_TrkMuUnVeto
+
nTriggers_PlusZ_TrkMuUnVeto
;
47
}
48
49
short
int
CSCHaloData::NumberOfOutOfTimeTriggers
(
HaloData::Endcap
z)
const
{
50
if
(z ==
HaloData::plus
)
51
return
nOutOfTimeTriggers_PlusZ
;
52
else
if
(z ==
HaloData::minus
)
53
return
nOutOfTimeTriggers_MinusZ
;
54
else
55
return
nOutOfTimeTriggers_PlusZ
+
nOutOfTimeTriggers_MinusZ
;
56
}
57
58
int
CSCHaloData::NumberOfHaloTracks
(
HaloData::Endcap
z)
const
{
59
int
n
= 0;
60
for
(
unsigned
int
i
= 0;
i
<
TheTrackRefs
.
size
();
i
++) {
61
edm::Ref<reco::TrackCollection>
iTrack(
TheTrackRefs
[
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
}
reco::CSCHaloData::NumberOfHaloTracks
int NumberOfHaloTracks(HaloData::Endcap z=HaloData::both) const
Definition:
CSCHaloData.cc:58
mps_fire.i
i
Definition:
mps_fire.py:428
reco::CSCHaloData::nOutOfTimeTriggers_PlusZ
short int nOutOfTimeTriggers_PlusZ
Definition:
CSCHaloData.h:136
reco::CSCHaloData::nOutOfTimeTriggers_MinusZ
short int nOutOfTimeTriggers_MinusZ
Definition:
CSCHaloData.h:137
reco::CSCHaloData::nFlatHaloSegments
short int nFlatHaloSegments
Definition:
CSCHaloData.h:150
reco::CSCHaloData::nTracks_PlusZ
int nTracks_PlusZ
Definition:
CSCHaloData.h:132
reco::HaloData::Endcap
Endcap
Definition:
HaloData.h:14
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
reco::CSCHaloData::nTriggers_MinusZ_TrkMuUnVeto
int nTriggers_MinusZ_TrkMuUnVeto
Definition:
CSCHaloData.h:128
reco::HaloData::both
Definition:
HaloData.h:14
reco::CSCHaloData::nTriggers_PlusZ_TrkMuUnVeto
int nTriggers_PlusZ_TrkMuUnVeto
Definition:
CSCHaloData.h:127
reco::HaloData::minus
Definition:
HaloData.h:14
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
edm::Ref
Definition:
AssociativeIterator.h:58
reco::CSCHaloData::nTracks_Small_beta
short int nTracks_Small_beta
Definition:
CSCHaloData.h:143
reco::CSCHaloData::CSCHaloData
CSCHaloData()
Definition:
CSCHaloData.cc:11
reco::HaloData::plus
Definition:
HaloData.h:14
reco::CSCHaloData::nTracks_Small_dT
short int nTracks_Small_dT
Definition:
CSCHaloData.h:141
reco::CSCHaloData::nTracks_Small_dT_Small_beta
short int nTracks_Small_dT_Small_beta
Definition:
CSCHaloData.h:146
reco::CSCHaloData::NumberOfOutOfTimeTriggers
short int NumberOfOutOfTimeTriggers(HaloData::Endcap z=HaloData::both) const
Definition:
CSCHaloData.cc:49
reco::CSCHaloData::nTriggers_PlusZ
int nTriggers_PlusZ
Definition:
CSCHaloData.h:125
reco::CSCHaloData::nTracks_MinusZ
int nTracks_MinusZ
Definition:
CSCHaloData.h:133
reco::CSCHaloData::nTriggers_MinusZ
int nTriggers_MinusZ
Definition:
CSCHaloData.h:126
reco::CSCHaloData::HLTAccept
bool HLTAccept
Definition:
CSCHaloData.h:130
edm::RefVector::size
size_type size() const
Size of the RefVector.
Definition:
RefVector.h:102
CSCHaloData.h
reco::CSCHaloData::NumberOfHaloTriggers_TrkMuUnVeto
int NumberOfHaloTriggers_TrkMuUnVeto(HaloData::Endcap z=HaloData::both) const
Definition:
CSCHaloData.cc:40
reco::CSCHaloData::TheTrackRefs
edm::RefVector< reco::TrackCollection > TheTrackRefs
Definition:
CSCHaloData.h:121
reco::CSCHaloData::nOutOfTimeHits
short int nOutOfTimeHits
Definition:
CSCHaloData.h:139
reco::CSCHaloData::NumberOfHaloTriggers
int NumberOfHaloTriggers(HaloData::Endcap z=HaloData::both) const
Definition:
CSCHaloData.cc:31
Generated for CMSSW Reference Manual by
1.8.16