@@ -33,7 +33,7 @@ struct DetLayer {
3333 DetLayer () = default ;
3434 // Parametric constructor
3535 DetLayer (const TString& name_, float r_, float z_, float x0_, float xrho_,
36- float resRPhi_ = 0 .0f , float resZ_ = 0 .0f , float eff_ = 0 .0f , int type_ = layerInert );
36+ float resRPhi_ = 0 .0f , float resZ_ = 0 .0f , float eff_ = 0 .0f , int type_ = kLayerInert );
3737 // Copy constructor
3838 DetLayer (const DetLayer& other);
3939
@@ -72,9 +72,12 @@ struct DetLayer {
7272 const TGraph* getDeadPhiRegions () const { return mDeadPhiRegions ; }
7373
7474 // Check layer type
75- bool isInert () const { return type == layerInert; }
76- bool isSilicon () const { return type == layerSilicon; }
77- bool isGas () const { return type == layerGas; }
75+ bool isInert () const { return type == kLayerInert ; }
76+ bool isSilicon () const { return type == kLayerSilicon ; }
77+ bool isGas () const { return type == kLayerGas ; }
78+ bool isTOF () const { return type == kLayerTOF ; }
79+ bool isVertex () const { return type == kLayerVertex ; }
80+ bool isActive () const { return type != kLayerInert ; } // active layers are not inert
7881
7982 // Utilities
8083 std::string toString () const ;
@@ -93,6 +96,12 @@ struct DetLayer {
9396 return mDeadPhiRegions ->Eval (phi) > 1 .f ;
9497 };
9598
99+ static constexpr int kLayerVertex = -1 ; // vertex layer type (not used in tracking)
100+ static constexpr int kLayerInert = 0 ; // inert/undefined layer
101+ static constexpr int kLayerSilicon = 1 ; // silicon layer
102+ static constexpr int kLayerGas = 2 ; // gas/tpc layer
103+ static constexpr int kLayerTOF = 3 ; // TOF layer type (not used in tracking)
104+
96105 private:
97106 // TString for holding name
98107 TString name;
@@ -117,9 +126,6 @@ struct DetLayer {
117126
118127 // layer type
119128 int type; // 0: undefined/inert, 1: silicon, 2: gas/tpc
120- static constexpr int layerInert = 0 ; // inert/undefined layer
121- static constexpr int layerSilicon = 1 ; // silicon layer
122- static constexpr int layerGas = 2 ; // gas/tpc layer
123129};
124130
125131} // namespace o2::fastsim
0 commit comments