X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFGeometry.h;h=92e63f2d3ad3f63805a64b7f7ba8ccaa9b8c6c5a;hb=284418bc8bebe150fc21e43270269c5bdc619a5e;hp=4dae244f5c9f7166f8dc275c118a7f9bf3f18396;hpb=58eb5b6109800b34cf992ba3a654fdd974e96f5c;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFGeometry.h b/TOF/AliTOFGeometry.h index 4dae244f5c9..92e63f2d3ad 100644 --- a/TOF/AliTOFGeometry.h +++ b/TOF/AliTOFGeometry.h @@ -1,5 +1,6 @@ #ifndef ALITOFGEOMETRY_H #define ALITOFGEOMETRY_H + /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ @@ -11,112 +12,177 @@ // // /////////////////////////////////////////////////////////////////////////////// +#include "TGeoMatrix.h" +#include "TObject.h" +//class TGeoMatrix; -class AliTOFGeometry{ +class AliTOFGeometry: public TObject{ public: AliTOFGeometry(); virtual ~AliTOFGeometry(); - static Int_t NStripA() { return fgkNStripA;}; - static Int_t NStripB() { return fgkNStripB;}; - static Int_t NStripC() { return fgkNStripC;}; - static Int_t NpadX() { return fgkNpadX;}; - static Int_t NpadZ() { return fgkNpadZ;}; - static Int_t NSectors() { return fgkNSectors;}; - static Int_t NPlates() { return fgkNPlates;}; - static Int_t NPadXSector() { return (fgkNStripA + 2*fgkNStripB + - 2*fgkNStripC)*fgkNpadX*fgkNpadZ;}; - static Int_t TimeDiff() { return fgkTimeDiff;}; - static Int_t MaxTOFTree() { return fgkMaxTOFTree;}; - - - static Float_t Rmin() { return fgkRmin;}; - static Float_t Rmax() { return fgkRmax;}; - static Float_t ZlenA() { return fgkZlenA;}; - static Float_t ZlenB() { return fgkZlenB;}; - static Float_t ZlenC() { return fgkZlenC;}; + 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 + + 2*kNStripC);}; + 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 XPad() { return fgkXPad;}; static Float_t ZPad() { return fgkZPad;}; - static Float_t MaxhZtof() { return fgkMaxhZtof;}; + static Float_t StripLength() { return fgkStripLength;}; + + static Float_t DeadTime() { return fgkDeadTime;}; + static Float_t MatchingWindow() { return fgkMatchingWindow;}; + + static Int_t MaxTOFTree() { return kMaxTOFTree;}; + + static Int_t NDDL() { return kNDDL;}; + static Int_t NTRM() { return kNTRM;} + static Int_t NTdc() { return kNTdc;}; + static Int_t NChain() { return kNChain;}; + static Int_t NCh() { return kNCh;}; + static Int_t NPadXTRM() { return kNCh*kNTdc*kNChain;}; + + static Float_t ZlenA() { return fgkZlenA;}; + static Float_t ZlenB() { return fgkZlenB;}; + static Float_t ZlenC() { return fgkZlenC;}; + static Float_t MaxhZtof() { return fgkMaxhZtof;}; static Float_t SigmaForTail1() { return fgkSigmaForTail1;}; static Float_t SigmaForTail2() { return fgkSigmaForTail2;}; - static Float_t SpeedOfLight() { return fgkSpeedOfLight;}; - static Float_t PionMass() { return fgkPionMass;}; - static Float_t KaonMass() { return fgkKaonMass;}; - static Float_t ProtonMass() { return fgkProtonMass;}; - static Float_t ElectronMass() { return fgkElectronMass;}; - static Float_t MuonMass() { return fgkMuonMass;}; + static Double_t GetAlpha() { return 2 * 3.14159265358979323846 / kNSectors; }; - - virtual void Init(); + static Float_t TdcBinWidth() {return fgkTdcBin;}; + static Float_t ToTBinWidth() {return fgkToTBin;}; + static Float_t BunchCrossingBinWidth() {return fgkBunchCrossingBin;}; + + static Float_t SlewTOTMin() {return fgkSlewTOTMin;}; + static Float_t SlewTOTMax() {return fgkSlewTOTMax;}; + + 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, 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 GetDetID(Float_t *pos,Int_t *det); - virtual Int_t GetPlate(Float_t *pos); - virtual Int_t GetStrip(Float_t *pos); - virtual Int_t GetSector(Float_t *pos); - virtual Int_t GetPadX(Float_t *pos); - virtual Int_t GetPadZ(Float_t *pos); - virtual Float_t GetX(Int_t *det); - virtual Float_t GetY(Int_t *det); - virtual Float_t GetZ(Int_t *det); - virtual Float_t GetMinPlateTheta(Int_t iPlate); - virtual Float_t GetMaxPlateTheta(Int_t iPlate); - virtual Float_t GetMinStripTheta(Int_t iPlate, Int_t iStrip); - virtual Float_t GetMaxStripTheta(Int_t iPlate, Int_t iStrip); - virtual Float_t GetStripTheta(Int_t iPlate, Int_t iStrip); - virtual Float_t GetAngles(Int_t iplate, Int_t istrip) const {return fAngles[iplate][istrip];}; - virtual Float_t GetHeights(Int_t iplate, Int_t istrip) const {return fHeights[iplate][istrip];}; + virtual void GetPosPar(Int_t *det,Float_t *pos) const; + virtual void GetDetID(Float_t *pos,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[4][3]); + 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; + + static Float_t GetAngles(Int_t iplate, Int_t istrip) {return fgkAngles[iplate][istrip];}; + 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(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 + 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 + void PadRF2TrackingRF(Float_t *ctrackPos, Float_t *differenceT); // Convert the track coordinates from pad RF to tracking RF + + static Int_t GetTOFsupermodule(const Int_t index); // Return the TOF supermodule where TOF channel index is located private: enum { - fgkNStripA = 15, // number of strips in A type module - fgkNStripB = 19, // number of strips in B type module - fgkNStripC = 20, // number of strips in C type module - fgkNpadX = 48, // Number of pads along X - fgkNpadZ = 2, // Number of pads along Z - fgkNSectors = 18, // Number of Sectors - fgkNPlates = 5, // Number of Plates - fgkMaxNstrip = 20, // Max. number of strips - fgkMaxTOFTree = 5 // numer of geom. levels: + kNStripA = 15, // number of strips in A type module + kNStripB = 19, // number of strips in B type module + kNStripC = 19, // number of strips in C type module + kNpadX = 48, // Number of pads along X + kNpadZ = 2, // Number of pads along Z + kNSectors = 18, // Number of Sectors + kNPlates = 5, // Number of Plates + kMaxTOFTree = 5, // numer of geom. levels: + kMaxNstrip = 20 // Max. number of strips }; - static const Int_t fgkTimeDiff; // Min signal separation (ps) + // DAQ characteristics + // cfr. TOF-TDR pag. 105 for Glossary + // TARODA : TOF-ALICE Read Out and Data Acquisition system + enum { + kNDDL = 4, // Number of DDL (Detector Data Link) per sector + kNTRM = 12, // Number of TRM ( Readout Module) per DDL + kNTdc = 15, // Number of Tdc (Time to Digital Converter) per TRM + kNChain = 2, // Number of chains per TRM + kNCh = 8 // Number of channels per Tdc + }; - static const Float_t fgkRmin; // Inner radius of the TOF (cm) - static const Float_t fgkRmax; // Outer radius of the TOF (cm) - static const Float_t fgkZlenA; // length (cm) of the A module - static const Float_t fgkZlenB; // length (cm) of the B module - static const Float_t fgkZlenC; // length (cm) of the C module - static const Float_t fgkXPad; // Pad size in the x direction (cm) - static const Float_t fgkZPad; // Pad size in the z direction (cm) - static const Float_t fgkMaxhZtof;// Max half z-size of TOF (cm) + 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 + static const Float_t fgkZlenC; // length (cm) of the C module + static const Float_t fgkMaxhZtof; // Max half z-size of TOF (cm) + + static const Float_t fgkRmin; // Inner radius of the TOF (cm) + static const Float_t fgkRmax; // Outer radius of the TOF (cm) + static const Float_t fgkxTOF; // Inner TOF Radius used in Reconstruction (cm) + + static const Float_t fgkStripLength; // Strip Length (rho X phi direction) (cm) + + static const Float_t fgkXPad; // Pad size in the x direction (cm) + static const Float_t fgkZPad; // Pad size in the z direction (cm) static const Float_t fgkSigmaForTail1;//Sig1 for simulation of TDC tails static const Float_t fgkSigmaForTail2;//Sig2 for simulation of TDC tails - static const Float_t fgkSpeedOfLight;// c (10^9 m/s) - static const Float_t fgkPionMass;// pion mass (Gev/c^2) - static const Float_t fgkKaonMass;// kaon mass (Gev/c^2) - static const Float_t fgkProtonMass;// proton mass (Gev/c^2) - static const Float_t fgkElectronMass;// electron mass (Gev/c^2) - static const Float_t fgkMuonMass;// muon mass (Gev/c^2) + static const Float_t fgkPhiSec; //sector Phi width (deg) - static const Float_t fgkDprecMin;//num.prec.tolerance on Thmin - static const Float_t fgkDprecMax;//num.prec.tolerance on Thma - static const Float_t fgkDprecCen;//num.prec.tolerance on - - Float_t fAngles[fgkNPlates][fgkMaxNstrip]; //Strip Tilt Angles - Float_t fHeights[fgkNPlates][fgkMaxNstrip];//Strip heights - Float_t fPhiSec; //sector Phi width (deg) + Bool_t fHoles; //logical for geometry version (w/wo holes) + + static const Float_t fgkAngles[kNPlates][kMaxNstrip]; //Strip Tilt Angles + static const Float_t fgkHeights[kNPlates][kMaxNstrip]; //Strip heights + static const Float_t fgkDistances[kNPlates][kMaxNstrip];//Strip distances + + + static const Float_t fgkTdcBin; // time-of-flight bin width [ps] + static const Float_t fgkToTBin; // time-over-threshold bin width [ps] + static const Float_t fgkBunchCrossingBin; // bunch-crossing bin width [ps] + + static const Float_t fgkSlewTOTMin; // min TOT for slewing correction [ns] + static const Float_t fgkSlewTOTMax; // max TOT for slewing correction [ns] - ClassDef(AliTOFGeometry,0) // TOF Geometry base class + ClassDef(AliTOFGeometry,8) // TOF Geometry base class }; #endif