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