 |
ATLAS Offline Software
|
Go to the documentation of this file.
24 return StatusCode::SUCCESS;
41 return StatusCode::SUCCESS;
56 "gsfChiSquareOverNDOF");
58 "gsfCaloChiSquareOverNDOF");
60 acc_usedElectronLink(
"usedElectronLink");
63 read_originalTP(
"originalTrackParticle");
66 write_originalTP(
"originalTrackParticle");
73 std::make_unique<xAOD::TrackParticleContainer>(),
74 std::make_unique<xAOD::TrackParticleAuxContainer>()));
88 <<
" TrackParticle!");
95 int gsfCaloStatus = -1;
96 float gsfChiSquareOverNDOF = -1;
97 float gsfCaloChiSquareOverNDOF = -1;
119 gsfChiSquareOverNDOF = electronTrackQuality->
chiSquared() /
120 electronTrackQuality->numberDoF();
122 auto electronTrackRefit = std::make_unique<Trk::Track>();
128 if (
sc == StatusCode::SUCCESS) {
129 electronTrackRefit.reset(cache.refittedTrack.release());
138 ctx, *electronTrackRefit, cPtrTrkPart, electronTrackVertex,
140 if (electronTPRefit) {
142 auto electronTrackRefitQuality = electronTrackRefit->fitQuality();
143 gsfCaloChiSquareOverNDOF = electronTrackRefitQuality->chiSquared() /
144 electronTrackRefitQuality->numberDoF();
147 "Can't create a new xAOD::TrackParticle from the re-fitted "
148 "Trk::Track! Using the original xAOD::TrackParticle!");
154 "CALO-improved Trk::Track re-fit failed! Using the original "
155 "xAOD::TrackParticle!");
162 <<
" has a valid track particle but is a TRT-only track");
167 if (gsfCaloStatus != 1) {
170 *electronTPRefit = *electronTP;
173 acc_gsfCaloStatus(*electronTPRefit) = gsfCaloStatus;
174 acc_gsfChi2oNDF(*electronTPRefit) = gsfChiSquareOverNDOF;
175 acc_gsfCaloChi2oNDF(*electronTPRefit) = gsfCaloChiSquareOverNDOF;
181 electronTPRefit, *cPtrTrkPart);
182 dec_gsfCaloTrackLink(*
electron) = linkToRefittedTrackParticle;
187 acc_usedElectronLink(*electronTPRefit) = linkToElectron;
190 if (read_originalTP.isAvailable(*electronTP)) {
191 linkToOriginal = read_originalTP(*electronTP);
193 write_originalTP(*electronTPRefit) = linkToOriginal;
197 return StatusCode::SUCCESS;
202 bool isRefitted)
const {
207 tPL(
"truthParticleLink");
208 if (tPL.isAvailable(original)) {
211 tPL(created) = linkToTruth;
215 float originalProbability = tMP(original);
216 tMP(created) = originalProbability;
267 int nPixHitsRefitted =
269 int nPixOutliersRefitted =
272 int nPixHitsOriginal =
274 int nPixOutliersOriginal =
277 int nPixHolesOriginal =
280 uint8_t nPixHolesRefitted = nPixHitsOriginal + nPixHolesOriginal +
281 nPixOutliersOriginal - nPixOutliersRefitted -
288 int nSCTHitsRefitted =
290 int nSCTOutliersRefitted =
293 int nSCTHitsOriginal =
295 int nSCTHolesOriginal =
297 int nSCTOutliersOriginal =
300 uint8_t nSCTHolesRefitted = nSCTHitsOriginal + nSCTHolesOriginal +
301 nSCTOutliersOriginal - nSCTOutliersRefitted -
308 int nTRTHitsRefitted =
310 int nTRTOutliersRefitted =
313 int nTRTHitsOriginal =
315 int nTRTHolesOriginal =
317 int nTRTOutliersOriginal =
320 uint8_t nTRTHolesRefitted = nTRTHitsOriginal + nTRTHolesOriginal +
321 nTRTOutliersOriginal - nTRTOutliersRefitted -
@ 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].
const_pointer_type cptr()
Dereference the pointer.
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.
virtual StatusCode finalize() override final
finalize method
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].
TrackParticle_v1 TrackParticle
Reference the current persistent version:
int truthOrigin(const U &p)
@ numberOfTRTSharedHits
number of TRT hits used by more than one track
@ 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.
pointer_type ptr()
Dereference the pointer.
Handle class for adding a decoration to an object.
Handle class for adding a decoration to an object.
@ numberOfPixelOutliers
these are the pixel outliers, including the b-layer [unit8_t].
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].
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::atomic< unsigned int > m_successfulCopyInfos
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_OutputTrkPartContainerKey
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
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.
virtual StatusCode initialize() override final
initialize method
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.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
@ 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.
@ 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
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
@ 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.
virtual StatusCode addBranches(const EventContext &ctx) const override final
addBranches method
float nSiHits(const U &p)