Skip to content

Commit c81a712

Browse files
committed
Use Almira params in the digitisation
1 parent cf5c3cb commit c81a712

File tree

6 files changed

+27
-35
lines changed

6 files changed

+27
-35
lines changed

Detectors/Upgrades/ALICE3/TRK/simulation/include/TRKSimulation/DPLDigitizerParam.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ struct DPLDigitizerParam : public o2::conf::ConfigurableParamHelper<DPLDigitizer
3232

3333
bool continuous = true; ///< flag for continuous simulation
3434
float noisePerPixel = DEFNoisePerPixel(); ///< ALPIDE Noise per channel
35-
float strobeFlatTop = 7500.; ///< strobe shape flat top
36-
float strobeMaxRiseTime = 1100.; ///< strobe max rise time
37-
float strobeQRiseTime0 = 450.; ///< q @ which strobe rise time is 0
35+
float strobeFlatTop = 20.; ///< strobe shape flat top
36+
float strobeMaxRiseTime = 0.; ///< strobe max rise time
37+
float strobeQRiseTime0 = 0.; ///< q @ which strobe rise time is 0
3838

3939
double timeOffset = 0.; ///< time offset (in seconds!) to calculate ROFrame from hit time
4040
int chargeThreshold = 75; ///< charge threshold in Nelectrons

Detectors/Upgrades/ALICE3/TRK/simulation/include/TRKSimulation/DigiParams.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ class DigiParams
9292

9393
bool isTimeOffsetSet() const { return mTimeOffset > -infTime; }
9494

95-
const o2::trk::ChipSimResponse* getAlpSimResponse() const { return mAlpSimResponse.get(); }
96-
void setAlpSimResponse(const o2::itsmft::AlpideSimResponse*);
95+
const o2::trk::ChipSimResponse* getResponse() const { return mResponse.get(); }
96+
void setResponse(const o2::itsmft::AlpideSimResponse*);
9797

9898
const SignalShape& getSignalShape() const { return mSignalShape; }
9999
SignalShape& getSignalShape() { return (SignalShape&)mSignalShape; }
@@ -123,7 +123,7 @@ class DigiParams
123123

124124
o2::itsmft::AlpideSignalTrapezoid mSignalShape; ///< signal timeshape parameterization
125125

126-
std::unique_ptr<o2::trk::ChipSimResponse> mAlpSimResponse; //!< pointer on external response
126+
std::unique_ptr<o2::trk::ChipSimResponse> mResponse; //!< pointer on external response
127127

128128
// auxiliary precalculated parameters
129129
float mROFrameLengthInv = 0; ///< inverse length of RO frame in ns

Detectors/Upgrades/ALICE3/TRK/simulation/src/DigiParams.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ void DigiParams::print() const
7272
mSignalShape.print();
7373
}
7474

75-
void DigiParams::setAlpSimResponse(const o2::itsmft::AlpideSimResponse* resp)
75+
void DigiParams::setResponse(const o2::itsmft::AlpideSimResponse* resp)
7676
{
7777
LOG(debug) << "Response function data path: " << resp->getDataPath();
7878
LOG(debug) << "Response function info: ";
7979
// resp->print();
8080
if (!resp) {
8181
LOGP(fatal, "cannot set response function from null");
8282
}
83-
mAlpSimResponse = std::make_unique<o2::trk::ChipSimResponse>(resp);
83+
mResponse = std::make_unique<o2::trk::ChipSimResponse>(resp);
8484
}

Detectors/Upgrades/ALICE3/TRK/simulation/src/Digitizer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void Digitizer::init()
5050
}
5151

5252
// setting the correct response function (for the moment, for both VD and MLOT the same response function is used)
53-
mChipSimResp = mParams.getAlpSimResponse();
53+
mChipSimResp = mParams.getResponse();
5454
mChipSimRespVD = mChipSimResp; /// for the moment considering the same response
5555
mChipSimRespMLOT = mChipSimResp; /// for the moment considering the same response
5656

Detectors/Upgrades/ALICE3/TRK/workflow/src/TrackerSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ DataProcessorSpec getTrackerSpec(bool useMC, const std::string& hitRecoConfig, o
427427
}
428428

429429
// inputs.emplace_back("itscldict", "TRK", "CLUSDICT", 0, Lifetime::Condition, ccdbParamSpec("ITS/Calib/ClusterDictionary"));
430-
// inputs.emplace_back("itsalppar", "TRK", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam"));
430+
// inputs.emplace_back("TRK_almiraparam", "TRK", "ALMIRAPARAM", 0, Lifetime::Condition, ccdbParamSpec("TRK/Config/AlmiraParam"));
431431

432432
// outputs.emplace_back("TRK", "TRACKCLSID", 0, Lifetime::Timeframe);
433433
// outputs.emplace_back("TRK", "TRKTrackROF", 0, Lifetime::Timeframe);

Steer/DigitizerWorkflow/src/TRKDigitizerSpec.cxx

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "DataFormatsITSMFT/ROFRecord.h"
2828
#include "TRKSimulation/Digitizer.h"
2929
#include "TRKSimulation/DPLDigitizerParam.h"
30-
#include "ITSMFTBase/DPLAlpideParam.h"
30+
#include "TRKBase/AlmiraParam.h"
3131
#include "TRKBase/GeometryTGeo.h"
3232
#include "TRKBase/TRKBaseParam.h"
3333

@@ -208,7 +208,7 @@ class TRKDPLDigitizerTask : BaseDPLDigitizer
208208
if (!file) {
209209
LOG(fatal) << "Cannot open response file " << mLocalRespFile;
210210
}
211-
mDigitizer.getParams().setAlpSimResponse((const o2::itsmft::AlpideSimResponse*)file->Get("response1"));
211+
mDigitizer.getParams().setResponse((const o2::itsmft::AlpideSimResponse*)file->Get("response1"));
212212
}
213213

214214
void updateTimeDependentParams(ProcessingContext& pc)
@@ -225,32 +225,24 @@ class TRKDPLDigitizerTask : BaseDPLDigitizer
225225
mDigitizer.setGeometry(geom);
226226

227227
const auto& dopt = o2::trk::DPLDigitizerParam<o2::detectors::DetID::TRK>::Instance();
228-
pc.inputs().get<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>*>("ITS_alppar");
229-
const auto& aopt = o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>::Instance();
230-
digipar.setContinuous(dopt.continuous);
228+
// pc.inputs().get<o2::trk::AlmiraParam*>("TRK_almiraparam");
229+
const auto& aopt = o2::trk::AlmiraParam::Instance();
230+
auto frameNS = aopt.roFrameLengthInBC * o2::constants::lhc::LHCBunchSpacingNS;
231+
digipar.setContinuous(true);
231232
digipar.setROFrameBiasInBC(aopt.roFrameBiasInBC);
232-
if (dopt.continuous) {
233-
auto frameNS = aopt.roFrameLengthInBC * o2::constants::lhc::LHCBunchSpacingNS;
234-
digipar.setROFrameLengthInBC(aopt.roFrameLengthInBC);
235-
digipar.setROFrameLength(frameNS); // RO frame in ns
236-
digipar.setStrobeDelay(aopt.strobeDelay); // Strobe delay wrt beginning of the RO frame, in ns
237-
digipar.setStrobeLength(aopt.strobeLengthCont > 0 ? aopt.strobeLengthCont : frameNS - aopt.strobeDelay); // Strobe length in ns
238-
} else {
239-
digipar.setROFrameLength(aopt.roFrameLengthTrig); // RO frame in ns
240-
digipar.setStrobeDelay(aopt.strobeDelay); // Strobe delay wrt beginning of the RO frame, in ns
241-
digipar.setStrobeLength(aopt.strobeLengthTrig); // Strobe length in ns
242-
}
233+
digipar.setROFrameLengthInBC(aopt.roFrameLengthInBC);
234+
digipar.setROFrameLength(frameNS); // RO frame in ns
235+
digipar.setStrobeDelay(aopt.strobeDelay);
236+
digipar.setStrobeLength(aopt.strobeLengthCont > 0 ? aopt.strobeLengthCont : frameNS - aopt.strobeDelay);
243237
// parameters of signal time response: flat-top duration, max rise time and q @ which rise time is 0
244238
digipar.getSignalShape().setParameters(dopt.strobeFlatTop, dopt.strobeMaxRiseTime, dopt.strobeQRiseTime0);
245239
digipar.setChargeThreshold(dopt.chargeThreshold); // charge threshold in electrons
246240
digipar.setNoisePerPixel(dopt.noisePerPixel); // noise level
247241
digipar.setTimeOffset(dopt.timeOffset);
248242
digipar.setNSimSteps(dopt.nSimSteps);
249243

250-
mROMode = digipar.isContinuous() ? o2::parameters::GRPObject::CONTINUOUS : o2::parameters::GRPObject::PRESENT;
251-
LOG(info) << mID.getName() << " simulated in "
252-
<< ((mROMode == o2::parameters::GRPObject::CONTINUOUS) ? "CONTINUOUS" : "TRIGGERED")
253-
<< " RO mode";
244+
mROMode = o2::parameters::GRPObject::CONTINUOUS;
245+
LOG(info) << mID.getName() << " simulated in CONTINUOUS RO mode";
254246

255247
// if (oTRKParams::Instance().useDeadChannelMap) {
256248
// pc.inputs().get<o2::itsmft::NoiseMap*>("TRK_dead"); // trigger final ccdb update
@@ -265,9 +257,9 @@ class TRKDPLDigitizerTask : BaseDPLDigitizer
265257

266258
void finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
267259
{
268-
if (matcher == ConcreteDataMatcher(detectors::DetID::ITS, "ALPIDEPARAM", 0)) {
269-
LOG(info) << mID.getName() << " Alpide param updated";
270-
const auto& par = o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>::Instance();
260+
if (matcher == ConcreteDataMatcher(mOrigin, "ALMIRAPARAM", 0)) {
261+
LOG(info) << mID.getName() << " Almira param updated";
262+
const auto& par = o2::trk::AlmiraParam::Instance();
271263
par.printKeyValues();
272264
return;
273265
}
@@ -280,7 +272,7 @@ class TRKDPLDigitizerTask : BaseDPLDigitizer
280272
LOG(info) << mID.getName() << " loaded APTSResponseData";
281273
if (mLocalRespFile.empty()) {
282274
LOG(info) << "Using CCDB/APTS response file";
283-
mDigitizer.getParams().setAlpSimResponse((const o2::itsmft::AlpideSimResponse*)obj);
275+
mDigitizer.getParams().setResponse((const o2::itsmft::AlpideSimResponse*)obj);
284276
mDigitizer.setResponseName("APTS");
285277
} else {
286278
LOG(info) << "Response function will be loaded from local file: " << mLocalRespFile;
@@ -318,7 +310,7 @@ DataProcessorSpec getTRKDigitizerSpec(int channel, bool mctruth)
318310
auto detOrig = o2::header::gDataOriginTRK;
319311
std::vector<InputSpec> inputs;
320312
inputs.emplace_back("collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
321-
inputs.emplace_back("ITS_alppar", "ITS", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam"));
313+
// inputs.emplace_back("TRK_almiraparam", "TRK", "ALMIRAPARAM", 0, Lifetime::Condition, ccdbParamSpec("TRK/Config/AlmiraParam"));
322314
// if (oTRKParams::Instance().useDeadChannelMap) {
323315
// inputs.emplace_back("TRK_dead", "TRK", "DEADMAP", 0, Lifetime::Condition, ccdbParamSpec("TRK/Calib/DeadMap"));
324316
// }

0 commit comments

Comments
 (0)