1515#ifndef ALICEO2_ITSMFT_DIGIPARAMS_H
1616#define ALICEO2_ITSMFT_DIGIPARAMS_H
1717
18+ #include < vector>
19+ #include < algorithm>
1820#include < Rtypes.h>
19- #include < ITSMFTSimulation/AlpideSignalTrapezoid.h>
21+ #include " ITSMFTSimulation/AlpideSignalTrapezoid.h"
2022#include " ITSMFTBase/DPLAlpideParam.h"
2123
2224// //////////////////////////////////////////////////////////
@@ -51,8 +53,8 @@ class DigiParams
5153 void setContinuous (bool v) { mIsContinuous = v; }
5254 bool isContinuous () const { return mIsContinuous ; }
5355
54- int getROFrameLengthInBC () const { return mROFrameLengthInBC ; }
55- void setROFrameLengthInBC (int n) { mROFrameLengthInBC = n; }
56+ int getROFrameLengthInBC (int layer = - 1 ) const { return layer < 0 ? mROFrameLengthInBC : mROFrameLayerLengthInBC [layer] ; }
57+ void setROFrameLengthInBC (int n, int layer = - 1 ) { layer < 0 ? mROFrameLengthInBC = n : mROFrameLayerLengthInBC [layer] = n; }
5658
5759 void setROFrameLength (float ns);
5860 float getROFrameLength () const { return mROFrameLength ; }
@@ -62,13 +64,13 @@ class DigiParams
6264 float getStrobeDelay () const { return mStrobeDelay ; }
6365
6466 void setStrobeLength (float ns) { mStrobeLength = ns; }
65- float getStrobeLength () const { return mStrobeLength ; }
67+ float getStrobeLength (int layer = - 1 ) const { return layer < 0 ? mStrobeLength : mStrobeLayerLength [layer] ; }
6668
6769 void setTimeOffset (double sec) { mTimeOffset = sec; }
6870 double getTimeOffset () const { return mTimeOffset ; }
6971
70- void setROFrameBiasInBC (int n) { mROFrameBiasInBC = n; }
71- int getROFrameBiasInBC () const { return mROFrameBiasInBC ; }
72+ void setROFrameBiasInBC (int n, int layer = - 1 ) { layer < 0 ? mROFrameBiasInBC = n : mROFrameLayerBiasInBC [layer] = n; }
73+ int getROFrameBiasInBC (int layer = - 1 ) const { return layer < 0 ? mROFrameBiasInBC : mROFrameLayerBiasInBC [layer] ; }
7274
7375 void setChargeThreshold (int v, float frac2Account = 0.1 );
7476 void setNSimSteps (int v);
@@ -96,13 +98,19 @@ class DigiParams
9698 const SignalShape& getSignalShape () const { return mSignalShape ; }
9799 SignalShape& getSignalShape () { return (SignalShape&)mSignalShape ; }
98100
101+ bool withStaggering () const noexcept { return !mROFrameLayerLength .empty (); }
102+ void addROFrameLayerLengthInBC (int len) { mROFrameLayerLengthInBC .push_back (len); }
103+ void addROFrameLayerBiasInBC (int len) { mROFrameLayerBiasInBC .push_back (len); }
104+ void addROFrameLayerLength (float f) { mROFrameLayerLength .push_back (f); }
105+ void addStrobeLength (float ns) { mStrobeLayerLength .push_back (ns); }
106+
99107 virtual void print () const ;
100108
101109 private:
102110 static constexpr double infTime = 1e99 ;
103111 bool mIsContinuous = false ; // /< flag for continuous simulation
104112 float mNoisePerPixel = 1 .e-8 ; // /< ALPIDE Noise per chip
105- int mROFrameLengthInBC = 0 ; // /< ROF length in BC for continuos mode
113+ int mROFrameLengthInBC = 0 ; // /< ROF length in BC for continuous mode
106114 float mROFrameLength = 0 ; // /< length of RO frame in ns
107115 float mStrobeDelay = 0 .; // /< strobe start (in ns) wrt ROF start
108116 float mStrobeLength = 0 ; // /< length of the strobe in ns (sig. over threshold checked in this window only)
@@ -115,7 +123,12 @@ class DigiParams
115123
116124 float mVbb = 0.0 ; // /< back bias absolute value for MFT (in Volt)
117125 float mIBVbb = 0.0 ; // /< back bias absolute value for ITS Inner Barrel (in Volt)
118- float mOBVbb = 0.0 ; // /< back bias absolute value for ITS Outter Barrel (in Volt)
126+ float mOBVbb = 0.0 ; // /< back bias absolute value for ITS Outer Barrel (in Volt)
127+
128+ std::vector<int > mROFrameLayerLengthInBC ; // /< staggering ROF length in BC for continuous mode per layer
129+ std::vector<int > mROFrameLayerBiasInBC ; // /< staggering ROF bias in BC for continuous mode per layer
130+ std::vector<float > mROFrameLayerLength ; // /< staggering ROF length in ns for continuous mode per layer
131+ std::vector<float > mStrobeLayerLength ; // /< staggering length of the strobe in ns (sig. over threshold checked in this window only)
119132
120133 o2::itsmft::AlpideSignalTrapezoid mSignalShape ; // /< signal timeshape parameterization
121134
@@ -125,7 +138,7 @@ class DigiParams
125138 float mROFrameLengthInv = 0 ; // /< inverse length of RO frame in ns
126139 float mNSimStepsInv = 0 ; // /< its inverse
127140
128- ClassDef (DigiParams, 2 );
141+ ClassDef (DigiParams, 3 );
129142};
130143} // namespace itsmft
131144} // namespace o2
0 commit comments