// -*- mode: c++ -*- // // $Id: BrDetectorParamsTof.h,v 1.4 2001/10/21 03:15:19 ouerdane Exp $ //___________________________________________________________________ // // // BrDetectorParamsTof // // // // Parameters describing the physical properties of the TOF slats.// // Some of these are presently simulation parameters others are // // relevant to both simulations and reconstruction. // // // //___________________________________________________________________// // // #ifndef BRAT_BrDetectorParamsTof #define BRAT_BrDetectorParamsTof #ifndef ROOT_TNamed #include "TNamed.h" #endif #ifndef ROOT_TClass #include "TClass.h" #endif #ifndef BRAT_BrDetectorParamsBase #include "BrDetectorParamsBase.h" #endif #ifndef BRAT_BrVector3D #include "BrVector3D.h" #endif class BrDetectorParamsTof : public BrDetectorParamsBase { public: BrDetectorParamsTof(); BrDetectorParamsTof(Char_t *name,Char_t *title); BrDetectorParamsTof(Char_t *name,Char_t *title,Char_t *asciifilename); virtual ~BrDetectorParamsTof(); void SetDefaultParams(); void ListParameters() const; BrVector3D GetSlatPos(Int_t slat) const; Int_t GetSlatNo(Float_t x) const; virtual Float_t GetADCGainUp() const {return fADCGainUp;} virtual Float_t GetADCGainDown()const {return fADCGainDown;} virtual Float_t GetTimeConversion()const {return fTimeConversion;} virtual Float_t GetSigmaTime() const {return fSigmaTime;} virtual Float_t GetSigmaAdc() const {return fSigmaAdc;} virtual Int_t GetNoSlats() const {return fNoSlats;} virtual Int_t GetNoPanels() const {return fNoPanels;} virtual Int_t GetPanel() const {return fPanel;} virtual Float_t GetSlatWidth() const { return fSlatWidth; } virtual Float_t GetSlatDepth() const { return fSlatDepth; } virtual Float_t GetTofWidth() const { return fTofWidth; } virtual Float_t GetTofDepth() const { return fTofDepth; } virtual Float_t GetSlatHeight() const { return fScintLength; } virtual Float_t GetTdcConv() const {return fTdcConv;} virtual Float_t GetTdcOffset() const {return fTdcOffset;} virtual Float_t GetScintLength() const{ return fScintLength;} virtual Float_t GetMeVperMIP() const{ return fMeVperMIP;} virtual Float_t GetSignalSpeed() const{ return fSignalSpeed;} virtual Float_t GetAttLength() const{ return fAttLength;} virtual void SetADCGainUp(const Float_t adc){fADCGainUp = adc;} virtual void SetADCGainDown(const Float_t adc){fADCGainDown = adc;} virtual void SetNoSlats(const Int_t nslat){fNoSlats=nslat;} virtual void SetPanel(const Int_t pan){fPanel=pan;} virtual void SetNoPanels(const Int_t npan){fNoPanels=npan;} virtual void SetTimeConversion(const Float_t value){fTimeConversion= value;} virtual void SetSigmaTime(const Float_t value){fSigmaTime= value;} virtual void SetfSigmaAdc(const Float_t value){fSigmaAdc= value;} virtual void SetTdcConv(const Float_t value) {fTdcConv = value;} virtual void SetTdcOffset(const Float_t value){fTdcOffset= value;} virtual void SetMeVperMIP(const Float_t value){fMeVperMIP= value;} virtual void SetAttLength(const Float_t value){fAttLength= value;} virtual void SetScintLength(const Float_t value){fScintLength= value;} virtual void SetSignalSpeed(const Float_t value){fSignalSpeed= value;} virtual void SetTofWidth (const Float_t value) { fTofWidth = value; } virtual void SetTofDepth (const Float_t value) { fTofDepth = value; } virtual void SetSlatWidth (const Float_t value) { fSlatWidth = value; } virtual void SetSlatDepth (const Float_t value) { fSlatDepth = value; } virtual void SetSlatHeight (const Float_t value) { fScintLength = value; } virtual void SetASCIIParameters(Char_t *line); private: Float_t fADCGainUp; // Gain of Tube + ADC. (up tubes) Float_t fADCGainDown; // Gain of Tube + ADC. (down tube) Float_t fTimeConversion; // light propagation speed. psec per cm. Float_t fSigmaTime; // Intrinsic time-resolution Float_t fSigmaAdc; // Intrinsic pulse height resolution Int_t fNoSlats; // Number of slats in Tof Wall Int_t fNoPanels; // Number of slats in Tof Wall Int_t fPanel; // panel index in MRS Tof Wall Float_t fSlatWidth; // Slat width (pitch in case of MRS) Float_t fSlatDepth; // slat depth (z axis) Float_t fTofWidth; // tof wall width (in x) Float_t fTofDepth; // tof wall depth (in z) Float_t fTdcConv; // pico seconds per channel Float_t fTdcOffset; // Channel number for t0 Float_t fMeVperMIP; // Normalisation Constant Float_t fAttLength; // attenuation length for material (cm) Float_t fScintLength; // lenght of active scintillator (cm). Float_t fSignalSpeed; // Propagation time of pulse in scint. Bool_t fInFs; //! flag to see of we're in FS or MRS public: ClassDef(BrDetectorParamsTof,3) // BRAHMS detector volume class }; #endif //_____________________________________________________________________________________ // // $Log: BrDetectorParamsTof.h,v $ // Revision 1.4 2001/10/21 03:15:19 ouerdane // Added method GetSlatNo(Float_t x), it returns a slat number given an X value // // Revision 1.3 2001/10/19 15:23:05 ouerdane // Introduced new parameters: // fTofWidth, fTofDepth, fSlatWidth, fSlatDepth + corresponding setters and getters // // Added new method GetSlatPos() which works for TOF1, TOF2, TFPn // Don't use it if your param object is named TOFW. You do need TFPn instead since // it returns the panel local slat number. // // You can use the /test/TestTofParams.C to check things: // // .L TestTofParams.C // Print("", "") // // can be TOF1, TOF2, TOFW, TFPn with 0 < n < 7 // is DetectorParameters.txt by default // // Incremented the class version number to 3 // // Revision 1.2 2001/10/02 20:16:40 ouerdane // added member fNoPanels to BrDetectorParamsTof with setter and getter. // Same for DetectorParameters*.txt : in 2000: fNoPanels = 4 // in the actual, it is set to 6. // class version number has been incremented from 1 to 2 // // Revision 1.1.1.1 2001/06/21 14:55:00 hagel // Initial revision of brat2 // // Revision 1.7 2000/05/17 10:28:28 ouerdane // see top of file // // Revision 1.6 1999/03/07 00:00:45 hagel // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made // appropriate changes to handle the forward spectrometer. It uses the new // track classes as well as extensively using geometry classes. It also uses // new methods and functionality as described below. // 2. Changed BrMagnetVolume // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a // track at the exit of magnet and given the momentum, calculates // where the track would come into the front of the magnet. // b. Added method GlobalToLocal(BrLine3D &): does a combination of // GlobalToLocal(BrVector3D &,BrVector3D&,0) and // GlobalToLocal(BrVector3D &,BrVector3D&,1) // c. Added method LocalToGlobal(BrLine3D &): does a combination of // LocalToGlobal(BrVector3D &,BrVector3D&,0) and // LocalToGlobal(BrVector3D &,BrVector3D&,1) // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal // and LocalToGlobal as in BrMagnetVolume // 2. Added a parameter base class BrDetectorParamsBase: helps when reading // in database files. Declared ASCII reading routines to be virtual. // Has main ReadASCIIFile which decodes the ASCII parameter files, then // calls the detector specific methods SetASCIIParameter // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, // BrDetectorParamsTof, BrDetectorParamsBB // 4. Implemented BrParameterDbManager. It currently works similarly to // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when // called. These objects then read in ASCII parameter files with a currently // "well defined" format using the above implemented routines using a constructor: // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); // 5. If no parameter file is specified, it executes the constructor we // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). // These constructors generate default parameters and are semi-intelligent // which means they generate approximately appropriate parameters depending // upon which detector they are. I should say that the parameters were // deemed appropriate at the time of writing the SetDefaultParams routine. // a. It is used in the same way as BrGeometryDbManager, that is: // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); // 6. Added a new directory, params, in BRAT. This directory has the file // DetectorParameters.txt in it. If the BrParameterDbManager is started // and the DetectorParameter.txt file is specified, it will look in the // $BRATSYS/params directory if it cannot find the file in the directory // that the user has set default to. // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The // SetDetectorParams methods have been moved to private and can no longer be // used from the macro or program. // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in // TObjArray. This should be much faster, but has the caveat that it assumes // that all slots in TObjArray are full. That seems to me to be the case // in how we use TObjArray at least in BrDataTable, but if problems arise due // to this change, it can always be easily changed back. It has been used a // fair amount before checking in and no problems were found. // // Modified Files: // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx // base/src/Makefile bb/inc/BrDetectorParamsBB.h // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h // track/inc/BrFSTrackingModule.h // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx // track/src/BrFSTrackingModule.cxx // track/src/BrSpectrometerTracks.cxx // // Revision 1.5 1999/02/04 18:16:09 hagel // Added ReadASCIIFile() // // Revision 1.4 1999/01/21 23:23:25 hagel // 1. Changed convention for checking includes. Current convention is: // BRAT_Br...... eg BRAT_BrModule ala ROOT. // 2. Added CVS logs to .h files that didn't have them. // 3. Moved checking of include definition to first line for easier reading // 4. Put checks before all includes in the include files as per BRAT specifications // 5. Added BrGeantHeader to Geant Makefile // 6. All changes have been checked to compile on NT ala Cygnus // // Revision 1.3 1998/08/24 19:35:08 videbaek // Added Set member functions // Inserted Id and Log