ATLAS Offline Software
Reconstruction
tauEventTPCnv
src
TauCommonExtraDetailsCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
17
18
#include "
tauEvent/TauCommonExtraDetails.h
"
19
#include "
tauEventTPCnv/VectorUtils.h
"
20
#include "
tauEventTPCnv/TauCommonExtraDetailsCnv_p1.h
"
21
22
TauCommonExtraDetailsCnv_p1::TauCommonExtraDetailsCnv_p1
()
23
:
T_AthenaPoolTPPolyCnvBase
<
Analysis
::TauDetails,
Analysis
::TauCommonExtraDetails,
24
TauCommonExtraDetails_p1
>()
25
{
26
27
}
28
29
TauCommonExtraDetailsCnv_p1::~TauCommonExtraDetailsCnv_p1
()
30
{
31
32
}
33
34
void
TauCommonExtraDetailsCnv_p1::persToTrans
(
35
const
TauCommonExtraDetails_p1
*pers,
36
Analysis::TauCommonExtraDetails
*trans,
37
MsgStream &
msg
)
38
{
39
trans->
setSumPtLooseTrk
(pers->
m_sumPtLooseTrk
);
40
trans->
setSumPtTrk
(pers->
m_sumPtTrk
);
41
trans->
setSeedCalo_nEMCell
(pers->
m_seedCalo_nEMCell
);
42
trans->
setSeedCalo_stripEt
(pers->
m_seedCalo_stripEt
);
43
trans->
setSeedCalo_EMCentFrac
(pers->
m_seedCalo_EMCentFrac
);
44
trans->
setSeedCalo_sumCellEnergy
(pers->
m_seedCalo_sumCellEnergy
);
45
trans->
setSeedCalo_sumEMCellEnergy
(pers->
m_seedCalo_sumEMCellEnergy
);
46
m_cellCnv
.
resetForCnv
( pers->
m_linkNames
);
47
const
unsigned
int
tracks = pers->
m_tracks
;
48
if
( tracks == 0 )
return
;
49
const
unsigned
short
int
samplings =
50
pers->
m_closestPhiTrkCell
.size()/tracks;
51
trans->
allocTracksAndSamplings
( tracks, samplings );
52
int
ind
= 0;
53
for
(
unsigned
short
int
i
= 0;
i
< tracks; ++
i
) {
54
for
(
unsigned
short
int
j = 0; j < samplings; ++j ) {
55
m_cellCnv
.
persToTrans
(
56
pers->
m_closestEtaTrkVertCell
[
ind
],
57
trans->
closestEtaTrkVertCell
()[
i
][j],
msg
);
58
m_cellCnv
.
persToTrans
(
59
pers->
m_closestEtaTrkCell
[
ind
],
60
trans->
closestEtaTrkCell
()[
i
][j],
msg
);
61
m_cellCnv
.
persToTrans
(
62
pers->
m_closestPhiTrkVertCell
[
ind
],
63
trans->
closestPhiTrkVertCell
()[
i
][j],
msg
);
64
m_cellCnv
.
persToTrans
(
65
pers->
m_closestPhiTrkCell
[
ind
],
66
trans->
closestPhiTrkCell
()[
i
][j],
msg
);
67
trans->
etaTrkCaloSamp
()[
i
][j] =
68
pers->
m_etaTrkCaloSamp
[
ind
];
69
trans->
phiTrkCaloSamp
()[
i
][j] =
70
pers->
m_phiTrkCaloSamp
[
ind
];
71
72
++
ind
;
73
}
74
}
75
const
unsigned
int
looseTracks = pers->
m_looseTracks
;
76
if
( looseTracks == 0 )
return
;
77
const
unsigned
short
int
looseSamplings =
78
pers->
m_etaLooseTrkCaloSamp
.size()/tracks;
79
ind
= 0;
80
for
(
unsigned
short
int
i
= 0;
i
< looseTracks; ++
i
) {
81
for
(
unsigned
short
int
j = 0; j < looseSamplings; ++j ) {
82
trans->
etaLooseTrkCaloSamp
()[
i
][j] =
83
pers->
m_etaLooseTrkCaloSamp
[
ind
];
84
trans->
phiLooseTrkCaloSamp
()[
i
][j] =
85
pers->
m_phiLooseTrkCaloSamp
[
ind
];
86
++
ind
;
87
88
89
}
90
}
91
92
}
93
94
void
TauCommonExtraDetailsCnv_p1::transToPers
(
95
const
Analysis::TauCommonExtraDetails
*trans,
96
TauCommonExtraDetails_p1
*pers,
97
MsgStream &
msg
)
98
{
99
pers->
m_sumPtLooseTrk
=trans->
sumPtLooseTrk
();
100
pers->
m_sumPtTrk
=trans->
sumPtTrk
();
101
pers->
m_seedCalo_nEMCell
=trans->
seedCalo_nEMCell
();
102
pers->
m_seedCalo_stripEt
=trans->
seedCalo_stripEt
();
103
pers->
m_seedCalo_EMCentFrac
=trans->
seedCalo_EMCentFrac
();
104
pers->
m_seedCalo_sumCellEnergy
=trans->
seedCalo_sumCellEnergy
();
105
pers->
m_seedCalo_sumEMCellEnergy
=trans->
seedCalo_sumEMCellEnergy
();
106
m_cellCnv
.
resetForCnv
( pers->
m_linkNames
);
107
const
unsigned
int
tracks = trans->
closestEtaTrkVertCell
().size();
108
const
unsigned
int
looseTracks = trans->
etaLooseTrkCaloSamp
().size();
109
pers->
m_tracks
= tracks;
110
pers->
m_looseTracks
= looseTracks;
111
if
( tracks == 0 )
return
;
112
const
unsigned
int
colsize = trans->
closestEtaTrkVertCell
()[0].size();
113
const
unsigned
int
size
= tracks*colsize;
114
const
unsigned
int
loosesize = looseTracks*colsize;
115
pers->
m_closestEtaTrkVertCell
.resize(
size
);
116
pers->
m_closestEtaTrkCell
.resize(
size
);
117
pers->
m_closestPhiTrkVertCell
.resize(
size
);
118
pers->
m_closestPhiTrkCell
.resize(
size
);
119
pers->
m_etaTrkCaloSamp
.resize(
size
);
120
pers->
m_phiTrkCaloSamp
.resize(
size
);
121
pers->
m_etaLooseTrkCaloSamp
.resize( loosesize );
122
pers->
m_phiLooseTrkCaloSamp
.resize( loosesize );
123
124
int
ind
= 0;
125
for
(
unsigned
short
int
i
= 0;
i
< tracks; ++
i
) {
126
for
(
unsigned
short
int
j = 0; j < colsize; ++j ) {
127
m_cellCnv
.
transToPers
(
128
trans->
closestEtaTrkVertCell
()[
i
][j],
129
pers->
m_closestEtaTrkVertCell
[
ind
],
msg
);
130
m_cellCnv
.
transToPers
(
131
trans->
closestEtaTrkCell
()[
i
][j],
132
pers->
m_closestEtaTrkCell
[
ind
],
msg
);
133
m_cellCnv
.
transToPers
(
134
trans->
closestPhiTrkVertCell
()[
i
][j],
135
pers->
m_closestPhiTrkVertCell
[
ind
],
msg
);
136
m_cellCnv
.
transToPers
(
137
trans->
closestPhiTrkCell
()[
i
][j],
138
pers->
m_closestPhiTrkCell
[
ind
],
msg
);
139
pers->
m_etaTrkCaloSamp
[
ind
] =
140
trans->
etaTrkCaloSamp
()[
i
][j];
141
pers->
m_phiTrkCaloSamp
[
ind
] =
142
trans->
phiTrkCaloSamp
()[
i
][j];
143
pers->
m_etaLooseTrkCaloSamp
[
ind
] =
144
trans->
etaLooseTrkCaloSamp
()[
i
][j];
145
pers->
m_phiLooseTrkCaloSamp
[
ind
] =
146
trans->
phiLooseTrkCaloSamp
()[
i
][j];
147
148
++
ind
;
149
}
150
}
151
152
153
ind
= 0;
154
for
(
unsigned
short
int
i
= 0;
i
< looseTracks; ++
i
) {
155
for
(
unsigned
short
int
j = 0; j < colsize; ++j ) {
156
pers->
m_etaLooseTrkCaloSamp
[
ind
] =
157
trans->
etaLooseTrkCaloSamp
()[
i
][j];
158
pers->
m_phiLooseTrkCaloSamp
[
ind
] =
159
trans->
phiLooseTrkCaloSamp
()[
i
][j];
160
161
++
ind
;
162
163
}
164
}
165
166
}
Analysis::TauCommonExtraDetails::setSumPtLooseTrk
void setSumPtLooseTrk(double pt)
Set sum of p_T for loose tracks.
Analysis::TauCommonExtraDetails::seedCalo_sumCellEnergy
double seedCalo_sumCellEnergy() const
Get energy sum.
TauCommonExtraDetails_p1::m_looseTracks
unsigned short int m_looseTracks
Element link container name lookup table.
Definition:
TauCommonExtraDetails_p1.h:97
TauCommonExtraDetails_p1::m_closestPhiTrkVertCell
std::vector< ElementLinkInt_p2 > m_closestPhiTrkVertCell
Closest cell to track position at vertex in phi.
Definition:
TauCommonExtraDetails_p1.h:55
TauCommonExtraDetails_p1::m_seedCalo_nEMCell
int m_seedCalo_nEMCell
Number of EM cells within dR < 0.4, with E > m_cellEthr.
Definition:
TauCommonExtraDetails_p1.h:76
ElementLinkCnv_p2::transToPers
void transToPers(State &state, const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
Analysis::TauCommonExtraDetails::setSeedCalo_nEMCell
void setSeedCalo_nEMCell(int n)
Setumber of EM cells.
TauCommonExtraDetails_p1::m_seedCalo_sumCellEnergy
float m_seedCalo_sumCellEnergy
Energy sum of all cells within dR < 0.4.
Definition:
TauCommonExtraDetails_p1.h:85
Analysis::TauCommonExtraDetails::setSeedCalo_stripEt
void setSeedCalo_stripEt(double et)
Set sum of ET in strip layer.
Analysis::TauCommonExtraDetails::setSeedCalo_sumCellEnergy
void setSeedCalo_sumCellEnergy(double energy)
Set energy sum.
Analysis::TauCommonExtraDetails::phiTrkCaloSamp
const std::vector< std::vector< double > > & phiTrkCaloSamp() const
Get phi vector.
TauCommonExtraDetails_p1::m_etaLooseTrkCaloSamp
std::vector< float > m_etaLooseTrkCaloSamp
Eta of extrapolation point in EM Calo.
Definition:
TauCommonExtraDetails_p1.h:70
Analysis::TauCommonExtraDetails::closestPhiTrkVertCell
const std::vector< std::vector< ElementLink< CaloCellContainer > > > & closestPhiTrkVertCell() const
Get closest phi vector.
Analysis::TauCommonExtraDetails::sumPtLooseTrk
double sumPtLooseTrk() const
Get sum of p_T for loose tracks.
TauCommonExtraDetails_p1::m_seedCalo_EMCentFrac
float m_seedCalo_EMCentFrac
EM Centrality Fraction (ET(dr<0.1)/ET(dr<0.4) for EM calos only.
Definition:
TauCommonExtraDetails_p1.h:82
VectorUtils.h
Analysis::TauCommonExtraDetails::etaLooseTrkCaloSamp
const std::vector< std::vector< double > > & etaLooseTrkCaloSamp() const
Get eta vector.
Analysis::TauCommonExtraDetails::seedCalo_stripEt
double seedCalo_stripEt() const
Get sum of ET in strip layer.
Analysis::TauCommonExtraDetails
Extra detail class containing information for track and calo seeded tau reconstruction algorithms.
Definition:
TauCommonExtraDetails.h:31
python.setupRTTAlg.size
int size
Definition:
setupRTTAlg.py:39
Analysis::TauCommonExtraDetails::phiLooseTrkCaloSamp
const std::vector< std::vector< double > > & phiLooseTrkCaloSamp() const
Get phi vector.
TPPolyCnvBase
Definition:
TPConverter.h:674
Analysis::TauCommonExtraDetails::seedCalo_sumEMCellEnergy
double seedCalo_sumEMCellEnergy() const
Get EM energy sum.
TauCommonExtraDetails_p1
Persistent class for Analysis::TauCommonExtraDetails.
Definition:
TauCommonExtraDetails_p1.h:31
TauCommonExtraDetails.h
Analysis::TauCommonExtraDetails::closestEtaTrkVertCell
const std::vector< std::vector< ElementLink< CaloCellContainer > > > & closestEtaTrkVertCell() const
Get closest eta vector.
lumiFormat.i
int i
Definition:
lumiFormat.py:85
TauCommonExtraDetailsCnv_p1.h
TauCommonExtraDetailsCnv_p1::m_cellCnv
ElementLinkCnv_p2< ElementLink< CaloCellContainer > > m_cellCnv
Definition:
TauCommonExtraDetailsCnv_p1.h:60
TauCommonExtraDetails_p1::m_seedCalo_sumEMCellEnergy
float m_seedCalo_sumEMCellEnergy
Energy sum of all em cells within dR < 0.4 (Presampler + EM1 + EM2)
Definition:
TauCommonExtraDetails_p1.h:88
Analysis::TauCommonExtraDetails::seedCalo_EMCentFrac
double seedCalo_EMCentFrac() const
Set EM Centrality Fraction.
TauCommonExtraDetails_p1::m_seedCalo_stripEt
float m_seedCalo_stripEt
Uncalibrated sum of ET in the strip layer within dR < 0.4.
Definition:
TauCommonExtraDetails_p1.h:79
TauCommonExtraDetails_p1::m_tracks
unsigned short int m_tracks
Element link container name lookup table.
Definition:
TauCommonExtraDetails_p1.h:94
Analysis::TauCommonExtraDetails::allocTracksAndSamplings
void allocTracksAndSamplings(unsigned int tracks, unsigned int samplings)
Allocate data structures for given number of tracks and samplings.
Definition:
TauCommonExtraDetails.cxx:140
TauCommonExtraDetailsCnv_p1::TauCommonExtraDetailsCnv_p1
TauCommonExtraDetailsCnv_p1()
Constructor.
Definition:
TauCommonExtraDetailsCnv_p1.cxx:22
TauCommonExtraDetailsCnv_p1::persToTrans
virtual void persToTrans(const TauCommonExtraDetails_p1 *pers, Analysis::TauCommonExtraDetails *trans, MsgStream &msg)
Creates persistent object from transient object.
Definition:
TauCommonExtraDetailsCnv_p1.cxx:34
ElementLinkCnv_p2::persToTrans
void persToTrans(State &state, const PersLink_t &pers, Link_t &trans, MsgStream &log) const
Analysis::TauCommonExtraDetails::setSeedCalo_EMCentFrac
void setSeedCalo_EMCentFrac(double fraction)
Get EM Centrality Fraction.
TauCommonExtraDetails_p1::m_linkNames
ElementLinkContNames_p2 m_linkNames
Element link container name lookup table.
Definition:
TauCommonExtraDetails_p1.h:91
TauCommonExtraDetailsCnv_p1::~TauCommonExtraDetailsCnv_p1
virtual ~TauCommonExtraDetailsCnv_p1()
Destructor.
Definition:
TauCommonExtraDetailsCnv_p1.cxx:29
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition:
BTaggingCnvAlg.h:20
Analysis::TauCommonExtraDetails::closestPhiTrkCell
const std::vector< std::vector< ElementLink< CaloCellContainer > > > & closestPhiTrkCell() const
Get closest phi vector.
Analysis::TauCommonExtraDetails::etaTrkCaloSamp
const std::vector< std::vector< double > > & etaTrkCaloSamp() const
Get eta vector.
TauCommonExtraDetailsCnv_p1::transToPers
virtual void transToPers(const Analysis::TauCommonExtraDetails *trans, TauCommonExtraDetails_p1 *pers, MsgStream &msg)
Creates transient object from persistent object.
Definition:
TauCommonExtraDetailsCnv_p1.cxx:94
Analysis::TauCommonExtraDetails::setSeedCalo_sumEMCellEnergy
void setSeedCalo_sumEMCellEnergy(double energy)
Set EM energy sum.
Analysis::TauCommonExtraDetails::seedCalo_nEMCell
int seedCalo_nEMCell() const
Get number of EM cells.
Analysis::TauCommonExtraDetails::sumPtTrk
double sumPtTrk() const
Get sum of p_T for loose tracks.
TauCommonExtraDetails_p1::m_sumPtTrk
float m_sumPtTrk
Sum of p_T for tracks.
Definition:
TauCommonExtraDetails_p1.h:49
TauCommonExtraDetails_p1::m_phiLooseTrkCaloSamp
std::vector< float > m_phiLooseTrkCaloSamp
Phi of extrapolation point in EM Calo.
Definition:
TauCommonExtraDetails_p1.h:73
ElementLinkCnv_p2::resetForCnv
void resetForCnv(ElementLinkContNames_p2 &lookupTable)
Analysis::TauCommonExtraDetails::setSumPtTrk
void setSumPtTrk(double pt)
Set sum of p_T for loose tracks.
Analysis::TauCommonExtraDetails::closestEtaTrkCell
const std::vector< std::vector< ElementLink< CaloCellContainer > > > & closestEtaTrkCell() const
Get closest eta vector.
TauCommonExtraDetails_p1::m_closestEtaTrkVertCell
std::vector< ElementLinkInt_p2 > m_closestEtaTrkVertCell
Closest cell to track position at vertex in eta.
Definition:
TauCommonExtraDetails_p1.h:52
TauCommonExtraDetails_p1::m_etaTrkCaloSamp
std::vector< float > m_etaTrkCaloSamp
Eta of extrapolation point in EM Calo.
Definition:
TauCommonExtraDetails_p1.h:64
TauCommonExtraDetails_p1::m_closestPhiTrkCell
std::vector< ElementLinkInt_p2 > m_closestPhiTrkCell
Closest cell to track position from extrapolation in phi.
Definition:
TauCommonExtraDetails_p1.h:61
python.AutoConfigFlags.msg
msg
Definition:
AutoConfigFlags.py:7
TauCommonExtraDetails_p1::m_phiTrkCaloSamp
std::vector< float > m_phiTrkCaloSamp
Phi of extrapolation point in EM Calo.
Definition:
TauCommonExtraDetails_p1.h:67
checkFileSG.ind
list ind
Definition:
checkFileSG.py:118
TauCommonExtraDetails_p1::m_sumPtLooseTrk
float m_sumPtLooseTrk
Sum of p_T for loose tracks.
Definition:
TauCommonExtraDetails_p1.h:46
TauCommonExtraDetails_p1::m_closestEtaTrkCell
std::vector< ElementLinkInt_p2 > m_closestEtaTrkCell
Closest cell to track position from extrapolation in eta.
Definition:
TauCommonExtraDetails_p1.h:58
Generated on Sun Dec 22 2024 21:18:52 for ATLAS Offline Software by
1.8.18