]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/TenderSupplies/AliTOFT0makerANA.h
First version of the TenderSupplies for TPC/TOF/TRD
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliTOFT0makerANA.h
1 #ifndef ALITOFT0MAKERANA_H
2 #define ALITOFT0MAKERANA_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliTOFT0makerANA.h,v 1.8 2010/01/19 16:32:20 noferini Exp $ */
7
8 ///////////////////////////////////////////////
9 //                                           //
10 //  Manager class for time zero evaluation   //
11 //  with TOF informations                    //
12 //                                           //
13 ///////////////////////////////////////////////
14
15
16 #include "TObject.h"
17
18 class TH1F;
19 class AliESDEvent;
20
21 class AliTOFT0v2;
22 class AliESDpid;
23
24 class AliTOFT0makerANA : public TObject {
25 public:
26   
27   AliTOFT0makerANA() ;
28   AliTOFT0makerANA(AliESDpid * const externalPID);
29   virtual ~AliTOFT0makerANA() ; // dtor
30   AliTOFT0makerANA(const AliTOFT0makerANA & t);
31   AliTOFT0makerANA & operator=(const AliTOFT0makerANA & t);
32  
33   // return (fCalculated[0]=event time -- fCalculated[1]=sigma event time in ps -- fCalculated[2]=mean event time for each fill -- fCalculated[3]=number of tracks at the TOF level) if you can subtruct the event time -- ...
34   Double_t *RemakePID(AliESDEvent *esd,Double_t t0time=0.,Double_t t0sigma=1000.); // t0time and t0sigma in ps
35
36   void      SetTimeResolution(Double_t timeresolution){fTimeResolution=timeresolution;};// TOF timeresolution in [s] e.g. for 120 ps -> 1.2e-10
37   Double_t  GetTimeResolution() const {return fTimeResolution;}
38   
39   void LoadChannelMap(char *filename="$ALICE_ROOT/TOF/enableMap.104892.root"); //load the enable channel map
40   void ApplyMask(AliESDEvent * const esd);
41   
42   void SetNoTOFT0(Bool_t status=kTRUE){fNoTOFT0=status;}; // disable the TOF T0 info
43   void SetMaskOffChannel(Bool_t status=kTRUE){fKmask=status;}; // swith for the map off channel
44   
45  private:
46   AliESDpid *fPIDesd; //!ESD pid object
47   void TakeTimeRawCorrection(AliESDEvent * const esd);
48   void RemakeTOFpid(/*AliESDEvent *esd,*/Float_t timezero);
49   Double_t GetT0Fill() const;
50   
51   Int_t fnT0; //! total number of T0-TOF
52   Int_t fiT0; //! last T0-TOF used for T0 fill
53   Double_t fT0fill[1000];  //! array for dynamical t0 fill calculation
54   Double_t fT0sigmaTOF[1000]; //! array for dynamical t0 fill resolution
55
56   Bool_t fNoTOFT0;   //! switch to avoid T0-TOF is used
57   
58   Double_t fCalculated[8]; //! contains the parameters with the event time
59   Double_t fTimeResolution;  //! global time resolution used to calculate T0
60   
61   Float_t fT0sigma; //! T0 resolution
62   
63   TH1F *fHmapChannel; //! histo with the channel map
64   Bool_t fKmask; //! switch if you want apply a channel filter
65   
66   static const Int_t fgkNmaxT0step = 500; //number of steps in the t0 fill calculation
67
68   ClassDef(AliTOFT0makerANA,2);  // Calculate the time zero using TOF detector */
69   
70 };
71
72 #endif // ALITOFT0MAKERANA_H