Skip to content

Commit 75533db

Browse files
committed
clang format
1 parent a1b7faf commit 75533db

File tree

8 files changed

+86
-84
lines changed

8 files changed

+86
-84
lines changed

Detectors/TRD/qc/include/TRDQC/Tracking.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class Tracking
103103
{
104104
mLocalGain = localGain;
105105
}
106-
106+
107107
// quantities necessary for pile-up correction
108108
void setTriggeredBCFT0(std::vector<int> t) { mTriggeredBCFT0 = t; }
109109
void setFirstOrbit(uint32_t o) { mFirstOrbit = o; }
@@ -120,17 +120,17 @@ class Tracking
120120
std::vector<TrackQC> mTrackQC;
121121

122122
// input from DPL
123-
gsl::span<const o2::dataformats::TrackTPCITS> mTracksITSTPC; ///< ITS-TPC seeding tracks
124-
gsl::span<const o2::tpc::TrackTPC> mTracksTPC; ///< TPC seeding tracks
125-
gsl::span<const TrackTRD> mTracksITSTPCTRD; ///< TRD tracks reconstructed from TPC or ITS-TPC seeds
126-
gsl::span<const TrackTRD> mTracksTPCTRD; ///< TRD tracks reconstructed from TPC or TPC seeds
127-
gsl::span<const TrackTriggerRecord> mTrackTriggerRecordsITSTPCTRD; ///< TRD tracks reconstructed from TPC or ITS-TPC seeds
128-
gsl::span<const TrackTriggerRecord> mTrackTriggerRecordsTPCTRD; ///< TRD tracks reconstructed from TPC or TPC seeds
129-
gsl::span<const Tracklet64> mTrackletsRaw; ///< array of raw tracklets needed for TRD refit
130-
gsl::span<const CalibratedTracklet> mTrackletsCalib; ///< array of calibrated tracklets needed for TRD refit
123+
gsl::span<const o2::dataformats::TrackTPCITS> mTracksITSTPC; ///< ITS-TPC seeding tracks
124+
gsl::span<const o2::tpc::TrackTPC> mTracksTPC; ///< TPC seeding tracks
125+
gsl::span<const TrackTRD> mTracksITSTPCTRD; ///< TRD tracks reconstructed from TPC or ITS-TPC seeds
126+
gsl::span<const TrackTRD> mTracksTPCTRD; ///< TRD tracks reconstructed from TPC or TPC seeds
127+
gsl::span<const TrackTriggerRecord> mTrackTriggerRecordsITSTPCTRD; ///< TRD tracks reconstructed from TPC or ITS-TPC seeds
128+
gsl::span<const TrackTriggerRecord> mTrackTriggerRecordsTPCTRD; ///< TRD tracks reconstructed from TPC or TPC seeds
129+
gsl::span<const Tracklet64> mTrackletsRaw; ///< array of raw tracklets needed for TRD refit
130+
gsl::span<const CalibratedTracklet> mTrackletsCalib; ///< array of calibrated tracklets needed for TRD refit
131131

132132
// quantities necessary for pile-up correction
133-
std::vector<int> mTriggeredBCFT0; ///< array with the FT0 trigger times
133+
std::vector<int> mTriggeredBCFT0; ///< array with the FT0 trigger times
134134
int mCurrentTriggerRecord;
135135
uint32_t mFirstOrbit;
136136
int mCurrentTrackId;

Detectors/TRD/qc/src/Tracking.cxx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ void Tracking::checkTrack(const TrackTRD& trkTrd, bool isTPCTRD)
7272
if (mPID) {
7373
qcStruct.dEdxTotTPC = isTPCTRD ? mTracksTPC[id].getdEdx().dEdxTotTPC : mTracksTPC[mTracksITSTPC[id].getRefTPC()].getdEdx().dEdxTotTPC;
7474
}
75-
75+
7676
// find corresponding track trigger record to get track timing
7777
int triggeredBC = 0;
7878
for (; mCurrentTriggerRecord < (isTPCTRD ? mTrackTriggerRecordsTPCTRD.size() : mTrackTriggerRecordsITSTPCTRD.size()); mCurrentTriggerRecord++) {
7979
auto& tRecord = (isTPCTRD ? mTrackTriggerRecordsTPCTRD[mCurrentTriggerRecord] : mTrackTriggerRecordsITSTPCTRD[mCurrentTriggerRecord]);
8080
if (mCurrentTrackId >= tRecord.getFirstTrack() && mCurrentTrackId < tRecord.getFirstTrack() + tRecord.getNumberOfTracks()) {
8181
uint32_t currentOrbit = tRecord.getBCData().orbit;
8282
triggeredBC = tRecord.getBCData().bc + (currentOrbit - mFirstOrbit) * o2::constants::lhc::LHCMaxBunches;
83-
break;
83+
break;
8484
}
85-
}
86-
85+
}
86+
8787
// Find most probable BCs and RMS for pile-up correction and error. Same BC is assumed for all tracklets
8888
float tCorrPileUp = 0.;
8989
float tErrPileUp2 = 0;
@@ -108,8 +108,7 @@ void Tracking::checkTrack(const TrackTRD& trkTrd, bool isTPCTRD)
108108
if (trkltId < 0) {
109109
q0[iLy] = -1;
110110
q1[iLy] = -1;
111-
}
112-
else {
111+
} else {
113112
q0[iLy] = mTrackletsRaw[trkltId].getQ0();
114113
q1[iLy] = mTrackletsRaw[trkltId].getQ1();
115114
}
@@ -121,11 +120,11 @@ void Tracking::checkTrack(const TrackTRD& trkTrd, bool isTPCTRD)
121120
sumProb += probBC;
122121
if (probBC > maxProb) {
123122
maxProb = probBC;
124-
tCorrPileUp = - deltaBC;
123+
tCorrPileUp = -deltaBC;
125124
}
126-
}
127-
if (sumProb > 1e-6) tErrPileUp2 = sumCorr2 / sumProb - 2 * tCorrPileUp * sumCorr / sumProb + tCorrPileUp * tCorrPileUp;
128-
125+
}
126+
if (sumProb > 1e-6)
127+
tErrPileUp2 = sumCorr2 / sumProb - 2 * tCorrPileUp * sumCorr / sumProb + tCorrPileUp * tCorrPileUp;
129128

130129
for (int iLayer = 0; iLayer < NLAYER; ++iLayer) {
131130
int trkltId = trkTrd.getTrackletIndex(iLayer);
@@ -155,12 +154,12 @@ void Tracking::checkTrack(const TrackTRD& trkTrd, bool isTPCTRD)
155154
if (!((trk.getSigmaZ2() < (padLength * padLength / 12.f)) && (std::fabs(mTrackletsCalib[trkltId].getZ() - trk.getZ()) < padLength))) {
156155
tiltCorrUp = 0.f;
157156
}
158-
159-
// conversion from slope in pad per time bin to slope in cm per BC = tracklets[trkltIdx].getSlopeFloat() * padWidth / BCperTimeBin
160-
float slopeFactor = mTrackletsRaw[trkltId].getSlopeFloat() * pad->getWidthIPad() / 4.f;
157+
158+
// conversion from slope in pad per time bin to slope in cm per BC = tracklets[trkltIdx].getSlopeFloat() * padWidth / BCperTimeBin
159+
float slopeFactor = mTrackletsRaw[trkltId].getSlopeFloat() * pad->getWidthIPad() / 4.f;
161160
float yCorrPileUp = tCorrPileUp * slopeFactor;
162161
float yAddErrPileUp2 = tErrPileUp2 * slopeFactor * slopeFactor;
163-
162+
164163
std::array<float, 2> trkltPosUp{mTrackletsCalib[trkltId].getY() - tiltCorrUp + yCorrPileUp, zPosCorrUp};
165164
std::array<float, 3> trkltCovUp;
166165
mRecoParam.recalcTrkltCov(tilt, trk.getSnp(), pad->getRowSize(tracklet.getPadRow()), trkltCovUp);

Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -414,22 +414,23 @@ void TRDGlobalTracking::run(ProcessingContext& pc)
414414
LOGF(debug, "Loaded TPC track %i with time %f. Window from %f to %f", nTracksLoadedTPC, trkAttribs.mTime, trkAttribs.mTime - trkAttribs.mTimeSubMax, trkAttribs.mTime + trkAttribs.mTimeAddMax);
415415
}
416416
LOGF(info, "%i tracks are loaded into the TRD tracker. Out of those %i ITS-TPC tracks and %i TPC tracks", nTracksLoadedITSTPC + nTracksLoadedTPC, nTracksLoadedITSTPC, nTracksLoadedTPC);
417-
417+
418418
// Load the FT0 triggered BCs if this is requested
419419

420420
if (mTrkMask[GTrackID::FT0]) { // pile-up tagging was requested
421421
auto ft0recPoints = inputTracks.getFT0RecPoints();
422422
uint32_t firstOrbit = 0;
423423
for (size_t ft0id = 0; ft0id < ft0recPoints.size(); ft0id++) {
424424
const auto& f0rec = ft0recPoints[ft0id];
425-
if (ft0id == 0) firstOrbit = f0rec.getInteractionRecord().orbit;
425+
if (ft0id == 0)
426+
firstOrbit = f0rec.getInteractionRecord().orbit;
426427
if (o2::ft0::InteractionTag::Instance().isSelected(f0rec)) {
427428
uint32_t currentOrbit = f0rec.getInteractionRecord().orbit;
428429
mTriggeredBCFT0.push_back(f0rec.getInteractionRecord().bc + (currentOrbit - firstOrbit) * o2::constants::lhc::LHCMaxBunches);
429430
}
430431
}
431432
}
432-
433+
433434
mTracker->SetFT0TriggeredBC(mTriggeredBCFT0.data(), mTriggeredBCFT0.size());
434435

435436
// start the tracking
@@ -813,7 +814,7 @@ bool TRDGlobalTracking::refitTRDTrack(TrackTRD& trk, float& chi2, bool inwards,
813814
}
814815
}
815816
}
816-
817+
817818
// Find most probable BCs and RMS for pile-up correction and error. Same BC is assumed for all tracklets
818819
float tCorrPileUp = 0.;
819820
float tErrPileUp2 = 0;
@@ -835,8 +836,7 @@ bool TRDGlobalTracking::refitTRDTrack(TrackTRD& trk, float& chi2, bool inwards,
835836
if (trkltId < 0) {
836837
q0[iLy] = -1;
837838
q1[iLy] = -1;
838-
}
839-
else {
839+
} else {
840840
q0[iLy] = mTrackletsRaw[trkltId].getQ0();
841841
q1[iLy] = mTrackletsRaw[trkltId].getQ1();
842842
}
@@ -848,11 +848,11 @@ bool TRDGlobalTracking::refitTRDTrack(TrackTRD& trk, float& chi2, bool inwards,
848848
sumProb += probBC;
849849
if (probBC > maxProb) {
850850
maxProb = probBC;
851-
tCorrPileUp = - deltaBC;
851+
tCorrPileUp = -deltaBC;
852852
}
853-
}
854-
if (sumProb > 1e-6) tErrPileUp2 = sumCorr2 / sumProb - 2 * tCorrPileUp * sumCorr / sumProb + tCorrPileUp * tCorrPileUp;
855-
853+
}
854+
if (sumProb > 1e-6)
855+
tErrPileUp2 = sumCorr2 / sumProb - 2 * tCorrPileUp * sumCorr / sumProb + tCorrPileUp * tCorrPileUp;
856856

857857
if (inwards) {
858858
// reset covariance to something big for inwards refit
@@ -883,9 +883,9 @@ bool TRDGlobalTracking::refitTRDTrack(TrackTRD& trk, float& chi2, bool inwards,
883883
if (!((trkParam->getSigmaZ2() < (padLength * padLength / 12.f)) && (std::fabs(mTrackletsCalib[trkltId].getZ() - trkParam->getZ()) < padLength))) {
884884
tiltCorrUp = 0.f;
885885
}
886-
887-
// conversion from slope in pad per time bin to slope in cm per BC = tracklets[trkltIdx].getSlopeFloat() * padWidth / BCperTimeBin
888-
float slopeFactor = mTrackletsRaw[trkltId].getSlopeFloat() * pad->getWidthIPad() / 4.f;
886+
887+
// conversion from slope in pad per time bin to slope in cm per BC = tracklets[trkltIdx].getSlopeFloat() * padWidth / BCperTimeBin
888+
float slopeFactor = mTrackletsRaw[trkltId].getSlopeFloat() * pad->getWidthIPad() / 4.f;
889889
float yCorrPileUp = tCorrPileUp * slopeFactor;
890890
float yAddErrPileUp2 = tErrPileUp2 * slopeFactor * slopeFactor;
891891

GPU/GPUTracking/DataTypes/GPUTRDRecoParam.cxx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ void GPUTRDRecoParam::recalcTrkltCov(const float tilt, const float snp, const fl
7878
cov[2] = c2 * (t2 * sy2 + sz2);
7979
}
8080

81-
8281
float GPUTRDRecoParam::getPileUpProbTracklet(int nBC, int Q0, int Q1) const
8382
{
8483
// get the probability that the tracklet with charges Q0 and Q1 belongs to a given BC, with a (signed) distance nBC from the TRD-triggered BC
@@ -106,14 +105,14 @@ float GPUTRDRecoParam::getPileUpProbTracklet(int nBC, int Q0, int Q1) const
106105
minBC = mPileUpRangeBefore00;
107106
maxProbBC = mPileUpMaxProb00;
108107
}
109-
108+
110109
// prob is 0 if the BC is too far, maximal for a given nBC, and with two linear functions in between. The maximum is chosen so that the integral is 1.
111-
if (nBC <= minBC || nBC >= maxBC)
110+
if (nBC <= minBC || nBC >= maxBC)
112111
return 0.;
113-
float maxProb = 2./(maxBC - minBC);
114-
if (nBC > minBC && nBC <= maxProbBC)
112+
float maxProb = 2. / (maxBC - minBC);
113+
if (nBC > minBC && nBC <= maxProbBC)
115114
return maxProb / (maxProbBC - minBC) * (nBC - minBC);
116-
else
115+
else
117116
return maxProb / (maxProbBC - maxBC) * (nBC - maxBC);
118117
}
119118

@@ -126,19 +125,20 @@ float GPUTRDRecoParam::getPileUpProbTrack(int nBC, std::array<int, 6> Q0, std::a
126125
// P(BC|L0,L1,...) proportional to P(BC)*P(L0,L1,...|BC), prop to P(BC)*P(L0|BC)*P(L1|BC)*... since for a given track and BC, charge in different layers are independent
127126
// prop to P(BC) * P(BC|L0)/P(BC) * P(BC|L1)/P(BC) * ...
128127
//
129-
// P(BC) is the probability with no charge information: we start from this probability, and each tracklet adds new information on pileup probability
130-
128+
// P(BC) is the probability with no charge information: we start from this probability, and each tracklet adds new information on pileup probability
131129

132130
// basic probability, if we had no info on the charges
133131
float probNoInfo = GPUTRDRecoParam::getPileUpProbTracklet(nBC, -1, -1);
134-
132+
135133
float probTrack = probNoInfo;
136-
if (probNoInfo < 1e-6f) return 0.;
137-
134+
if (probNoInfo < 1e-6f)
135+
return 0.;
136+
138137
// For each tracklet, we add the info on its charge
139138
for (int i = 0; i < 6; i++) {
140139
// negative charge values if the tracklet is not present
141-
if (Q0[i] < 0 || Q1[i] < 0) continue;
140+
if (Q0[i] < 0 || Q1[i] < 0)
141+
continue;
142142
float probTracklet = GPUTRDRecoParam::getPileUpProbTracklet(nBC, Q0[i], Q1[i]);
143143
probTrack *= probTracklet / probNoInfo;
144144
}

GPU/GPUTracking/DataTypes/GPUTRDRecoParam.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class GPUTRDRecoParam
6161

6262
/// Get tracklet z correction coefficient for track-eta based corraction
6363
GPUd() float getZCorrCoeffNRC() const { return mZCorrCoefNRC; }
64-
64+
6565
/// Get BC intervals for pile-up
6666
GPUd() int getPileUpRangeBefore() const { return mPileUpRangeBefore; }
6767
GPUd() int getPileUpRangeAfter() const { return mPileUpRangeAfter; }
@@ -80,28 +80,28 @@ class GPUTRDRecoParam
8080
float mCorrYDyC{0.f};
8181

8282
float mZCorrCoefNRC{1.4f}; ///< tracklet z-position depends linearly on track dip angle
83-
83+
8484
// pile-up prob parametrization, depending on charges
8585
// default parametrization, all tracklets
86-
int mPileUpRangeBefore{-130}; ///< maximal number of BC for which pile-up from previous collision has an influence
87-
int mPileUpMaxProb{0}; ///< number of BC with respect to triggered BC for the event with maximal probability
88-
int mPileUpRangeAfter{70}; ///< maximal number of BC for which pile-up from next collision has an influence
86+
int mPileUpRangeBefore{-130}; ///< maximal number of BC for which pile-up from previous collision has an influence
87+
int mPileUpMaxProb{0}; ///< number of BC with respect to triggered BC for the event with maximal probability
88+
int mPileUpRangeAfter{70}; ///< maximal number of BC for which pile-up from next collision has an influence
8989
// tracklets with Q0!=0 and Q1!=0
9090
int mPileUpRangeBefore11{-130}; ///< maximal number of BC for which pile-up from previous collision has an influence
91-
int mPileUpMaxProb11{0}; ///< number of BC with respect to triggered BC for the event with maximal probability
91+
int mPileUpMaxProb11{0}; ///< number of BC with respect to triggered BC for the event with maximal probability
9292
int mPileUpRangeAfter11{30}; ///< maximal number of BC for which pile-up from next collision has an influence
9393
// tracklets with Q0=0 and Q1!=0
94-
int mPileUpRangeBefore01{-80}; ///< maximal number of BC for which pile-up from previous collision has an influence
95-
int mPileUpMaxProb01{30}; ///< number of BC with respect to triggered BC for the event with maximal probability
96-
int mPileUpRangeAfter01{70}; ///< maximal number of BC for which pile-up from next collision has an influence
94+
int mPileUpRangeBefore01{-80}; ///< maximal number of BC for which pile-up from previous collision has an influence
95+
int mPileUpMaxProb01{30}; ///< number of BC with respect to triggered BC for the event with maximal probability
96+
int mPileUpRangeAfter01{70}; ///< maximal number of BC for which pile-up from next collision has an influence
9797
// tracklets with Q0!=0 and Q1=0
9898
int mPileUpRangeBefore10{-130}; ///< maximal number of BC for which pile-up from previous collision has an influence
99-
int mPileUpMaxProb10{-30}; ///< number of BC with respect to triggered BC for the event with maximal probability
99+
int mPileUpMaxProb10{-30}; ///< number of BC with respect to triggered BC for the event with maximal probability
100100
int mPileUpRangeAfter10{30}; ///< maximal number of BC for which pile-up from next collision has an influence
101101
// tracklets with Q0=0 and Q1=0
102-
int mPileUpRangeBefore00{-10}; ///< maximal number of BC for which pile-up from previous collision has an influence
103-
int mPileUpMaxProb00{22}; ///< number of BC with respect to triggered BC for the event with maximal probability
104-
int mPileUpRangeAfter00{40}; ///< maximal number of BC for which pile-up from next collision has an influence
102+
int mPileUpRangeBefore00{-10}; ///< maximal number of BC for which pile-up from previous collision has an influence
103+
int mPileUpMaxProb00{22}; ///< number of BC with respect to triggered BC for the event with maximal probability
104+
int mPileUpRangeAfter00{40}; ///< maximal number of BC for which pile-up from next collision has an influence
105105

106106
ClassDefNV(GPUTRDRecoParam, 4);
107107
};

GPU/GPUTracking/DataTypes/GPUTRDTrack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class GPUTRDTrack_t : public T
9191
GPUd() bool getIsFindable(int32_t iLayer) const { return (mFlags >> iLayer) & 0x1; }
9292
GPUd() int32_t getNmissingConsecLayers(int32_t iLayer) const;
9393
GPUd() int32_t getIsPenaltyAdded(int32_t iLayer) const { return getIsFindable(iLayer) && getTrackletIndex(iLayer) < 0; }
94-
94+
9595
// setters
9696
GPUd() void setRefGlobalTrackIdRaw(uint32_t id) { mRefGlobalTrackId = id; }
9797
// This method is only defined in TrackTRD.h and is intended to be used only with that TRD track type

0 commit comments

Comments
 (0)