ROOT logo
#ifndef ALITRDEVENTINFO_H
#define ALITRDEVENTINFO_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */
////////////////////////////////////////////////////////////////////////////
//                                                                        //
//  Event info for TRD performance train                                  //
//                                                                        //
//  Authors:                                                              //
//    Markus Fasel <M.Fasel@gsi.de>                                       //
//                                                                        //
////////////////////////////////////////////////////////////////////////////

#include <TObject.h>
#include <TString.h>

class AliESDHeader;
class AliESDRun;
class TH1D;
class AliTRDeventInfo : public TObject{
public:
  enum{
    kCentralityClasses = 5
   ,kLHCbunches = 3500
  };
  AliTRDeventInfo();
  AliTRDeventInfo(AliESDHeader *header, AliESDRun *run);
  AliTRDeventInfo(const AliTRDeventInfo &info);
  AliTRDeventInfo& operator=(const AliTRDeventInfo &info);
  virtual ~AliTRDeventInfo();
  virtual void  Delete(const Option_t *);

  AliESDHeader* GetEventHeader() const                 { return fHeader; }
  AliESDRun*    GetRunInfo() const                     { return fRun; }
  Int_t         GetCentrality() const                  { return fCentrality; }
  static Int_t  GetCentralityBin(Float_t cenPer);
  TString       GetFiredTriggerClasses();
  Int_t         GetMultiplicity() const                { return fMult; }
  static Int_t  GetMultiplicityBin(Int_t n);
  UShort_t      GetBunchFill() const;
  static void   GetListOfIsolatedBunches(TH1D *hbc, Int_t bunchSpacing=10);
  Bool_t        IsOwner() const                        { return TestBit(kOwner); }
  void          SetEventHeader(AliESDHeader *evHeader) { fHeader = evHeader; }
  void          SetRunInfo(AliESDRun *evRun)           { fRun = evRun; }
  void          SetCentrality(Float_t cent)            { fCentrality = cent>=0.?GetCentralityBin(cent):-1;}
  void          SetMultiplicity(Int_t n)               { fMult = n>=0?GetMultiplicityBin(n):-1;}
  void          SetOwner();

private:
  enum{
    kOwner = BIT(14)
  };
  static Int_t const   fgkMultBin[kCentralityClasses-1]; // multiplicity bins
  static Float_t const fgkCentBin[kCentralityClasses-1]; // centrality bins
  AliESDHeader* fHeader;      //! The ESD Header
  AliESDRun*    fRun;         //! The ESD Run Info
  Int_t         fCentrality;  //! Centrality class based on AliCentrality
  Int_t         fMult;        //! Centrality class based on AliMultiplicity

  ClassDef(AliTRDeventInfo, 2) // Event info  relevant for TRD analysis
};
#endif
 AliTRDeventInfo.h:1
 AliTRDeventInfo.h:2
 AliTRDeventInfo.h:3
 AliTRDeventInfo.h:4
 AliTRDeventInfo.h:5
 AliTRDeventInfo.h:6
 AliTRDeventInfo.h:7
 AliTRDeventInfo.h:8
 AliTRDeventInfo.h:9
 AliTRDeventInfo.h:10
 AliTRDeventInfo.h:11
 AliTRDeventInfo.h:12
 AliTRDeventInfo.h:13
 AliTRDeventInfo.h:14
 AliTRDeventInfo.h:15
 AliTRDeventInfo.h:16
 AliTRDeventInfo.h:17
 AliTRDeventInfo.h:18
 AliTRDeventInfo.h:19
 AliTRDeventInfo.h:20
 AliTRDeventInfo.h:21
 AliTRDeventInfo.h:22
 AliTRDeventInfo.h:23
 AliTRDeventInfo.h:24
 AliTRDeventInfo.h:25
 AliTRDeventInfo.h:26
 AliTRDeventInfo.h:27
 AliTRDeventInfo.h:28
 AliTRDeventInfo.h:29
 AliTRDeventInfo.h:30
 AliTRDeventInfo.h:31
 AliTRDeventInfo.h:32
 AliTRDeventInfo.h:33
 AliTRDeventInfo.h:34
 AliTRDeventInfo.h:35
 AliTRDeventInfo.h:36
 AliTRDeventInfo.h:37
 AliTRDeventInfo.h:38
 AliTRDeventInfo.h:39
 AliTRDeventInfo.h:40
 AliTRDeventInfo.h:41
 AliTRDeventInfo.h:42
 AliTRDeventInfo.h:43
 AliTRDeventInfo.h:44
 AliTRDeventInfo.h:45
 AliTRDeventInfo.h:46
 AliTRDeventInfo.h:47
 AliTRDeventInfo.h:48
 AliTRDeventInfo.h:49
 AliTRDeventInfo.h:50
 AliTRDeventInfo.h:51
 AliTRDeventInfo.h:52
 AliTRDeventInfo.h:53
 AliTRDeventInfo.h:54
 AliTRDeventInfo.h:55
 AliTRDeventInfo.h:56
 AliTRDeventInfo.h:57
 AliTRDeventInfo.h:58
 AliTRDeventInfo.h:59
 AliTRDeventInfo.h:60
 AliTRDeventInfo.h:61
 AliTRDeventInfo.h:62
 AliTRDeventInfo.h:63