ATLAS Offline Software
Loading...
Searching...
No Matches
egammaCopyTrackParticleInfo Namespace Reference

Classes

struct  ToCopy

Functions

void copy (xAOD::TrackParticle &created, const xAOD::TrackParticle &original, const egammaCopyTrackParticleInfo::ToCopy &toCopy)

Function Documentation

◆ copy()

void egammaCopyTrackParticleInfo::copy ( xAOD::TrackParticle & created,
const xAOD::TrackParticle & original,
const egammaCopyTrackParticleInfo::ToCopy & toCopy )

Definition at line 22 of file egammaCopyTrackParticleInfo.cxx.

24 {
25 // Add Truth decorations. Copy from the original.
26 if (toCopy.doTruth) {
27 static const SG::AuxElement::Accessor<
29 tPL("truthParticleLink");
30 if (tPL.isAvailable(original)) {
31 tPL(created) = tPL(original);
32 }
33 static const SG::AuxElement::Accessor<float> tMP("truthMatchProbability");
34 if (tMP.isAvailable(original)) {
35 tMP(created) = tMP(original);
36 }
37 static const SG::AuxElement::Accessor<int> tT("truthType");
38 if (tT.isAvailable(original)) {
39 tT(created) = tT(original);
40 }
41 static const SG::AuxElement::Accessor<int> tO("truthOrigin");
42 if (tO.isAvailable(original)) {
43 tO(created) = tO(original);
44 }
45 }
46
47 copySummaryValue(original, created, xAOD::numberOfPixelSplitHits);
48 copySummaryValue(original, created,
50 copySummaryValue(original, created,
52 copySummaryValue(original, created, xAOD::numberOfPixelSharedHits);
53 copySummaryValue(original, created,
55 copySummaryValue(original, created,
57 copySummaryValue(original, created, xAOD::numberOfSCTSharedHits);
58 copySummaryValue(original, created, xAOD::numberOfTRTSharedHits);
59
60 if (toCopy.doHGTD) {
61 created.setHasValidTime(original.hasValidTime());
62 created.setTime(original.time());
63 }
64
65 if (toCopy.isRefitted) {
66 if (toCopy.doPix) {
67 // copy over dead sensors
68 copySummaryValue(original, created, xAOD::numberOfPixelDeadSensors);
69
70 // Figure the new number of holes
71 uint8_t nPixHolesRefitted =
77
78 created.setSummaryValue(nPixHolesRefitted, xAOD::numberOfPixelHoles);
79 }
80 if (toCopy.doSCT) {
81 // Copy over dead and double holes
82 copySummaryValue(original, created, xAOD::numberOfSCTDeadSensors);
83 copySummaryValue(original, created, xAOD::numberOfSCTDoubleHoles);
84
85 uint8_t nSCTHolesRefitted =
91
92 created.setSummaryValue(nSCTHolesRefitted, xAOD::numberOfSCTHoles);
93 }
94 if (toCopy.doTRT) {
95 uint8_t nTRTHolesRefitted =
101
102 created.setSummaryValue(nTRTHolesRefitted, xAOD::numberOfTRTHoles);
103 }
104 }
105}
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
float time() const
Returns the time.
uint8_t hasValidTime() const
Returns whether or not the track has a valid time.
void setSummaryValue(uint8_t &value, const SummaryType &information)
Set method for TrackSummary values.
void setTime(float time)
void setHasValidTime(uint8_t hasValidTime)
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...
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
@ numberOfNextToInnermostPixelLayerSharedHits
number of Pixel 1st layer barrel hits shared by several tracks.
@ numberOfNextToInnermostPixelLayerSplitHits
number of Pixel 1st layer barrel hits split by cluster splitting
@ numberOfPixelSplitHits
number of Pixel all-layer hits split by cluster splitting [unit8_t].
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
@ numberOfPixelOutliers
these are the pixel outliers, including the b-layer [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfTRTHoles
number of TRT holes [unit8_t].
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
@ numberOfInnermostPixelLayerSplitHits
number of Pixel 0th layer barrel hits split by cluster splitting
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfSCTDoubleHoles
number of Holes in both sides of a SCT module [unit8_t].
@ numberOfSCTOutliers
number of SCT outliers [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
@ numberOfTRTSharedHits
number of TRT hits used by more than one track
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
@ numberOfSCTHoles
number of SCT holes [unit8_t].