// -*- mode: c++ -*- // // $Id: BrSiCalibration.h,v 1.10 2002/03/02 15:33:29 cholm Exp $ // #ifndef BRAT_BrSiCalibration #define BRAT_BrSiCalibration #ifndef BRAT_BrMultCalibration #include "BrMultCalibration.h" #endif class BrSiCalibration : public BrMultCalibration { private: BrCalibrationData fPulserFunc; // pulser calibration public: BrSiCalibration(); BrSiCalibration(const Char_t* name, const Char_t* title); // ADC calibration virtual Short_t GetAdcGap(Int_t tileNo) const { return 0; } // For the pulser calibration virtual Int_t GetPulserFuncOrder() const; virtual Float_t GetPulserFuncPar(Int_t stripNo, Int_t parno) const; virtual Float_t GetConversionFuncPar(Int_t, Int_t) const; // ADC calibration virtual void SetAdcGap(Int_t tileNo, Short_t gap) {} // For the pulser calibration virtual void SetPulserFuncOrder(Int_t order); virtual void SetPulserFunc(Int_t stripNo, Float_t*); virtual void SetConversionFunc(Int_t, Float_t*); ClassDef(BrSiCalibration,3) // Calibration of Si array }; #ifdef BR_MULT_CAL_TMP #define BR_SI_RING_MAX 42 #ifndef BRAT_BrSiDig // For BR_SI_CHAN_MAX #include "BrSiDig.h" #endif class BrSiTmpCalibration : public BrMultTmpCalibration { private: Float_t fPedestal[BR_SI_CHAN_MAX]; // Pedestal of ADCs Float_t fPedestalWidth[BR_SI_CHAN_MAX]; // Pedestal width of ADCs Float_t fAdcGain[BR_SI_CHAN_MAX]; // Gain of ADCs Int_t fPulserOrder; // pulser calibration Float_t fPulserFunc[4 * BR_SI_CHAN_MAX];// pulser calibration Float_t fConversionFunc[9]; // eta dep. conversion from E to N Float_t fCorrectionFunc[10]; // vtx dep. conversion from N' to N Float_t fCentralityFunc[128]; // Centrality cut functions (BAN22) // These are geometry things proper, but put here for now, until a // concensus of how to do the geometry database. Short_t fRingMap[BR_SI_CHAN_MAX]; // ADC ch. no. to ring map Short_t fRowMap[BR_SI_CHAN_MAX]; // ADC ch. no. to row map Float_t fRingPosition[BR_SI_RING_MAX]; // Z coordinate of center of rings Float_t fTilt[BR_SI_CHAN_MAX]; // Tilt of individual si Int_t fRunNo; // run no associated with calibraiton Int_t fRingCnt[BR_SI_RING_MAX]; // no. of detectors in ring static BrSiTmpCalibration* fgInstance; public: BrSiTmpCalibration(); BrSiTmpCalibration(const Char_t* name, const Char_t* title); ~BrSiTmpCalibration(); static BrSiTmpCalibration* Instance(); // Various "special" methods void Clear(); void Defaults(); void ReadASCIIFile(Int_t runno); // Set run specific calibration void SetRunNo(const Int_t runno); Int_t GetRunNo() const {return fRunNo;} // ADC calibration Float_t GetPedestal(Int_t siNo) const; Float_t GetPedestalWidth(Int_t siNo) const; Float_t GetAdcGain(Int_t siNo) const; // For the pulser calibration Int_t GetPulserFuncOrder() const; Float_t GetPulserFuncPar(Int_t stripNo, Int_t parno) const; // For the eta correction function Float_t GetConversionFuncPar(Int_t, Int_t parno) const; // For the centrality cuts Float_t GetCorrectionFuncPar(Int_t parno) const; // For the centrality cuts Float_t GetCentralityFuncCut(Int_t) const; Float_t GetCentralityFuncPar(Int_t, Int_t) const; // Geometry - shoud be in geometry database Short_t GetRingMap(Int_t siNo) const; Short_t GetRowMap(Int_t siNo) const; Float_t GetRingPosition(Int_t ringNo) const; Float_t GetTilt(Int_t siNo) const; Int_t GetRingCnt(Int_t ring) const {return fRingCnt[ring];} // Setters needed for the array calibration program, otherwise these // should not be needed void SetPedestal(Int_t siNo, Float_t ped) {fPedestal[siNo] = ped;} void SetPedestalWidth(Int_t siNo, Float_t pedwid) {fPedestalWidth[siNo] = pedwid;} void SetAdcGain(Int_t siNo, Float_t gain) {fAdcGain[siNo] = gain;} void Print(Option_t* option="") const; ClassDef(BrSiTmpCalibration, 0) // temporary si calibration } ; #endif #endif // // $Log: BrSiCalibration.h,v $ // Revision 1.10 2002/03/02 15:33:29 cholm // Expanded arrays for more centrality cuts // // Revision 1.9 2002/02/04 23:51:31 sanders // Add setter for detector gains // // Revision 1.8 2002/01/06 08:31:00 sanders // Add Setters for pedestals and pedestal width so that these can // be changed dynamically for calibrations. // // Revision 1.7 2001/12/06 00:33:01 sanders // Fixed calibrations to obtain average pseudorapidity and geometric // scaling factor for si and tile elements. // // Revision 1.6 2001/11/24 15:42:56 sanders // Added si and tile calibrations for: // 1) converting from detector multiplicities to ring dNdEta values // 2) finding the HIJING weighted ring eta value for a given vertex position // Both of these calibrations were found doing 8th order polynomial fits // to functions obtained by taking HIJING particle distributions starting // from vertex locations between -46cm and +46 cm, in 2 cm steps, and // checking if the corresponding particles "hit" any of the si or tile // detectors in the array. // // Revision 1.5 2001/11/21 19:12:15 cholm // Added code for reading SDE centrality calibrations for run 4640 // (and forward?). See also http://www4.rhic.bnl.gov/~cholm/mult.html. Took // out the default numbers since they were invalid and not used. // // Revision 1.4 2001/11/19 04:09:36 sanders // Revised calibration modules for 200 GeV (yr 2001) si/tile calibrations. // // Revision 1.3 2001/10/08 10:27:23 cholm // Changed detector calibration data classes to derive from BrCalibration, // rather than BrParameterElement, since that has been replaced. Impact // on various modules, and so on. Some user code may need to be changed to. // // Revision 1.2 2001/09/12 15:05:48 cholm // Varius fixes that was needed for the thing to work properly. Mistakes on // my part. Stupid ones too. // // Revision 1.1.1.1 2001/06/21 14:54:59 hagel // Initial revision of brat2 // // Revision 1.6 2001/05/31 01:44:46 cholm // Second rewamp of this directory. All RDO modules use the common // BrMultRdoModule, and they both write BrMultRdo Objects. Also introduced // ABC for Br[Tile|Si][Parameters|Calibration] since they have a lot in common, // and the code can be made more efficient this way. // // A possible further thing to do, is to make an ABC for the CentModules, and // the corresponding calibration modules, since they are very VERY similar. // However, the current module BrMultCentModule is in the way. Need to talk // to Steve about that. // // Revision 1.5 2001/05/17 11:12:18 cholm // Added support for reading ASCII calibration files for centrality cuts // in classes BrTileTmpCalibration and BrSiTmpCalibration. // Added some preliminary work for using the energy signal rather than the // multiplicity signal for the centrality determination in classses // BrTileCentCalModule and BrSiCentCalModule. // // Revision 1.4 2001/04/11 14:05:11 cholm // Fixed a few bugs // // Revision 1.3 2001/04/06 19:48:53 cholm // Finalised BrSiCalibration to hold all needed parameters. May need some // bug fixes here and there, but not much. // // Revision 1.2 2001/04/02 01:13:44 sanders // BrRdoMult and BrRdoModuleMult reinstated. These files develop the joint // Si+Tile multiplicity. BrRdoModuleMult now gets it parameters from the // BrTileRdoModule and BrSiRdoModule classes and is a friend of these classes. // // Revision 1.1 2001/01/29 20:49:23 cholm // Added a claibration module for silicon pedestals, plus a calibration // class for use with the calibrations database. Both classes havent been // tested yet. // //