// @(#) $Id$ #ifndef ALIL3TRANSFORM_H #define ALIL3TRANSFORM_H #ifdef use_aliroot class AliRunLoader; #endif #include "AliL3RootTypes.h" class AliL3Transform { public: enum VersionType { fV_default=0, fV_deprecated=1, fV_aliroot=10, fV_cosmics=100}; private: static const Double_t fBFACT; static const Double_t fPi; static const Double_t fPi2; static const Double_t f2Pi; static const Double_t fAnodeWireSpacing; static const Double_t fToDeg; static Int_t fNPatches; //6 (dont change this) static Int_t fRows[6][2]; static Int_t fNRows[6]; static Double_t fBField; static Double_t fBFieldFactor; static Double_t fSolenoidBField; static Int_t fNTimeBins; static Int_t fNRowLow; static Int_t fNRowUp; static Int_t fNRowUp1; static Int_t fNRowUp2; static Int_t fNSectorLow; static Int_t fNSectorUp; static Int_t fSlice2Sector[36][2]; static Int_t fSector2Slice[72]; static Int_t fSectorLow[72]; static Double_t fPadPitchWidthLow; static Double_t fPadPitchWidthUp; static Double_t fZWidth; static Double_t fZSigma; static Double_t fZLength; static Double_t fZOffset; static Int_t fNSector; //72 (dont change this) static Int_t fNSlice; //36 (dont change this) static Int_t fNRow; //159 (dont change this) static Double_t fNRotShift; //Rotation shift (eg. 0.5 for 10 degrees) static Int_t fNPads[159]; //fill this following Init and fVersion static Double_t fX[159]; //X position in local coordinates static Int_t fVersion; //flags the version static Double_t fDiffT; //Transversal diffusion constant static Double_t fDiffL; //Longitudinal diffusion constant static Double_t fOmegaTau; //ExB effects static Double_t fInnerPadLength; static Double_t fOuter1PadLength; static Double_t fOuter2PadLength; static Double_t fInnerPRFSigma; static Double_t fOuter1PRFSigma; static Double_t fOuter2PRFSigma; static Double_t fTimeSigma; //Minimal longitudinal width static Int_t fADCSat; //ADC Saturation (1024 = 10 bit) static Int_t fZeroSup; //Zero suppression threshold static Double_t fCos[36]; //stores the cos value for local to global rotations static Double_t fSin[36]; //stores the sin value for local to global rotations public: #ifdef use_aliroot static Bool_t Init(AliRunLoader *runLoader); //init transformer params using a run loader #endif static Bool_t Init(Char_t* path,Bool_t UseAliTPCParam=kFALSE); //init transformer settings (versions) static Bool_t MakeInitFile(Char_t *rootfilename,Char_t *filename); //create the init file from rootfile static Bool_t ReadInit(Char_t *path); //read init (possibly from root file) static Bool_t ReadInitFile(Char_t *path); //read init from text file static Bool_t SaveInitFile(Char_t *filename); //save parameters in init file //setters static void SetNPatches(Int_t i){fNPatches = i;} static void SetNRows(Int_t s[6]){for(Int_t i=0;i