// -*- mode: c++ -*- // //-------------------------------------------------------------------// // // // BrChkvParameters // // // // Parameters describing the physical properties of the Cherenkov // // detector tubes (C1, RICH,...) // // // // Some of these are presently simulation parameters others are // // relevant to both simulations and reconstruction. // // // //-------------------------------------------------------------------// // // $Id: BrChkvParameters.h,v 1.3 2001/09/24 07:09:15 ekman Exp $ // $Author: ekman $ // $Date: 2001/09/24 07:09:15 $ // //--------------------------------------------------------------------// // #ifndef BRAT_BrChkvParameters #define BRAT_BrChkvParameters //ROOT Includes //BRAT Includes #ifndef BRAT_BrDetectorParamsBase #include "BrDetectorParamsBase.h" #endif #ifndef BRAT_BrVector3D #include "BrVector3D.h" #endif class BrChkvParameters : public BrDetectorParamsBase { public: BrChkvParameters(); BrChkvParameters(Char_t *name,Char_t *title); BrChkvParameters(Char_t *name,Char_t *title,Char_t *asciifilename); virtual ~BrChkvParameters(); virtual void ListParameters() const { Print(); } virtual void SetASCIIParameters(Char_t *line); virtual void SetDefaultParameters(); virtual void SetDefaultParams() { SetDefaultParameters();} virtual Int_t GetNoTubes() const { return fNoTubes; } virtual Int_t GetNoTubesX() const { return fNoTubesX; } virtual Int_t GetNoTubesY() const { return fNoTubesY; } virtual Double_t GetTubeSize() const { return fTubeSize; } virtual Double_t GetXOffset() const { return fXOffset; } virtual Double_t GetYOffset() const { return fYOffset; } virtual Int_t GetClosestTube(Double_t x, Double_t y) const; virtual Int_t GetClosestTube(const BrVector3D &hit) const { return GetClosestTube(hit[0], hit[1]); } virtual BrVector3D GetTubePosition(Int_t) const; virtual Int_t GetTubeWithDirection(Int_t, Int_t, Int_t) const; virtual void SetNoTubes (const Int_t n) { fNoTubes = n; } virtual void SetNoTubesX(const Int_t n) { fNoTubesX = n; } virtual void SetNoTubesY(const Int_t n) { fNoTubesY = n; } virtual void SetTubeSize(Double_t value) { fTubeSize = value; } virtual void SetXOffset(Double_t value) { fXOffset = value; } virtual void SetYOffset(Double_t value) { fYOffset = value; } virtual void Print(Option_t* option="") const; private: Int_t fNoTubes; // Number of tubes in Cherenkov detector // 1-based, i.e, 1,2,3,..., nTubes // It is internally done 0-based because of arrays Int_t fNoTubesX; // Number of tubes in x direction (columns) Int_t fNoTubesY; // Number of tubes in y direction (rows) Double_t fTubeSize; // They are squares so only 1 dimension is needed // fXOffset and fYOffset can be used if there is an offset of the // center of the detector plane from the center of the projected plane Double_t fXOffset; Double_t fYOffset; Int_t* fXArrayNumber; // Gives the internal x-coordinate for tube i-1 Int_t* fYArrayNumber; // Gives the internal y-coordinate for tube i-1 Int_t** fXYTube; // Gives the tubeno-1 for internalcoordinates(x,y) Float_t fXArrayXPos[20]; // x position of x array (only for RICH) Float_t fYArrayYPos[16]; // y position of y array (only for RICH) void MakeC1Map(); void MakeRICHMap(); Bool_t TestRange(Int_t x, Int_t y) const; public: ClassDef(BrChkvParameters, 2) // BRAHMS Cherenkov detector parameters }; #endif //--------------------------------------------------------------------- // // $Log: BrChkvParameters.h,v $ // Revision 1.3 2001/09/24 07:09:15 ekman // Added arrays to give exact tube posistion on the RICH image plane - it // doesn't look very nice but it is working. // // Revision 1.2 2001/07/31 09:31:02 ouerdane // Merged version of BrDetectorParamsChk and BrChkvParameters // The first one is obsolete. // The last one has class version number 2 // // Revision 1.1 2001/07/20 16:01:54 ouerdane // Added new clas for cherenkov detector parameters: BrChkvParameters // works like the other classes (eg. BrDetectorParamsTof) and // reads the number of tubes of C1 or RICH in DetectorParameters.txt //