loop over the AOD electron container, take the first one (only one?) with the correct author
106{
108
111 sc=
evtStore()->retrieve( elecTES,
"ElectronAODCollection");
112 if(
sc.isFailure() || !elecTES ) {
113 msg(MSG::WARNING) <<
"No AOD electron container found in TDS" <<
endmsg;
115 }
116 msg(MSG::INFO) <<
"ElectronContainer successfully retrieved" <<
endmsg;
117
119
120 if (( mcEvtColl =
evtStore()->retrieve<const McEventCollection>() )) {
121 msg(MSG::INFO) <<
"TruthParticleContainer successfully retrieved" <<
endmsg;
122 } else {
123 msg(MSG::WARNING) <<
"Could not retrieve TruthParticleContainer" <<
endmsg;
124 }
125
128
130 if (mcEvtColl) {
132 if (mcTrPart != mcEvtColl->
end()) {
133 trPart = (*mcTrPart)->particles_size()?*
HepMC::begin(**mcTrPart):nullptr;
134 if (!trPart) {
135 msg(MSG::WARNING) <<
"Not a single particle event. Truth information won't be available" <<
endmsg;
136 }
137 } else {
138 msg(MSG::WARNING) <<
"Empty TruthParticleContainer. Truth information won't be available" <<
endmsg;
139 }
140 }
141
142 const Analysis::Electron * primElec = nullptr;
143
144
147 for (; elecItr != elecItrE; ++elecItr) {
148 if (((*elecItr)->author() & (8 + 1)) > 0) {
149 primElec = (*elecItr);
150
151 const EMShower * emshower = primElec->
detail<EMShower> (
"egDetailAOD");
152 if (emshower) {
164 } else {
177 }
180 } else {
182 }
186 if (trPart) {
191 } else {
196 }
197
199 msg(MSG::VERBOSE) <<
"n tuple entry writed" <<
endmsg;
200 }
201 }
202
203 return StatusCode::SUCCESS;
204}
#define ATH_CHECK
Evaluate an expression and check for errors.
NTuple::Item< float > m_truth_pz
NTuple::Item< float > m_e237
NTuple::Item< float > m_et
NTuple::Item< float > m_eta
NTuple::Item< float > m_weta1
NTuple::Item< float > m_f1
NTuple::Item< float > m_truth_px
NTuple::Item< float > m_truth_energy
NTuple::Item< float > m_e277
NTuple::Item< float > m_wtots1
NTuple::Item< float > m_truth_py
NTuple::Item< float > m_weta2
NTuple::Item< float > m_emins1
NTuple::Item< float > m_f1core
NTuple::Item< float > m_energy
NTuple::Item< float > m_fracs1
NTuple::Item< float > m_ethad1
NTuple::Item< float > m_pt
NTuple::Item< float > m_e2tsts1
ServiceHandle< StoreGateSvc > & evtStore()
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
double f1core() const
E1(3x1)/E = fraction of the energy reconstructed in the first longitudinal compartment of the electro...
double weta1() const
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
double ethad1() const
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
double e237() const
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
double e277() const
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
double fracs1() const
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in +- n stri...
double weta2() const
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
double e2tsts1() const
energy of the cell corresponding to second energy maximum in the first sampling
double emins1() const
energy reconstructed in the strip with the minimal value between the first and second maximum
double wtots1() const
shower width is determined in a window detaxdphi = 0,0625 x~0,2, corresponding typically to 20 strips...
double f1() const
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
virtual double et() const
transverse energy defined to be e*sin(theta)
virtual double e() const
energy
virtual double pt() const
transverse momentum
virtual double eta() const
pseudo rapidity
const T * detail(const std::string &name="", unsigned int index=0) const
retrieve eg-detail objects:
const CaloCluster * cluster() const
pointer to CaloCluster
::StatusCode StatusCode
StatusCode definition for legacy code.
GenEvent::particle_iterator begin(HepMC::GenEvent &e)
const GenParticle * ConstGenParticlePtr