![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Retrieves all Electron
objects
(ElectronAODCollection etc.)
More...
#include <ElectronRetriever.h>
|
| ElectronRetriever (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Constructor. More...
|
|
virtual StatusCode | retrieve (ToolHandle< IFormatTool > &FormatTool) |
| Retrieve all the data. More...
|
|
const DataMap | getData (const ElectronContainer *) |
| Retrieve basic parameters, mainly four-vectors, for each collection. More...
|
|
virtual std::string | dataTypeName () const |
| Return the name of the data type. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Retrieves all Electron
objects
(ElectronAODCollection etc.)
- Properties
- StoreGateKey: First collection to be retrieved, displayed in Atlantis without switching. All other collections are also retrieved.
- Retrieved Data
- Usual four-vectors: phi, eta, et etc.
- Associations for clusters and tracks via ElementLink: key/index scheme
Definition at line 34 of file ElectronRetriever.h.
◆ StoreGateSvc_t
◆ ElectronRetriever()
JiveXML::ElectronRetriever::ElectronRetriever |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Constructor.
This is the standard AthAlgTool constructor.
- Parameters
-
type | AlgTool type name |
name | AlgTool instance name |
parent | AlgTools parent owning this tool |
Definition at line 23 of file ElectronRetriever.cxx.
28 declareInterface<IDataRetriever>(
this);
31 "Collection to be first in output, shown in Atlantis without switching");
◆ dataTypeName()
virtual std::string JiveXML::ElectronRetriever::dataTypeName |
( |
| ) |
const |
|
inlinevirtual |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getData()
Retrieve basic parameters, mainly four-vectors, for each collection.
Also association with clusters and tracks (ElementLink).
Definition at line 85 of file ElectronRetriever.cxx.
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;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & JiveXML::IDataRetriever::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Return the interface identifier.
Definition at line 40 of file IDataRetriever.h.
40 {
return IID_IDataRetriever; }
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ retrieve()
StatusCode JiveXML::ElectronRetriever::retrieve |
( |
ToolHandle< IFormatTool > & |
FormatTool | ) |
|
|
virtual |
Retrieve all the data.
For each jet collections retrieve basic parameters.
- Parameters
-
FormatTool | the tool that will create formated output from the DataMap |
Implements JiveXML::IDataRetriever.
Definition at line 38 of file ElectronRetriever.cxx.
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;
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_sgKey
std::string JiveXML::ElectronRetriever::m_sgKey |
|
private |
◆ m_typeName
const std::string JiveXML::ElectronRetriever::m_typeName |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
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.
@ 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.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
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
virtual void setOwner(IDataHandleHolder *o)=0
const unsigned int ElectronLoose
Loose electron selection.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const std::string m_typeName
The data type that is generated by this retriever.
::StatusCode StatusCode
StatusCode definition for legacy code.
@ numberOfSCTHits
number of SCT holes
virtual std::string dataTypeName() const
Return the name of the data type.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ 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.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const unsigned int ElectronTightTRTNoIso
obsolete - kept not to crash clients
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const unsigned int ElectronTight
Tight electron selection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.