--- DarthVader/ToFLevel2/inc/ToFLevel2.h 2006/07/14 14:06:14 1.5 +++ DarthVader/ToFLevel2/inc/ToFLevel2.h 2008/03/03 09:51:01 1.20 @@ -1,3 +1,8 @@ +/** + * \file ToFLevel2.h + * \author Gianfranca DeRosa / Wolfgang Menn + */ + #ifndef ToFLevel2_h #define ToFLevel2_h // @@ -5,6 +10,12 @@ #include #include #include + +#include // EMILIANO + +#include + + // // class which contains track related variables // @@ -16,85 +27,171 @@ #define ZTOF32 -24.34 +/** + * \brief Class which contains the PMT data + * + * If there is a valid ADC or a TDC value (value<4095) for a PMT, both ADC and TDC data + * are stored in the PMT class. + * Look in the ToFLevel2Ex.cxx example in the repository how to read the PMT class. + */ class ToFPMT : public TObject { - + private: public: - Int_t pmt_id; - Float_t adc; - Float_t tdc_tw; + Int_t pmt_id; /// "x"-sigma. A chi2 value is + * calculated, furthermore a "quality" value by adding the weights which + * are finally used. If all measurements are taken, "quality" will be = 505. + * A chi2 cut around 3-4 and a quality-cut > 400 is needed for clean beta + * The Level2 beta[12] which is derived in the fortran routines uses: 10.,200.,20. + * This is not a very high quality measurement. One can re-calculate a new beta[13] + * using the L2-method "CalcBeta" + */ + Float_t beta[13]; + // + Int_t npmtadc; ///GetEntries();}; Int_t npmt(){return PMT->GetEntries();}; - + + // + void GetLevel2Struct(cToFLevel2 *) const; // - ToFTrkVar *GetToFTrkVar(Int_t notrack); - ToFPMT *GetToFPMT(Int_t nohit); + ToFTrkVar *GetToFTrkVar(Int_t notrack); + ToFPMT *GetToFPMT(Int_t nohit); Int_t GetPMTid(Int_t gg, Int_t hh); TString GetPMTName(Int_t ind); + Int_t GetPlaneIndex(Int_t pmt_id); void GetMatrix(Int_t notrack, Float_t adc[4][12], Float_t tdc[4][12]); void GetPMTIndex(Int_t pmt_id, Int_t &gg, Int_t &hh); + + // gf Apr 07 + void GetdEdxPaddle(Int_t notrack, Int_t paddleid, Int_t adcfl, Float_t &PadEdx, Int_t &SatWarning); // gf Apr 07 + TString GetPMTName(Int_t ind, Int_t &iplane, Int_t &ipaddle,Int_t &ipmt); + Int_t GetPaddleIdOfTrack(Float_t xtr, Float_t ytr, Int_t plane); // gf Apr 07 + void GetPMTPaddle(Int_t pmt_id, Int_t &plane, Int_t &paddle); // gf Apr 07 + void GetPaddlePMT(Int_t paddle, Int_t &pmtleft, Int_t &pmtright); // gf Apr 07 + void GetPaddleGeometry(Int_t plane, Int_t paddle, Float_t &xleft, Float_t &xright, Float_t &yleft, Float_t &yright); // gf Apr 07 + Int_t GetPaddleid(Int_t plane, Int_t paddle); + void GetPaddlePlane(Int_t padid, Int_t &plane, Int_t &paddle); + Int_t GetNPaddle(Int_t plane); + // + // + // // constructor // ToFLevel2(); + ~ToFLevel2(){Delete();}; //ELENA + void Delete(Option_t *t=""); //ELENA + void Set();//ELENA // // ToFLevel2* GetToFLevel2(){return this;}; + +/** + * Method to get the z-position of the 6 TOF layers from the plane ID + * @param plane_id Plane ID (11 12 21 22 31 32) + */ Float_t GetZTOF(Int_t plane_id){ switch(plane_id){ case 11: return ZTOF11; @@ -106,7 +203,7 @@ default: return 0.; }; }; - + // // Paddles position // @@ -118,14 +215,15 @@ S31 3 paddles 15.0 x 6.0 cm S32 3 paddles 18.0 x 5.0 cm */ - + Int_t GetToFPlaneID(Int_t ip); Int_t GetToFPlaneIndex(Int_t plane_id); Bool_t HitPaddle(Int_t ,Int_t); Int_t GetNHitPaddles(Int_t plane); - void Clear(); + void Clear(Option_t *t=""); // - ClassDef(ToFLevel2,1); + ClassDef(ToFLevel2,3); }; #endif +