@@ -27,6 +27,8 @@ namespace track
2727class TrackLTIntegral
2828{
2929 public:
30+ static constexpr float NeglectTime = -1 .; // if 1st mT slot contains this, don't fill time
31+
3032 GPUdDefault () TrackLTIntegral() = default ;
3133 GPUdDefault () TrackLTIntegral(const TrackLTIntegral& stc) = default ;
3234 GPUdDefault () ~TrackLTIntegral () = default ;
@@ -35,32 +37,40 @@ class TrackLTIntegral
3537
3638 GPUd () float getL () const { return mL ; }
3739 GPUd () float getX2X0 () const { return mX2X0 ; }
40+ GPUd () float getXRho () const { return mXRho ; }
3841 GPUd () float getTOF (int id) const { return mT [id]; }
3942
4043 GPUd () void clear ()
4144 {
4245 mL = 0 .f ;
4346 mX2X0 = 0 .f ;
47+ mXRho = 0 .f ;
4448 for (int i = getNTOFs (); i--;) {
4549 mT [i] = 0 .f ;
4650 }
4751 }
4852
4953 GPUd () void addStep (float dL, float p2Inv);
5054 GPUd () void addX2X0 (float d) { mX2X0 += d; }
55+ GPUd () void addXRho (float d) { mXRho += d; }
5156
5257 GPUd () void setL (float l) { mL = l; }
5358 GPUd () void setX2X0 (float x) { mX2X0 = x; }
59+ GPUd () void setXRho (float x) { mXRho = x; }
5460 GPUd () void setTOF (float t, int id) { mT [id] = t; }
5561
62+ GPUd () void setTimeNotNeeded () { mT [0 ] = NeglectTime; }
63+ GPUd () bool isTimeNotNeeded () const { return mT [0 ] == NeglectTime; }
64+
5665 GPUd () void print () const ;
5766
5867 private:
5968 float mL = 0 .; // length in cm
6069 float mX2X0 = 0 .; // integrated X/X0
70+ float mXRho = 0 .; // average X*rho
6171 float mT [o2::track::PID::NIDs] = {0 .}; // TOF in ps
6272
63- ClassDefNV (TrackLTIntegral, 1 );
73+ ClassDefNV (TrackLTIntegral, 2 );
6474};
6575}; // namespace track
6676}; // namespace o2
0 commit comments