#include "TObjArray.h"
-class AliRunLoader;
class TGeoHMatrix;
+class AliRunLoader;
+
+class AliTRDpadPlane;
+
class AliTRDgeometry : public AliGeometry {
public:
virtual Bool_t Impact(const TParticle* ) const { return kTRUE; }
virtual Bool_t IsHole(Int_t /*p*/, Int_t /*c*/, Int_t /*s*/) const { return kFALSE; }
- virtual Bool_t Rotate(Int_t d, Double_t *pos, Double_t *rot) const;
- virtual Bool_t RotateBack(Int_t d, Double_t *rot, Double_t *pos) const;
+ virtual Bool_t RotateBack(Int_t det, Double_t *loc, Double_t *glb) const;
+
+ Bool_t ChamberInGeometry(Int_t det);
void GroupChamber(Int_t iplan, Int_t icham, Int_t *idtmed);
void CreateFrame(Int_t *idtmed);
void CreateServices(Int_t *idtmed);
- Bool_t ReadGeoMatrices();
+ Bool_t CreateClusterMatrixArray();
+ TGeoHMatrix *GetClusterMatrix(Int_t det) { return (TGeoHMatrix *)
+ fClusterMatrixArray->At(det); }
void SetSMstatus(Int_t sm, Char_t status) { fSMstatus[sm] = status; }
- static AliTRDgeometry* GetGeometry(AliRunLoader *runLoader = NULL);
-
static Int_t GetDetectorSec(Int_t p, Int_t c);
static Int_t GetDetector(Int_t p, Int_t c, Int_t s);
- virtual Int_t GetPlane(Int_t d) const;
+ static Int_t GetPlane(Int_t d);
virtual Int_t GetChamber(Int_t d) const;
+ virtual Int_t GetChamber(Double_t z, Int_t plane);
virtual Int_t GetSector(Int_t d) const;
- // Translation from MCM to Pad and vice versa
- virtual Int_t GetPadRowFromMCM(Int_t irob, Int_t imcm) const;
- virtual Int_t GetPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
- virtual Int_t GetMCMfromPad(Int_t irow, Int_t icol) const;
- virtual Int_t GetROBfromPad(Int_t irow, Int_t icol) const;
- virtual Int_t GetRobSide(Int_t irob) const;
- virtual Int_t GetColSide(Int_t icol) const;
+ void CreatePadPlaneArray();
+ AliTRDpadPlane *CreatePadPlane(Int_t p, Int_t c);
+ AliTRDpadPlane *GetPadPlane(Int_t p, Int_t c);
+ AliTRDpadPlane *GetPadPlane(Int_t det) { return GetPadPlane(GetPlane(det)
+ ,GetChamber(det)); }
+ Int_t GetRowMax(Int_t p, Int_t c, Int_t /*s*/);
+ Int_t GetColMax(Int_t p);
+ Double_t GetRow0(Int_t p, Int_t c, Int_t /*s*/);
+ Double_t GetCol0(Int_t p);
+
+ // Translation from MCM to Pad and vice versa (these functions are now in feeParam)
+ //virtual Int_t GetPadRowFromMCM(Int_t irob, Int_t imcm) const;
+ //virtual Int_t GetPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
+ //virtual Int_t GetMCMfromPad(Int_t irow, Int_t icol) const;
+ //virtual Int_t GetROBfromPad(Int_t irow, Int_t icol) const;
+ //virtual Int_t GetRobSide(Int_t irob) const;
+ //virtual Int_t GetColSide(Int_t icol) const;
static Float_t GetTime0(Int_t p) { return fgkTime0[p]; }
virtual void GetGlobal(const AliRecPoint*, TVector3&, TMatrixF& ) const { };
virtual void GetGlobal(const AliRecPoint*, TVector3& ) const { };
-
+
static Double_t GetAlpha() { return 2.0
* 3.14159265358979324
/ fgkNsect; }
static Int_t RowmaxC0() { return fgkRowmaxC0; }
static Int_t RowmaxC1() { return fgkRowmaxC1; }
- TGeoHMatrix *GetGeoMatrix(Int_t det) { return (TGeoHMatrix *)
- fMatrixGeo->At(det); }
- TGeoHMatrix *GetMatrix(Int_t det) { return (TGeoHMatrix *)
- fMatrixArray->At(det); }
- TGeoHMatrix *GetCorrectionMatrix(Int_t det) { return (TGeoHMatrix *)
- fMatrixCorrectionArray->At(det); }
-
protected:
static const Int_t fgkNsect; // Number of sectors in the full detector (18)
static const Int_t fgkNcham; // Number of chambers in z-direction (5)
static const Int_t fgkNdet; // Total number of detectors (18 * 6 * 5 = 540)
- static const Float_t fgkSheight; // Height of the TRD-volume in spaceframe (BTRD)
- static const Float_t fgkSwidth1; // Lower width of the TRD-volume in spaceframe (BTRD)
- static const Float_t fgkSwidth2; // Upper width of the TRD-volume in spaceframe (BTRD)
- static const Float_t fgkSlength; // Length of the TRD-volume in spaceframe (BTRD)
+ static const Float_t fgkTlength; // Length of the TRD-volume in spaceframe (BTRD)
+
+ static const Float_t fgkSheight; // Height of the supermodule
+ static const Float_t fgkSwidth1; // Lower width of the supermodule
+ static const Float_t fgkSwidth2; // Upper width of the supermodule
+ static const Float_t fgkSlength; // Length of the supermodule
+
+ static const Float_t fgkFlength; // Length of the service space in front of a supermodule
static const Float_t fgkSMpltT; // Thickness of the super module side plates
Float_t fCwidth[kNplan]; // Outer widths of the chambers
Float_t fClength[kNplan][kNcham]; // Outer lengths of the chambers
- Float_t fRotA11[kNsect]; // Matrix elements for the rotation
- Float_t fRotA12[kNsect]; // Matrix elements for the rotation
- Float_t fRotA21[kNsect]; // Matrix elements for the rotation
- Float_t fRotA22[kNsect]; // Matrix elements for the rotation
-
Float_t fRotB11[kNsect]; // Matrix elements for the backward rotation
Float_t fRotB12[kNsect]; // Matrix elements for the backward rotation
Float_t fRotB21[kNsect]; // Matrix elements for the backward rotation
Float_t fChamberUFboxd[3*kNdets][3]; // [3] = x, y, z
Float_t fChamberUUboxd[3*kNdets][3]; //
- TObjArray *fMatrixArray; //! Transformation Global to Local
- TObjArray *fMatrixCorrectionArray; //! Transformation Cluster to Tracking systerm
- TObjArray *fMatrixGeo; //! Geo matrices
+ TObjArray *fClusterMatrixArray; //! Transformation matrices loc. cluster to tracking cs
+ TObjArray *fPadPlaneArray; //! Array of pad plane objects
- ClassDef(AliTRDgeometry,12) // TRD geometry class
+ ClassDef(AliTRDgeometry,16) // TRD geometry class
};