]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/TRD/info/AliTRDeventInfo.h
Cleanup
[u/mrichter/AliRoot.git] / PWGPP / TRD / info / AliTRDeventInfo.h
1 #ifndef ALITRDEVENTINFO_H
2 #define ALITRDEVENTINFO_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6 ////////////////////////////////////////////////////////////////////////////
7 //                                                                        //
8 //  Event info for TRD performance train                                  //
9 //                                                                        //
10 //  Authors:                                                              //
11 //    Markus Fasel <M.Fasel@gsi.de>                                       //
12 //                                                                        //
13 ////////////////////////////////////////////////////////////////////////////
14
15 #include <TObject.h>
16
17 class AliESDHeader;
18 class AliESDRun;
19 class TH1D;
20 class AliTRDeventInfo : public TObject{
21 public:
22   enum{
23     kCentralityClasses = 5
24    ,kLHCbunches = 3500
25   };
26   AliTRDeventInfo();
27   AliTRDeventInfo(AliESDHeader *header, AliESDRun *run);
28   AliTRDeventInfo(const AliTRDeventInfo &info);
29   AliTRDeventInfo& operator=(const AliTRDeventInfo &info);
30   virtual ~AliTRDeventInfo();
31   virtual void  Delete(const Option_t *);
32
33   AliESDHeader* GetEventHeader() const                 { return fHeader; }
34   AliESDRun*    GetRunInfo() const                     { return fRun; }
35   Int_t         GetCentrality() const                  { return fCentrality; }
36   static Int_t  GetCentralityBin(Float_t cenPer);
37   Int_t         GetMultiplicity() const                { return fMult; }
38   static Int_t  GetMultiplicityBin(Int_t n);
39   UShort_t      GetBunchFill() const;
40   static void   GetListOfIsolatedBunches(TH1D *hbc, Int_t bunchSpacing=10);
41   Bool_t        IsOwner() const                        { return TestBit(kOwner); }
42   void          SetEventHeader(AliESDHeader *evHeader) { fHeader = evHeader; }
43   void          SetRunInfo(AliESDRun *evRun)           { fRun = evRun; }
44   void          SetCentrality(Float_t cent)            { fCentrality = cent>=0.?GetCentralityBin(cent):-1;}
45   void          SetMultiplicity(Int_t n)               { fMult = n>=0?GetMultiplicityBin(n):-1;}
46   void          SetOwner();
47
48 private:
49   enum{
50     kOwner = BIT(14)
51   };
52   static Int_t const   fgkMultBin[kCentralityClasses-1]; // multiplicity bins
53   static Float_t const fgkCentBin[kCentralityClasses-1]; // centrality bins
54   AliESDHeader* fHeader;      //! The ESD Header
55   AliESDRun*    fRun;         //! The ESD Run Info
56   Int_t         fCentrality;  //! Centrality class based on AliCentrality
57   Int_t         fMult;        //! Centrality class based on AliMultiplicity
58
59   ClassDef(AliTRDeventInfo, 2) // Event info  relevant for TRD analysis
60 };
61 #endif