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,24 +53,24 @@ 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
57- void setROFrameLength (float ns);
58- float getROFrameLength () const { return mROFrameLength ; }
59- float getROFrameLengthInv () const { return mROFrameLengthInv ; }
59+ void setROFrameLength (float ns, int layer = - 1 );
60+ float getROFrameLength (int layer = - 1 ) const { return layer < 0 ? mROFrameLength : mROFrameLayerLength [layer] ; }
61+ float getROFrameLengthInv (int layer = - 1 ) const { return layer < 0 ? mROFrameLengthInv : mROFrameLayerLengthInv [layer] ; }
6062
6163 void setStrobeDelay (float ns) { mStrobeDelay = ns; }
62- float getStrobeDelay () const { return mStrobeDelay ; }
64+ float getStrobeDelay (int layer = - 1 ) const { return layer < 0 ? mStrobeDelay : mStrobeLayerDelay [layer] ; }
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 addStrobeLength (float ns) { mStrobeLayerLength .push_back (ns); }
105+ void addStrobeDelay (float ns) { mStrobeLayerDelay .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,17 +123,24 @@ 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)
132+ std::vector<float > mStrobeLayerDelay ; // /< staggering delay of the strobe in ns
119133
120134 o2::itsmft::AlpideSignalTrapezoid mSignalShape ; // /< signal timeshape parameterization
121135
122136 const o2::itsmft::AlpideSimResponse* mAlpSimResponse = nullptr ; // !< pointer on external response
123137
124138 // auxiliary precalculated parameters
125- float mROFrameLengthInv = 0 ; // /< inverse length of RO frame in ns
126- float mNSimStepsInv = 0 ; // /< its inverse
139+ float mROFrameLengthInv = 0 ; // /< inverse length of RO frame in ns
140+ std::vector<float > mROFrameLayerLengthInv ; // inverse length of RO frame in ns per layer
141+ float mNSimStepsInv = 0 ; // /< its inverse
127142
128- ClassDef (DigiParams, 2 );
143+ ClassDef (DigiParams, 3 );
129144};
130145} // namespace itsmft
131146} // namespace o2
0 commit comments