--- DarthVader/ToFLevel2/inc/ToFLevel2.h 2010/02/05 12:51:41 1.26 +++ DarthVader/ToFLevel2/inc/ToFLevel2.h 2015/03/26 14:55:40 1.36 @@ -35,7 +35,8 @@ #define toftrk toftrk_ extern "C" int toftrk(); #define rdtofcal rdtofcal_ -extern "C" int rdtofcal(char [], int *); +//extern "C" int rdtofcal(char [], int *); +extern "C" int rdtofcal(const char *, int *); // // class which contains track related variables @@ -93,6 +94,8 @@ Float_t adc; ///At(ipmt); } // 0-47 dEdx for each PMT for tracked events // ToFdEdx* GetToFdEdx(){return this;}; - ClassDef(ToFdEdx,2); + ClassDef(ToFdEdx,3); }; @@ -237,7 +240,9 @@ ToFTrkVar* GetToFTrkVar(){return this;}; void Clear(Option_t *t=""); - ClassDef(ToFTrkVar,1); + Float_t CalcBeta(Float_t resmax, Float_t qualitycut, Float_t chi2cut); // Elena 2015 + + ClassDef(ToFTrkVar,2); // }; @@ -255,10 +260,12 @@ TClonesArray *ToFTrk; /// bit 0 = discharging flag on at least one PMT (adc OR tdc), bit 1 = there is at least one PMT off (no tdc nor adc) which is included in the patterntrig, bit 2 = PMTs hit are not enough to match trigger configuration, bit 3 = pattern trig does not match trigger configuration Int_t default_calib; ///< one if the default calibration has been used to process the data, zero otherwise // Float_t GetdEdx(Int_t notrack, Int_t plane, Int_t adcfl); // gf Apr 07 + Float_t GetdEdx(ToFTrkVar *trk, Int_t plane, Int_t adcfl); // gf Apr 07 Float_t CalcBeta(Int_t notrack, Float_t resmax, Float_t qualitycut, Float_t chi2cut); // wm feb 08 @@ -274,20 +281,22 @@ void GetLevel2Struct(cToFLevel2 *) const; // ToFTrkVar *GetToFTrkVar(Int_t notrack); + ToFTrkVar* GetToFStoredTrack(Int_t seqno);///< returns pointer to the track set related to the seqno number ToFPMT *GetToFPMT(Int_t nohit); - Int_t GetPMTid(Int_t gg, Int_t hh); - TString GetPMTName(Int_t ind); + static Int_t GetPMTid(Int_t gg, Int_t hh); + static TString GetPMTName(Int_t ind); - Int_t GetPlaneIndex(Int_t pmt_id); + static 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); + static 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 GetdEdxPaddle(ToFTrkVar *trk, Int_t paddleid, Int_t adcfl, Float_t &PadEdx, Int_t &SatWarning); // gf Apr 07 + static 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 //EMXX Int_t GetPaddleIdOfTrack(Float_t xtr, Float_t ytr, Int_t plane, Float_t margin); // wm jun 2008 - void GetPMTPaddle(Int_t pmt_id, Int_t &plane, Int_t &paddle); // gf Apr 07 + static 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); @@ -297,7 +306,15 @@ // // Int_t Process(TrkLevel2 *trk, TrigLevel2 *trg, GL_RUN *run, OrbitalInfo *orb, Bool_t force); // Emiliano - + + // + // + bool bit(int decimal, char pos); + bool checkPMT(TString givenpmt); + bool checkPMTpatternPMThit(TrigLevel2 *trg, int &pmtpattern, int &pmtnosignal); + bool checkPMTpmttrig(TrigLevel2 *trg); + void printPMT(); + // // constructor // @@ -339,11 +356,19 @@ Int_t GetToFPlaneID(Int_t ip); Int_t GetToFPlaneIndex(Int_t plane_id); - Bool_t HitPaddle(Int_t ,Int_t); + Bool_t HitPaddle(Int_t ,Int_t); // EMXX Int_t GetNHitPaddles(Int_t plane); + Int_t GetTrueNHitPaddles(Int_t plane); void Clear(Option_t *t=""); + + // + TClonesArray *GetTrackArray(){return ToFTrk;} ///< returns a pointer to the track related variables array + TClonesArray** GetPointerToTrackArray(){return &ToFTrk;}///< returns pointer to pointer to the track array + void SetTrackArray(TClonesArray *track);///