LCOV - code coverage report
Current view: top level - TOF/TOFbase - AliTOFGeometry.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 35 45 77.8 %
Date: 2016-06-14 17:26:59 Functions: 36 51 70.6 %

          Line data    Source code
       1             : #ifndef ALITOFGEOMETRY_H
       2             : #define ALITOFGEOMETRY_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : /* $Id$ */
       8             : 
       9             : ///////////////////////////////////////////////////////////////////////////////
      10             : //                                                                           //
      11             : //  TOF geometry class                                                       //
      12             : //                                                                           //
      13             : ///////////////////////////////////////////////////////////////////////////////
      14             : 
      15             : #include "TGeoMatrix.h"
      16             : #include "TObject.h"
      17             : 
      18             : //class TGeoMatrix;
      19             : 
      20           0 : class AliTOFGeometry: public TObject{
      21             : 
      22             :  public:
      23             :   AliTOFGeometry();
      24             :   virtual ~AliTOFGeometry();
      25             : 
      26         968 :   static  Int_t NStripA()     { return kNStripA;};
      27        1964 :   static  Int_t NStripB()     { return kNStripB;};
      28        2418 :   static  Int_t NStripC()     { return kNStripC;};
      29             :   static  Int_t NStrip(Int_t nPlate);
      30           0 :   static  Int_t NMaxNstrip()  { return kMaxNstrip;};
      31     1260642 :   static  Int_t NpadX()       { return kNpadX;};
      32     2518156 :   static  Int_t NpadZ()       { return kNpadZ;};
      33           0 :   static  Int_t NpadXStrip()  { return kNpadX*kNpadZ;};
      34       22206 :   static  Int_t NSectors()    { return kNSectors;};
      35         164 :   static  Int_t NPlates()     { return kNPlates;};
      36           0 :   static  Int_t NStripXSector() { return (kNStripA + 2*kNStripB +
      37             :                                                 2*kNStripC);};
      38       21888 :   static  Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
      39             :                                         2*kNStripC)*kNpadX*kNpadZ;};
      40             : 
      41       69812 :   static  Float_t RinTOF()  { return fgkxTOF;};
      42        5222 :   static  Float_t Rmin()      { return fgkRmin;};
      43           2 :   static  Float_t Rmax()      { return fgkRmax;};
      44             : 
      45        4214 :   static  Float_t XPad()     { return fgkXPad;};
      46        3894 :   static  Float_t ZPad()     { return fgkZPad;};
      47             : 
      48           2 :   static  Float_t StripLength() { return fgkStripLength;};
      49             : 
      50          20 :   static  Float_t DeadTime()       { return fgkDeadTime;};
      51         388 :   static  Float_t MatchingWindow() { return fgkMatchingWindow;};
      52             : 
      53           0 :   static  Int_t MaxTOFTree()  { return kMaxTOFTree;};
      54             : 
      55     2529040 :   static  Int_t NDDL()        { return kNDDL;};
      56         576 :   static  Int_t NTRM()        { return kNTRM;}
      57       10944 :   static  Int_t NTdc()        { return kNTdc;};
      58        5472 :   static  Int_t NChain()      { return kNChain;};
      59     1415432 :   static  Int_t NCh()         { return kNCh;};
      60           0 :   static  Int_t NPadXTRM()    { return kNCh*kNTdc*kNChain;};
      61             : 
      62           2 :   static  Float_t ZlenA()       { return fgkZlenA;};
      63           0 :   static  Float_t ZlenB()       { return fgkZlenB;};
      64           0 :   static  Float_t ZlenC()       { return fgkZlenC;};
      65           0 :   static  Float_t MaxhZtof()    { return fgkMaxhZtof;};
      66             : 
      67         160 :   static  Float_t SigmaForTail1() { return fgkSigmaForTail1;};
      68         160 :   static  Float_t SigmaForTail2() { return fgkSigmaForTail2;};
      69             :  
      70       67956 :   static  Double_t GetAlpha()  { return 2 * 3.14159265358979323846 / kNSectors; }; 
      71             :  
      72        3956 :   static Float_t TdcBinWidth() {return fgkTdcBin;};
      73        1358 :   static Float_t ToTBinWidth() {return fgkToTBin;};
      74        1200 :   static Float_t BunchCrossingBinWidth() {return fgkBunchCrossingBin;};
      75             : 
      76        1200 :   static Float_t SlewTOTMin() {return fgkSlewTOTMin;};
      77         600 :   static Float_t SlewTOTMax() {return fgkSlewTOTMax;};
      78             : 
      79             :   virtual void    ImportGeometry();
      80           1 :   virtual void    SetHoles(Bool_t holes) {fgHoles = holes;};
      81           0 :   static  Bool_t  GetHoles() {return fgHoles;};
      82             :   static  Float_t DistanceToPadPar(Int_t *det, const Float_t * pos, Float_t *dist3d=0);
      83             :   static  Bool_t  IsInsideThePadPar(Int_t *det, const Float_t * pos);
      84             :   static  Bool_t  IsInsideThePad(TGeoHMatrix *mat, const Float_t * pos, Float_t *dist3d=0);
      85             :   static  void    GetVolumePath(const Int_t * ind, Char_t *path );
      86             :   static  void    GetVolumePath(Int_t sector, Char_t *path );
      87             :   static  void    GetVolumePath(Int_t sector, Int_t plate, Int_t strip, Char_t *path );
      88             :   static  void    GetPos(Int_t *det,Float_t *pos);
      89             :   static  void    GetPosPar(Int_t *det,Float_t *pos);
      90             :   static  void    GetDetID(Float_t *pos,Int_t *det);
      91             :   static  Int_t   GetPlate(const Float_t * pos);
      92             :   static  Int_t   GetStrip(const Float_t * pos);
      93             :   static  Int_t   GetSector(const Float_t * pos);
      94             :   static  Int_t   GetPadX(const Float_t * pos);
      95             :   static  Int_t   GetPadZ(const Float_t * pos);
      96             :   static  Float_t GetX(const Int_t * det);
      97             :   static  Float_t GetY(const Int_t * det);
      98             :   static  Float_t GetZ(const Int_t * det);
      99             :   virtual void    DetToStripRF(Int_t nPadX, Int_t nPadZ,
     100             :                                Float_t &x,  Float_t &z) const;
     101             :   virtual void    DetToSectorRF(Int_t vol[5], Double_t coord[4][3]);
     102             :   static  Float_t GetPadDx(const Float_t * pos);
     103             :   static  Float_t GetPadDy(const Float_t * pos);
     104             :   static  Float_t GetPadDz(const Float_t * pos);
     105             :   static  void Translation(Float_t *xyz, Float_t translationVector[3]);
     106             :   static  void Rotation(Float_t *xyz, Double_t rotationAngles[6]);
     107             :   static  void InverseRotation(Float_t *xyz, Double_t rotationAngles[6]);
     108             : 
     109        7776 :   static Float_t GetAngles(Int_t iplate, Int_t istrip)  {return fgkAngles[iplate][istrip];};
     110        2582 :   static Float_t GetHeights(Int_t iplate, Int_t istrip)  {return fgkHeights[iplate][istrip];};
     111        2582 :   static Float_t GetDistances(Int_t iplate, Int_t istrip)  {return fgkDistances[iplate][istrip];};
     112             : 
     113             :   static Int_t GetIndex(const Int_t * detId); // Get channel index from det Id (for calibration mainly)
     114             :   static void GetVolumeIndices(Int_t index, Int_t *detId); // Get volume index from channel index
     115             : 
     116             :   static UShort_t GetAliSensVolIndex(Int_t sec, Int_t pla, Int_t str); // Get the index of the TOF alignable volume in the AliGeomManager order
     117             :   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
     118             :   static Int_t GetStripNumberPerSM(Int_t iplate, Int_t istrip); // Get the serial number of the TOF strip in a TOF SM
     119             :   static void GetStripAndModule(Int_t iStripPerSM, Int_t &iplate, Int_t &istrip); // Return the module and strip per module corresponding to the strip number per SM
     120             :   void PadRF2TrackingRF(Float_t *ctrackPos, Float_t *differenceT); // Convert the track coordinates from pad RF to tracking RF
     121             : 
     122             :   static Int_t GetTOFsupermodule(Int_t index); // Return the TOF supermodule where TOF channel index is located
     123             : 
     124             :   private:
     125             : 
     126             :   enum {
     127             :     kNStripA    = 15, // number of strips in A type module 
     128             :     kNStripB    = 19, // number of strips in B type module 
     129             :     kNStripC    = 19, // number of strips in C type module 
     130             :     kNpadX      = 48, // Number of pads along X 
     131             :     kNpadZ      = 2,  // Number of pads along Z
     132             :     kNSectors   = 18, // Number of Sectors
     133             :     kNPlates    = 5,  // Number of Plates
     134             :     kMaxTOFTree = 5,  // numer of geom. levels: 
     135             :     kMaxNstrip  = 20  // Max. number of strips
     136             :   };
     137             : 
     138             :   // DAQ characteristics
     139             :   // cfr. TOF-TDR pag. 105 for Glossary
     140             :   // TARODA : TOF-ALICE Read Out and Data Acquisition system
     141             :   enum {
     142             :     kNDDL        =    4, // Number of DDL (Detector Data Link) per sector
     143             :     kNTRM        =   12, // Number of TRM ( Readout Module) per DDL
     144             :     kNTdc        =   15, // Number of Tdc (Time to Digital Converter) per TRM
     145             :     kNChain      =    2, // Number of chains per TRM
     146             :     kNCh         =    8  // Number of channels per Tdc
     147             :   };
     148             : 
     149             :   static const Float_t fgkDeadTime;       // Single channel dead time (ps)
     150             :   static const Float_t fgkMatchingWindow; // Matching window (ps)
     151             : 
     152             :   static const Float_t fgkZlenA;       // length (cm) of the A module
     153             :   static const Float_t fgkZlenB;       // length (cm) of the B module
     154             :   static const Float_t fgkZlenC;       // length (cm) of the C module
     155             :   static const Float_t fgkMaxhZtof;    // Max half z-size of TOF (cm)
     156             : 
     157             :   static const Float_t fgkRmin;        // Inner radius of the TOF (cm)
     158             :   static const Float_t fgkRmax;        // Outer radius of the TOF (cm)
     159             :   static const Float_t fgkxTOF;        // Inner TOF Radius used in Reconstruction (cm)
     160             : 
     161             :   static const Float_t fgkStripLength; // Strip Length (rho X phi direction) (cm)
     162             : 
     163             :   static const Float_t fgkXPad;     // Pad size in the x direction (cm)
     164             :   static const Float_t fgkZPad;     // Pad size in the z direction (cm)
     165             : 
     166             :   static const Float_t fgkSigmaForTail1;//Sig1 for simulation of TDC tails 
     167             :   static const Float_t fgkSigmaForTail2;//Sig2 for simulation of TDC tails
     168             : 
     169             :   static const Float_t fgkPhiSec; //sector Phi width (deg)
     170             : 
     171             :   static Bool_t fgHoles; //logical for geometry version (w/wo holes)
     172             : 
     173             :   static const Float_t fgkAngles[kNPlates][kMaxNstrip];   //Strip Tilt Angles
     174             :   static const Float_t fgkHeights[kNPlates][kMaxNstrip];  //Strip heights
     175             :   static const Float_t fgkDistances[kNPlates][kMaxNstrip];//Strip distances
     176             : 
     177             : 
     178             :   static const Float_t fgkTdcBin;   // time-of-flight bin width [ps]
     179             :   static const Float_t fgkToTBin;   // time-over-threshold bin width [ps]
     180             :   static const Float_t fgkBunchCrossingBin; // bunch-crossing bin width [ps]
     181             : 
     182             :   static const Float_t fgkSlewTOTMin; // min TOT for slewing correction [ns]
     183             :   static const Float_t fgkSlewTOTMax; // max TOT for slewing correction [ns]
     184             : 
     185          70 :   ClassDef(AliTOFGeometry,9) // TOF Geometry base class
     186             : };
     187             : 
     188             : #endif

Generated by: LCOV version 1.11