![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CLHEP/Units/SystemOfUnits.h"
13 #include "CaloEvent/CaloClusterContainer.h"
25 m_typeName(
"Electron"){
28 declareInterface<IDataRetriever>(
this);
31 "Collection to be first in output, shown in Atlantis without switching");
48 if (
sc.isFailure() ) {
61 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Unable to retrieve iterator for Jet collection" <<
endmsg;
70 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Collection " <<
iterator.key() <<
" not found in SG " <<
endmsg;
77 return StatusCode::SUCCESS;
102 DataVect isEMString; isEMString.reserve(elCont->
size());
109 DataVect hitsBLayer; hitsBLayer.reserve(elCont->
size());
115 DataVect clusterKeyVec; clusterKeyVec.reserve(elCont->
size());
116 DataVect clusterIndexVec; clusterIndexVec.reserve(elCont->
size());
117 DataVect trackKeyVec; trackKeyVec.reserve(elCont->
size());
118 DataVect trackIndexVec; trackIndexVec.reserve(elCont->
size());
128 double ep = 0.,
p=0.,
e=0.;
130 std::string electronAuthor =
"";
131 std::string electronIsEMString =
"none";
132 std::string electronLabel =
"";
134 for (; elItr != elItrE; ++elItr) {
135 electronIsEMString =
"none";
148 electronAuthor =
"author"+
DataType( (*elItr)->author() ).toString();
149 electronLabel = electronAuthor;
150 if (( (*elItr)->author()) == 0){ electronAuthor =
"unknown"; electronLabel +=
"_unknown"; }
151 if (( (*elItr)->author()) == 8){ electronAuthor =
"forward"; electronLabel +=
"_forward"; }
152 if (( (*elItr)->author()) == 2){ electronAuthor =
"softe"; electronLabel +=
"_softe"; }
153 if (( (*elItr)->author()) == 1){ electronAuthor =
"egamma"; electronLabel +=
"_egamma"; }
160 electronLabel +=
"_Loose";
161 electronIsEMString =
"Loose";
164 electronLabel +=
"_Medium";
165 electronIsEMString =
"Medium";
168 electronLabel +=
"_Tight";
169 electronIsEMString =
"Tight";
172 electronLabel +=
"_TightPP";
173 electronIsEMString =
"TightPP";
176 electronLabel +=
"_MediumPP";
181 electronLabel +=
"_MediumNoIso";
185 electronLabel +=
"_TightTRTNoIso";
190 electronLabel +=
"_TightNoIsolation";
193 MCdataType = (*elItr)->dataType();
200 if (MCdataType != 3){
202 isEM.push_back(
DataType((**elItr).isem() ) );
205 bool elecTrack = (*elItr)->trackParticle();
213 p = (*elItr)->trackParticle()->p();
215 ep =
p>0. ?
e/
p : 0.;
218 summary = (*elItr)->trackParticle()->trackSummary();
219 hasTrack.push_back(
DataType( 1 ) );
225 eOverp.push_back(
DataType(
"0." ));
226 hasTrack.push_back(
DataType( 0 ) );
227 hitsBLayer.push_back(
DataType( -1 ));
228 hitsPixel.push_back(
DataType( -1 ));
240 std::string clusterKey = clusterLink.
dataID();
241 int clusterIndex = clusterLink.
index();
245 clusterKeyVec.push_back(
DataType( clusterKey ));
246 clusterIndexVec.push_back(
DataType( clusterIndex ));
248 clusterKeyVec.push_back(
DataType(
"none" ));
249 clusterIndexVec.push_back(
DataType( -1 ));
254 std::string trackKey = trackLink.
dataID();
255 int trackIndex = trackLink.
index();
259 trackKeyVec.push_back(
DataType( trackKey ));
260 trackIndexVec.push_back(
DataType( trackIndex));
262 trackKeyVec.push_back(
DataType(
"none" ));
263 trackIndexVec.push_back(
DataType( -1 ));
271 hasTrack.push_back(
DataType( 1 ) );
274 electronIsEMString +=
"fastSim";
275 electronLabel +=
"fastSim" ;
276 hitsBLayer.push_back(
DataType( 0 ) );
277 hitsPixel.push_back(
DataType( 0 ) );
281 clusterKeyVec.push_back(
DataType(
"none" ));
282 clusterIndexVec.push_back(
DataType( -1 ));
283 trackKeyVec.push_back(
DataType(
"none" ));
284 trackIndexVec.push_back(
DataType( -1 ));
289 isEMString.push_back(
DataType( electronIsEMString ) );
305 DataMap[
"isEMString"] = isEMString;
307 DataMap[
"hasTrack"] = hasTrack;
311 DataMap[
"hitsBLayer"] = hitsBLayer;
312 DataMap[
"hitsPixel"] = hitsPixel;
317 DataMap[
"clusterKey"] = clusterKeyVec;
318 DataMap[
"clusterIndex"] = clusterIndexVec;
319 DataMap[
"trackKey"] = trackKeyVec;
320 DataMap[
"trackIndex"] = trackIndexVec;
JetConstituentVector::iterator iterator
@ numberOfPixelHits
number of pixel layers on track with absence of hits
char data[hepevt_bytes_allocation_ATLAS]
Const iterator class for DataVector/DataList.
const unsigned int ElectronMediumPP
Medium++ electron selecton.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
ElectronRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
@ numberOfInnermostPixelLayerHits
these are the hits in the 1st pixel layer
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
bool msgLvl(const MSG::Level lvl) const
const DataMap getData(const ElectronContainer *)
Retrieve basic parameters, mainly four-vectors, for each collection.
std::map< std::string, DataVect > DataMap
const unsigned int ElectronTightNoIsolation
obsolete - kept not to crash clients
bool isValid() const
Test to see if the link can be dereferenced.
const ID_type & dataID() const
Get the key that we reference, as a string.
const unsigned int ElectronMediumNoIso
obsolete - kept not crash clients
const unsigned int ElectronLoose
Loose electron selection.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
::StatusCode StatusCode
StatusCode definition for legacy code.
@ numberOfSCTHits
number of SCT holes
virtual std::string dataTypeName() const
Return the name of the data type.
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
@ numberOfTRTHits
number of TRT outliers
A summary of the information contained by a track.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const unsigned int ElectronMedium
Medium electron selecton.
index_type index() const
Get the index of the element inside of its container.
const unsigned int ElectronTightPP
Tight++ electron selecton.
const unsigned int ElectronTightTRTNoIso
obsolete - kept not to crash clients
size_type size() const noexcept
Returns the number of elements in the collection.
const unsigned int ElectronTight
Tight electron selection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.