--- DarthVader/ToFLevel2/inc/ToFLevel2.h 2007/04/30 15:46:28 1.16 +++ DarthVader/ToFLevel2/inc/ToFLevel2.h 2010/02/05 12:51:41 1.26 @@ -1,6 +1,6 @@ /** * \file ToFLevel2.h - * \author Gianfranca DeRosa / Wolfgang Menn + * \author Gianfranca DeRosa / Wolfgang Menn / Rita Carbone with E. M. supervision */ #ifndef ToFLevel2_h @@ -11,8 +11,31 @@ #include #include +#include // EMILIANO +#include // from ToFLevel2.cpp +#include // Emiliano +#include // Emiliano +#include // Emiliano + + #include +#include // Emiliano +#include // Emiliano +#include // Emiliano +#include // Emiliano +#include // Emiliano +#include + +// +// Declaration of the core fortran routines +// +#define tofl2com tofl2com_ +extern "C" int tofl2com(); +#define toftrk toftrk_ +extern "C" int toftrk(); +#define rdtofcal rdtofcal_ +extern "C" int rdtofcal(char [], int *); // // class which contains track related variables @@ -25,6 +48,35 @@ #define ZTOF32 -24.34 +class ToFGeom : public TObject { + +private: + TArrayI ePlane, eXY; + +public: + ToFGeom() { + int plane[24] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, + 2, 2, + 3, 3, + 4, 4, 4, + 5, 5, 5 + }; + int plXY[6]= { 2, 1, 1, 2, 2, 1 }; // X==1, Y==2 */ + ePlane.Set(24,plane); + eXY.Set(6,plXY); + } + + int GetPad( int idpmt) { return (int)((idpmt+0.5)/2.); } + int GetPlane( int idpmt) { return ePlane[ GetPad(idpmt) ]; } + int GetXY( int idpmt) { return eXY[ GetPlane(idpmt) ]; } + + ClassDef(ToFGeom,1); + +}; + + /** * \brief Class which contains the PMT data * @@ -38,18 +90,87 @@ public: 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]; // @@ -108,7 +235,7 @@ ToFTrkVar(const ToFTrkVar&); ToFTrkVar* GetToFTrkVar(){return this;}; - void Clear(); + void Clear(Option_t *t=""); ClassDef(ToFTrkVar,1); // @@ -127,10 +254,16 @@ TClonesArray *PMT; ///