 |
ATLAS Offline Software
|
#include <EGammaGSFCalo.h>
|
| | EGammaGSFCalo (const std::string &t, const std::string &n, const IInterface *p) |
| | Default constructor. More...
|
| |
| virtual | ~EGammaGSFCalo () |
| | Destructor. More...
|
| |
| virtual StatusCode | initialize () override |
| | initialize method More...
|
| |
| virtual StatusCode | finalize () override |
| | finalize method More...
|
| |
| virtual StatusCode | addBranches (const EventContext &ctx) const override |
| | addBranches method 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, V, H > &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 |
| |
| | DeclareInterfaceID (IAugmentationTool, 1, 0) |
| |
|
| void | copyInfo (const xAOD::TrackParticle &original, xAOD::TrackParticle &created, bool isRefitted) const |
| | Copy TrackParticle info from the original TP. More...
|
| |
| void | copySummaryValue (const xAOD::TrackParticle &src, xAOD::TrackParticle &dest, const xAOD::SummaryType &information) const |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
Definition at line 29 of file EGammaGSFCalo.h.
◆ StoreGateSvc_t
◆ EGammaGSFCalo()
| DerivationFramework::EGammaGSFCalo::EGammaGSFCalo |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Default constructor.
Definition at line 14 of file EGammaGSFCalo.cxx.
17 declareInterface<DerivationFramework::IAugmentationTool>(
this);
◆ ~EGammaGSFCalo()
| DerivationFramework::EGammaGSFCalo::~EGammaGSFCalo |
( |
| ) |
|
|
virtual |
◆ addBranches()
| StatusCode DerivationFramework::EGammaGSFCalo::addBranches |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
addBranches method
Implements DerivationFramework::IAugmentationTool.
Definition at line 60 of file EGammaGSFCalo.cxx.
70 "gsfChiSquareOverNDOF");
72 "gsfCaloChiSquareOverNDOF");
74 acc_usedElectronLink(
"usedElectronLink");
77 read_originalTP(
"originalTrackParticle");
80 write_originalTP(
"originalTrackParticle");
87 std::make_unique<xAOD::TrackParticleContainer>(),
88 std::make_unique<xAOD::TrackParticleAuxContainer>()));
102 <<
" TrackParticle!");
109 int gsfCaloStatus = -1;
110 float gsfChiSquareOverNDOF = -1;
111 float gsfCaloChiSquareOverNDOF = -1;
133 gsfChiSquareOverNDOF = electronTrackQuality->
chiSquared() /
134 electronTrackQuality->numberDoF();
136 auto electronTrackRefit = std::make_unique<Trk::Track>();
142 if (
sc == StatusCode::SUCCESS) {
143 electronTrackRefit.reset(cache.refittedTrack.release());
152 ctx, *electronTrackRefit, cPtrTrkPart, electronTrackVertex,
154 if (electronTPRefit) {
156 auto electronTrackRefitQuality = electronTrackRefit->fitQuality();
157 gsfCaloChiSquareOverNDOF = electronTrackRefitQuality->chiSquared() /
158 electronTrackRefitQuality->numberDoF();
161 "Can't create a new xAOD::TrackParticle from the re-fitted "
162 "Trk::Track! Using the original xAOD::TrackParticle!");
168 "CALO-improved Trk::Track re-fit failed! Using the original "
169 "xAOD::TrackParticle!");
176 <<
" has a valid track particle but is a TRT-only track");
181 if (gsfCaloStatus != 1) {
184 *electronTPRefit = *electronTP;
187 acc_gsfCaloStatus(*electronTPRefit) = gsfCaloStatus;
188 acc_gsfChi2oNDF(*electronTPRefit) = gsfChiSquareOverNDOF;
189 acc_gsfCaloChi2oNDF(*electronTPRefit) = gsfCaloChiSquareOverNDOF;
195 electronTPRefit, *cPtrTrkPart);
196 dec_gsfCaloTrackLink(*
electron) = linkToRefittedTrackParticle;
201 acc_usedElectronLink(*electronTPRefit) = linkToElectron;
204 if (read_originalTP.isAvailable(*electronTP)) {
205 linkToOriginal = read_originalTP(*electronTP);
207 write_originalTP(*electronTPRefit) = linkToOriginal;
211 return StatusCode::SUCCESS;
◆ copyInfo()
Copy TrackParticle info from the original TP.
Definition at line 214 of file EGammaGSFCalo.cxx.
221 tPL(
"truthParticleLink");
222 if (tPL.isAvailable(original)) {
225 tPL(created) = linkToTruth;
228 if (tMP.isAvailable(original)) {
229 float originalProbability = tMP(original);
230 tMP(created) = originalProbability;
233 if (tT.isAvailable(original)) {
238 if (tO.isAvailable(original)) {
281 int nPixHitsRefitted =
283 int nPixOutliersRefitted =
286 int nPixHitsOriginal =
288 int nPixOutliersOriginal =
291 int nPixHolesOriginal =
294 uint8_t nPixHolesRefitted = nPixHitsOriginal + nPixHolesOriginal +
295 nPixOutliersOriginal - nPixOutliersRefitted -
302 int nSCTHitsRefitted =
304 int nSCTOutliersRefitted =
307 int nSCTHitsOriginal =
309 int nSCTHolesOriginal =
311 int nSCTOutliersOriginal =
314 uint8_t nSCTHolesRefitted = nSCTHitsOriginal + nSCTHolesOriginal +
315 nSCTOutliersOriginal - nSCTOutliersRefitted -
322 int nTRTHitsRefitted =
324 int nTRTOutliersRefitted =
327 int nTRTHitsOriginal =
329 int nTRTHolesOriginal =
331 int nTRTOutliersOriginal =
334 uint8_t nTRTHolesRefitted = nTRTHitsOriginal + nTRTHolesOriginal +
335 nTRTOutliersOriginal - nTRTOutliersRefitted -
◆ copySummaryValue()
◆ 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]
◆ DeclareInterfaceID()
| DerivationFramework::IAugmentationTool::DeclareInterfaceID |
( |
IAugmentationTool |
, |
|
|
1 |
, |
|
|
0 |
|
|
) |
| |
|
inherited |
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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
◆ finalize()
| StatusCode DerivationFramework::EGammaGSFCalo::finalize |
( |
| ) |
|
|
overridevirtual |
finalize method
Definition at line 41 of file EGammaGSFCalo.cxx.
55 return StatusCode::SUCCESS;
◆ initialize()
| StatusCode DerivationFramework::EGammaGSFCalo::initialize |
( |
| ) |
|
|
overridevirtual |
initialize method
Definition at line 28 of file EGammaGSFCalo.cxx.
38 return StatusCode::SUCCESS;
◆ 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.
◆ 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()
◆ 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_allElectrons
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_allElectrons = 0 |
|
mutableprivate |
◆ m_allNewTP
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_allNewTP = 0 |
|
mutableprivate |
◆ m_detStore
◆ m_doPix
| Gaudi::Property<bool> DerivationFramework::EGammaGSFCalo::m_doPix |
|
private |
Initial value:{this, "usePixel", true,
"Bool to use pixel hits"}
Definition at line 71 of file EGammaGSFCalo.h.
◆ m_doSCT
| Gaudi::Property<bool> DerivationFramework::EGammaGSFCalo::m_doSCT {this, "useSCT", true, "Bool to use SCT hits"} |
|
private |
◆ m_doTRT
| Gaudi::Property<bool> DerivationFramework::EGammaGSFCalo::m_doTRT {this, "useTRT", true, "Bool to use TRT hits"} |
|
private |
◆ m_doTruth
| Gaudi::Property<bool> DerivationFramework::EGammaGSFCalo::m_doTruth |
|
private |
Initial value:{this, "useTruth", true,
"Bool to add truth decorations"}
Definition at line 76 of file EGammaGSFCalo.h.
◆ m_electronCollectionKey
Initial value:{
this, "ElectronCollectionName", "Electrons", "Input electron collection"}
Definition at line 44 of file EGammaGSFCalo.h.
◆ m_evtStore
◆ m_failedFits
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_failedFits = 0 |
|
mutableprivate |
◆ m_gsfCaloTrackLinkKey
Initial value:{
this, "GSFCaloTrackLinkKey", "Electrons.gsfCaloTrackParticleLink",
"Decoration linking electrons to refitted TrackParticles"}
Definition at line 51 of file EGammaGSFCalo.h.
◆ m_isAOD
| Gaudi::Property<bool> DerivationFramework::EGammaGSFCalo::m_isAOD {this, "isAOD", true, "AOD flag"} |
|
private |
◆ m_minNSiHits
| Gaudi::Property<int> DerivationFramework::EGammaGSFCalo::m_minNSiHits |
|
private |
Initial value:{this, "minNSiHits", 4,
"Minimum number of silicon hits on track "
"before it is allowed to be refitted"}
Minimum number of silicon hits on track before it is allowed to be refitted.
Definition at line 68 of file EGammaGSFCalo.h.
◆ m_noRefTP
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_noRefTP = 0 |
|
mutableprivate |
◆ m_noTP
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_noTP = 0 |
|
mutableprivate |
◆ m_noTrk
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_noTrk = 0 |
|
mutableprivate |
◆ m_onlyTRT
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_onlyTRT = 0 |
|
mutableprivate |
◆ m_OutputTrkPartContainerKey
Initial value:{
this, "OutputTrkPartContainerName", "GSFCaloContainer",
"Output GSF+Calo container"}
Definition at line 47 of file EGammaGSFCalo.h.
◆ m_particleCreatorTool
Initial value:{
this, "TrackParticleCreatorTool", "TrackParticleCreatorTool",
"TrackParticle creator tool"}
Tool to create track particle.
Definition at line 59 of file EGammaGSFCalo.h.
◆ m_successfulCopyInfos
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_successfulCopyInfos = 0 |
|
mutableprivate |
◆ m_successfulFits
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_successfulFits = 0 |
|
mutableprivate |
◆ m_trackSummaryTool
Initial value:{
this, "TrackSummaryTool", "Trk::TrackSummaryTool/AtlasTrackSummaryTool"}
Definition at line 63 of file EGammaGSFCalo.h.
◆ m_trkRefitTool
Initial value:{
this, "TrackRefitTool", "ElectronRefitterTool", "Track refitter tool"}
The track refitter.
Definition at line 55 of file EGammaGSFCalo.h.
◆ m_tsos
| std::atomic<unsigned int> DerivationFramework::EGammaGSFCalo::m_tsos = 0 |
|
mutableprivate |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
@ numberOfInnermostPixelLayerSplitHits
number of Pixel 0th layer barrel hits split by cluster splitting
Gaudi::Property< bool > m_doSCT
xAOD::ElectronContainer * electronContainer
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
Helper class to provide type-safe access to aux data.
@ numberOfNextToInnermostPixelLayerSplitHits
number of Pixel 1st layer barrel hits split by cluster splitting
std::atomic< unsigned int > m_tsos
PublicToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
bool toIndexedElement(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by index and pointer to container.
void setTrackLink(const ElementLink< TrackCollection > &track)
Set the link to the original track.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::atomic< unsigned int > m_noTrk
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Gaudi::Property< bool > m_doTruth
@ numberOfTRTHits
number of TRT hits [unit8_t].
void copySummaryValue(const xAOD::TrackParticle &src, xAOD::TrackParticle &dest, const xAOD::SummaryType &information) const
Helper class to provide constant type-safe access to aux data.
ToolHandle< IegammaTrkRefitterTool > m_trkRefitTool
The track refitter.
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreatorTool
Tool to create track particle.
bool isValid() const
Test to see if the link can be dereferenced.
@ numberOfBLayerHits
these are the hits in the first pixel layer, i.e.
int truthType(const U &p)
std::atomic< unsigned int > m_onlyTRT
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCollectionKey
std::atomic< unsigned int > m_allNewTP
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
virtual void setOwner(IDataHandleHolder *o)=0
TrackParticle_v1 TrackParticle
Reference the current persistent version:
int truthOrigin(const U &p)
@ numberOfTRTSharedHits
number of TRT hits used by more than one track
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
void copyInfo(const xAOD::TrackParticle &original, xAOD::TrackParticle &created, bool isRefitted) const
Copy TrackParticle info from the original TP.
Gaudi::Property< bool > m_doPix
std::atomic< unsigned int > m_noTP
Gaudi::Property< int > m_minNSiHits
Minimum number of silicon hits on track before it is allowed to be refitted.
Gaudi::Property< bool > m_isAOD
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Handle class for adding a decoration to an object.
@ numberOfPixelOutliers
these are the pixel outliers, including the b-layer [unit8_t].
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
@ numberOfPixelSplitHits
number of Pixel all-layer hits split by cluster splitting [unit8_t].
@ numberOfSCTHoles
number of SCT holes [unit8_t].
std::atomic< unsigned int > m_successfulCopyInfos
int summaryValueInt(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, int deflt=-999)
return the summary value for a TrackParticle or default value (-999) (to be used mostly in python whe...
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_OutputTrkPartContainerKey
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_gsfCaloTrackLinkKey
@ numberOfBLayerSharedHits
number of Pixel b-layer hits shared by several tracks [unit8_t].
const ElementLink< TrackCollection > & trackLink() const
Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
void setSummaryValue(uint8_t &value, const SummaryType &information)
Set method for TrackSummary values.
std::atomic< unsigned int > m_failedFits
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class describing a Vertex.
@ numberOfSCTOutliers
number of SCT outliers [unit8_t].
#define ATH_MSG_WARNING(x)
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
std::atomic< unsigned int > m_successfulFits
std::atomic< unsigned int > m_noRefTP
std::atomic< unsigned int > m_allElectrons
Counters.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
Gaudi::Property< bool > m_doTRT
@ numberOfSCTHits
number of hits in SCT [unit8_t].
double chiSquared() const
returns the of the overall track fit
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Class describing a TrackParticle.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
@ numberOfSCTDoubleHoles
number of Holes in both sides of a SCT module [unit8_t].
@ numberOfNextToInnermostPixelLayerSharedHits
number of Pixel 1st layer barrel hits shared by several tracks.
@ numberOfTRTHoles
number of TRT holes [unit8_t].
size_type size() const noexcept
Returns the number of elements in the collection.
float nSiHits(const U &p)