]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFGeometry.h
RC12, RC17 violation: suppression
[u/mrichter/AliRoot.git] / TOF / AliTOFGeometry.h
index 4929a504aa70d3f5543711881b5727f6562cb645..fb40dec3e3bb3008b526ce058543d704b0542b95 100644 (file)
@@ -26,27 +26,30 @@ class AliTOFGeometry: public TObject{
   static  Int_t NStripA()     { return kNStripA;};
   static  Int_t NStripB()     { return kNStripB;};
   static  Int_t NStripC()     { return kNStripC;};
+  static  Int_t NStrip(Int_t nPlate);
   static  Int_t NMaxNstrip()  { return kMaxNstrip;};
   static  Int_t NpadX()       { return kNpadX;};
   static  Int_t NpadZ()       { return kNpadZ;};
   static  Int_t NpadXStrip()  { return kNpadX*kNpadZ;};
   static  Int_t NSectors()    { return kNSectors;};
   static  Int_t NPlates()     { return kNPlates;};
-  static Int_t NStripXSector() { return (kNStripA + 2*kNStripB +
+  static  Int_t NStripXSector() { return (kNStripA + 2*kNStripB +
                                                2*kNStripC);};
-  static Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
+  static  Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
                                        2*kNStripC)*kNpadX*kNpadZ;};
 
-  static Float_t RinTOF()  { return fgkxTOF;};
-  static Float_t Rmin()      { return fgkRmin;};
-  static Float_t Rmax()      { return fgkRmax;};
+  static  Float_t RinTOF()  { return fgkxTOF;};
+  static  Float_t Rmin()      { return fgkRmin;};
+  static  Float_t Rmax()      { return fgkRmax;};
 
   static  Float_t XPad()     { return fgkXPad;};
   static  Float_t ZPad()     { return fgkZPad;};
 
   static  Float_t StripLength() { return fgkStripLength;};
 
-  static  Int_t TimeDiff()    { return fgkTimeDiff;};
+  static  Float_t DeadTime()       { return fgkDeadTime;};
+  static  Float_t MatchingWindow() { return fgkMatchingWindow;};
+
   static  Int_t MaxTOFTree()  { return kMaxTOFTree;};
 
   static  Int_t NDDL()        { return kNDDL;};
@@ -72,29 +75,29 @@ class AliTOFGeometry: public TObject{
   virtual void    ImportGeometry();
   virtual void    SetHoles(Bool_t holes) {fHoles = holes;};
   virtual Bool_t  GetHoles() const {return fHoles;};
-  virtual Float_t DistanceToPadPar(Int_t *det, Float_t *pos, Float_t *dist3d=0) const;
-  virtual Bool_t  IsInsideThePadPar(Int_t *det, Float_t *pos) const;
-  virtual Bool_t  IsInsideThePad(TGeoHMatrix mat, Float_t *pos, Float_t *dist3d=0) const;
-  virtual void    GetVolumePath(Int_t *ind, Char_t *path );
+  virtual Float_t DistanceToPadPar(Int_t *det, const Float_t * const pos, Float_t *dist3d=0) const;
+  virtual Bool_t  IsInsideThePadPar(Int_t *det, const Float_t * const pos) const;
+  virtual Bool_t  IsInsideThePad(TGeoHMatrix mat, const Float_t * const pos, Float_t *dist3d=0) const;
+  virtual void    GetVolumePath(const Int_t * const ind, Char_t *path );
   virtual void    GetVolumePath(Int_t sector, Char_t *path );
   virtual void    GetVolumePath(Int_t sector, Int_t plate, Int_t strip, Char_t *path );
   virtual void    GetPos(Int_t *det,Float_t *pos);
   virtual void    GetPosPar(Int_t *det,Float_t *pos) const;
   virtual void    GetDetID(Float_t *pos,Int_t *det) const;
-  virtual Int_t   GetPlate(Float_t *pos) const;
-  virtual Int_t   GetStrip(Float_t *pos) const;
-  virtual Int_t   GetSector(Float_t *pos) const;
-  virtual Int_t   GetPadX(Float_t *pos) const;
-  virtual Int_t   GetPadZ(Float_t *pos) const;
-  virtual Float_t GetX(Int_t *det) const ;
-  virtual Float_t GetY(Int_t *det) const ;
-  virtual Float_t GetZ(Int_t *det) const ;
+  virtual Int_t   GetPlate(const Float_t * const pos) const;
+  virtual Int_t   GetStrip(const Float_t * const pos) const;
+  virtual Int_t   GetSector(const Float_t * const pos) const;
+  virtual Int_t   GetPadX(const Float_t * const pos) const;
+  virtual Int_t   GetPadZ(const Float_t * const pos) const;
+  virtual Float_t GetX(const Int_t * const det) const ;
+  virtual Float_t GetY(const Int_t * const det) const ;
+  virtual Float_t GetZ(const Int_t * const det) const ;
   virtual void    DetToStripRF(Int_t nPadX, Int_t nPadZ,
                               Float_t &x,  Float_t &z) const;
   virtual void    DetToSectorRF(Int_t vol[5], Double_t ** coord);
-  virtual Float_t GetPadDx(Float_t *pos);
-  virtual Float_t GetPadDy(Float_t *pos);
-  virtual Float_t GetPadDz(Float_t *pos);
+  virtual Float_t GetPadDx(const Float_t * const pos);
+  virtual Float_t GetPadDy(const Float_t * const pos);
+  virtual Float_t GetPadDz(const Float_t * const pos);
   virtual void Translation(Float_t *xyz, Float_t translationVector[3]) const;
   virtual void Rotation(Float_t *xyz, Double_t rotationAngles[6]) const;
   virtual void InverseRotation(Float_t *xyz, Double_t rotationAngles[6]) const;
@@ -103,7 +106,14 @@ class AliTOFGeometry: public TObject{
   static Float_t GetHeights(Int_t iplate, Int_t istrip)  {return fgkHeights[iplate][istrip];};
   static Float_t GetDistances(Int_t iplate, Int_t istrip)  {return fgkDistances[iplate][istrip];};
 
-  static Int_t GetIndex(Int_t *detId); // Get channel index from det Id (for calibration mainly)
+  static Int_t GetIndex(const Int_t * const detId); // Get channel index from det Id (for calibration mainly)
+  static void GetVolumeIndices(Int_t index, Int_t *detId); // Get volume index from channel index
+
+  UShort_t GetAliSensVolIndex(Int_t sec, Int_t pla, Int_t str) const; // Get the index of the TOF alignable volume in the AliGeomManager order
+  static Int_t GetStripNumber(Int_t isector, Int_t iplate, Int_t istrip); // Get the serial number of the TOF alignable volume, i.e. the TOF strip
+  static Int_t GetStripNumberPerSM(Int_t iplate, Int_t istrip); // Get the serial number of the TOF strip in a TOF SM
+  void PadRF2TrackingRF(Float_t *ctrackPos, Float_t *differenceT);
+
 
   private:
 
@@ -130,7 +140,8 @@ class AliTOFGeometry: public TObject{
     kNCh         =    8  // Number of channels per Tdc
   };
 
-  static const Int_t fgkTimeDiff;      // Min signal separation (ps)
+  static const Float_t fgkDeadTime;       // Single channel dead time (ps)
+  static const Float_t fgkMatchingWindow; // Matching window (ps)
 
   static const Float_t fgkZlenA;       // length (cm) of the A module
   static const Float_t fgkZlenB;       // length (cm) of the B module
@@ -161,7 +172,7 @@ class AliTOFGeometry: public TObject{
   static const Float_t fgkTdcBin;   // time-of-flight bin width [ps]
   static const Float_t fgkToTBin;   // time-over-threshold bin width [ps]
 
-  ClassDef(AliTOFGeometry,5) // TOF Geometry base class
+  ClassDef(AliTOFGeometry,8) // TOF Geometry base class
 };
 
 #endif