Skip to content

Commit 8eb87da

Browse files
committed
clang format
1 parent 8db4e50 commit 8eb87da

4 files changed

Lines changed: 27 additions & 17 deletions

File tree

‎Detectors/TRD/simulation/include/TRDSimulation/Digitizer.h‎

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,33 @@ class Digitizer
6565
void setSrcID(int sourceID) { mSrcID = sourceID; }
6666
void setCalibrations(Calibrations* calibrations) { mCalib = calibrations; }
6767
void setCalVdriftExB(const CalVdriftExB* calVdriftExB) { mCalVdriftExB = calVdriftExB; }
68-
void setFedChamberStatus(int det, int value) { if (det >= constants::MAXCHAMBER) return; mFedChamberStatus[det] = value; }
68+
void setFedChamberStatus(int det, int value)
69+
{
70+
if (det >= constants::MAXCHAMBER)
71+
return;
72+
mFedChamberStatus[det] = value;
73+
}
6974
void setCalGain(const CalGain* calGain) { mCalGain = calGain; }
7075
void setCreateSharedDigits(bool flag) { mCreateSharedDigits = flag; }
7176
int getEventTime() const { return mTime; }
7277
int getEventID() const { return mEventID; }
7378
int getSrcID() const { return mSrcID; }
7479
bool getCreateSharedDigits() const { return mCreateSharedDigits; }
75-
int getFedChamberStatus(int det) { if (det >= constants::MAXCHAMBER) return -1.; return mFedChamberStatus[det]; }
80+
int getFedChamberStatus(int det)
81+
{
82+
if (det >= constants::MAXCHAMBER)
83+
return -1.;
84+
return mFedChamberStatus[det];
85+
}
7686
std::string dumpFlaggedChambers() const;
7787

7888
private:
79-
Geometry* mGeo = nullptr; // access to Geometry
80-
PadResponse mPRF{}; // access to PadResponse
81-
SimParam mSimParam{}; // simulation parameters
82-
Calibrations* mCalib = nullptr; // access to Calibrations in CCDB
83-
const CalVdriftExB* mCalVdriftExB = nullptr; // access to time-dependent calibrations CalVdriftExB in CCDB
84-
const CalGain* mCalGain = nullptr; // access to time-dependent calibrations CalGain in CCDB
89+
Geometry* mGeo = nullptr; // access to Geometry
90+
PadResponse mPRF{}; // access to PadResponse
91+
SimParam mSimParam{}; // simulation parameters
92+
Calibrations* mCalib = nullptr; // access to Calibrations in CCDB
93+
const CalVdriftExB* mCalVdriftExB = nullptr; // access to time-dependent calibrations CalVdriftExB in CCDB
94+
const CalGain* mCalGain = nullptr; // access to time-dependent calibrations CalGain in CCDB
8595
std::array<int, constants::MAXCHAMBER> mFedChamberStatus{}; // access to time-dependent FED chamber status in CCDB
8696
PileupTool pileupTool;
8797

‎Detectors/TRD/simulation/include/TRDSimulation/SimParam.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ class SimParam
136136
float mTRFhi{3.58f}; ///< Higher boundary of the TRF and x-talk
137137
float mInvTRFwid{static_cast<float>(mTRFbin) / (mTRFhi - mTRFlo)}; ///< Inverse of the bin width of the integrated TRF and x-talk
138138
float mGasGain{4000.f}; ///< Gas gain
139-
139+
140140
float mEffVdriftDefault{1.22f}; ///< The CCDB contains an effective drift velocity, and not the true drift velocity, so we anchor only the variations. This default parameter is the one reproducing data the best for run 568191.
141-
141+
142142
ClassDefNV(SimParam, 2); // The TRD simulation parameters
143143
};
144144

‎Detectors/TRD/simulation/src/Digitizer.cxx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void Digitizer::process(std::vector<Hit> const& hits)
161161
// Jump to the next detector if the detector is
162162
// switched off, not installed, etc
163163
// In the chamber Fed status, 3 corresponds to good chamber
164-
//if (mCalib->getChamberStatus()->isNoData(det)) {
164+
// if (mCalib->getChamberStatus()->isNoData(det)) {
165165
if (getFedChamberStatus(det) != 3) {
166166
continue;
167167
}
@@ -259,7 +259,7 @@ bool Digitizer::convertHits(const int det, const std::vector<Hit>& hits, SignalC
259259
if (TMath::Abs(mCalVdriftExB->getVdrift(det, true) - constants::VDRIFTDEFAULT) > 1e-6) {
260260
driftVelocity = mCalVdriftExB->getVdrift(det, true) * constants::VDRIFTDEFAULT / mSimParam.getEffVdriftDefault(); // If they are available in the CCDB, we anchor the vdrift variations
261261
}
262-
float t0 = mCalib->getT0(det, colE, rowE); // The T0 velocity
262+
float t0 = mCalib->getT0(det, colE, rowE); // The T0 velocity
263263

264264
// Loop over all created electrons
265265
const int nElectrons = std::fabs(qTotal);
@@ -298,7 +298,7 @@ bool Digitizer::convertHits(const int det, const std::vector<Hit>& hits, SignalC
298298
continue;
299299
}
300300
const double colOffset = padPlane->getPadColOffset(colE, locCd + offsetTilt);
301-
//driftVelocity = mCalib->getVDrift(det, colE, rowE); // The drift velocity for the updated col and row
301+
// driftVelocity = mCalib->getVDrift(det, colE, rowE); // The drift velocity for the updated col and row
302302
t0 = mCalib->getT0(det, colE, rowE); // The T0 velocity for the updated col and row
303303
// Convert the position to drift time [mus], using either constant drift velocity or
304304
// time structure of drift cells (non-isochronity, GARFIELD calculation).

‎Detectors/TRD/workflow/src/TRDDigitizerSpec.cxx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class TRDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
210210
pc.services().get<ControlService>().readyToQuit(QuitRequest::Me);
211211
finished = true;
212212
}
213-
213+
214214
void finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
215215
{
216216
if (matcher == ConcreteDataMatcher("TRD", "CALVDRIFTEXB", 0)) {
@@ -225,7 +225,7 @@ class TRDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
225225
}
226226
if (matcher == ConcreteDataMatcher("TRD", "FEDCHAMBERSTATUS", 0)) {
227227
LOG(info) << "Fed chamber status has been updated";
228-
std::array<int, constants::MAXCHAMBER>* fedStatus = (std::array<int, constants::MAXCHAMBER>*) obj;
228+
std::array<int, constants::MAXCHAMBER>* fedStatus = (std::array<int, constants::MAXCHAMBER>*)obj;
229229
for (int det = 0; det < constants::MAXCHAMBER; det++) {
230230
mDigitizer.setFedChamberStatus(det, (*fedStatus)[det]);
231231
}
@@ -255,7 +255,7 @@ o2::framework::DataProcessorSpec getTRDDigitizerSpec(int channel, bool mctruth)
255255
outputs.emplace_back("TRD", "LABELS", 0, Lifetime::Timeframe);
256256
}
257257
outputs.emplace_back("TRD", "ROMode", 0, Lifetime::Timeframe);
258-
258+
259259
std::vector<InputSpec> inputs;
260260
inputs.emplace_back("collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
261261
inputs.emplace_back("calvdexb", "TRD", "CALVDRIFTEXB", 0, Lifetime::Condition, ccdbParamSpec("TRD/Calib/CalVdriftExB"));
@@ -264,7 +264,7 @@ o2::framework::DataProcessorSpec getTRDDigitizerSpec(int channel, bool mctruth)
264264

265265
return DataProcessorSpec{
266266
"TRDDigitizer",
267-
//Inputs{InputSpec{"collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe}},
267+
// Inputs{InputSpec{"collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe}},
268268
inputs,
269269
outputs,
270270

0 commit comments

Comments
 (0)