Various fixes
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliVEvent.h
CommitLineData
6bc03c45 1// -*- mode: C++ -*-
2#ifndef ALIVEVENT_H
3#define ALIVEVENT_H
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7
8/* $Id$ */
9
10//-------------------------------------------------------------------------
11// Class AliVEvent
12//
13// Origin: Markus Oldenburg, CERN, Markus.Oldenburg@cern.ch
14//-------------------------------------------------------------------------
15
16#include <TObject.h>
17#include <TTree.h>
c8fe2783 18#include <TGeoMatrix.h>
6bc03c45 19#include "AliVHeader.h"
20#include "AliVParticle.h"
5303c167 21#include "AliVVertex.h"
c8fe2783 22#include "AliVCluster.h"
23#include "AliVCaloCells.h"
35799643 24#include "AliVCaloTrigger.h"
c8fe2783 25#include "TRefArray.h"
5f8db5fe 26#include "AliTOFHeader.h"
9aa7ebff 27#include "AliVTrdTrack.h"
befa9db4 28class AliCentrality;
ce7adfe9 29class AliEventplane;
ae2bccf1 30class AliVVZERO;
16d867eb 31class AliVZDC;
820b4d9e 32class AliVMFT; // AU
6bc03c45 33
34class AliVEvent : public TObject {
35
36public:
0c6c629b 37 enum EOfflineTriggerTypes {
1209509c 38 kMB = BIT(0), // Minimum bias trigger, i.e. interaction trigger, offline SPD or V0 selection
28cbc692 39 kINT7 = BIT(1), // V0AND trigger, offline V0 selection
0c6c629b 40 kMUON = BIT(2), // Muon trigger, offline SPD or V0 selection
41 kHighMult = BIT(3), // High-multiplicity trigger (threshold defined online), offline SPD or V0 selection
6e98539d 42 kEMC1 = BIT(4), // EMCAL trigger
fcfb3d3a 43 kCINT5 = BIT(5), // Minimum bias trigger without SPD. i.e. interaction trigger, offline V0 selection
44 kCMUS5 = BIT(6), // Muon trigger, offline V0 selection
889c27e3 45 kMUSPB = BIT(6), // idem for PbPb
28cbc692 46 kMUSH7 = BIT(7), // Muon trigger: high pt, single muon, offline V0 selection, CINT7 suite
889c27e3 47 kMUSHPB = BIT(7), // idem for PbPb
28cbc692 48 kMUL7 = BIT(8), // Muon trigger: like sign dimuon, offline V0 selection, CINT7 suite
889c27e3 49 kMuonLikePB = BIT(8), // idem for PbPb
28cbc692 50 kMUU7 = BIT(9), // Muon trigger, unlike sign dimuon, offline V0 selection, CINT7 suite
889c27e3 51 kMuonUnlikePB = BIT(9), // idem for PbPb
28cbc692 52 kEMC7 = BIT(10), // EMCAL trigger, CINT7 suite
c38a56cf 53 kEMC8 = BIT(10), // EMCAL trigger, CINT8 suite
baf9cdf8 54 kMUS7 = BIT(11), // Muon trigger: low pt, single muon, offline V0 selection, CINT7 suite
a5770144 55 kPHI1 = BIT(12), // PHOS trigger, CINT1 suite
56 kPHI7 = BIT(13), // PHOS trigger, CINT7 suite
c38a56cf 57 kPHI8 = BIT(13), // PHOS trigger, CINT8 suite
f4e3ff14 58 kPHOSPb = BIT(13), // idem for PbPb
889c27e3 59 kEMCEJE = BIT(14), // EMCAL jet patch trigger
60 kEMCEGA = BIT(15), // EMCAL gamma trigger
61 kCentral = BIT(16), // PbPb central collision trigger
62 kSemiCentral = BIT(17), // PbPb semicentral collision trigger
7a4eb25e 63 kDG5 = BIT(18), // Double gap diffractive
b0801932 64 kZED = BIT(19), // ZDC electromagnetic dissociation
8d5a14d6 65 kSPI7 = BIT(20), // Power interaction trigger
47b54612 66 kSPI = BIT(20), // Power interaction trigger
8d5a14d6 67 kINT8 = BIT(21), // CINT8 trigger: 0TVX (T0 vertex) triger
68 kMuonSingleLowPt8 = BIT(22), // Muon trigger : single muon, low pt, T0 selection, CINT8 suite
69 kMuonSingleHighPt8 = BIT(23), // Muon trigger : single muon, high pt, T0 selection, CINT8 suite
70 kMuonLikeLowPt8 = BIT(24), // Muon trigger : like sign muon, low pt, T0 selection, CINT8 suite
71 kMuonUnlikeLowPt8 = BIT(25), // Muon trigger : unlike sign muon, low pt, T0 selection, CINT8 suite
9dc0a573 72 kMuonUnlikeLowPt0 = BIT(26), // Muon trigger : unlike sign muon, low pt, no additional L0 requirement
ec078225 73 kUserDefined = BIT(27), // Set when custom trigger classes are set in AliPhysicsSelection, offline SPD or V0 selection
045fe43d 74 kTRD = BIT(28), // TRD trigger
75 // Bits 29 and above are reserved for FLAGS
6340be16 76 kFastOnly = BIT(30), // The fast cluster fired. This bit is set in to addition another trigger bit, e.g. kMB
baf9cdf8 77 kAny = 0xffffffff, // to accept any trigger
9dc0a573 78 kAnyINT = kMB | kINT7 | kCINT5 | kINT8 | kSPI7 // to accept any interaction (aka minimum bias) trigger
0c6c629b 79 };
6bc03c45 80
81 AliVEvent() { }
82 virtual ~AliVEvent() { }
83 AliVEvent(const AliVEvent& vEvnt);
84 AliVEvent& operator=(const AliVEvent& vEvnt);
85
86 // Services
87 virtual void AddObject(TObject* obj) = 0;
2811495d 88 virtual TObject* FindListObject(const char *name) const = 0;
6bc03c45 89 virtual TList* GetList() const = 0;
90
91 virtual void CreateStdContent() = 0;
92 virtual void GetStdContent() = 0;
93
1d0dd492 94 virtual void ReadFromTree(TTree *tree, Option_t* opt) = 0;
f12d42ce 95 virtual void WriteToTree(TTree* tree) const = 0;
6bc03c45 96
ec8aded8 97 virtual void Reset() = 0;
6bc03c45 98 //virtual void ResetStdContent() = 0;
99 virtual void SetStdNames() = 0;
100
101 virtual void Print(Option_t *option="") const = 0;
102
103 // Header
104 virtual AliVHeader* GetHeader() const = 0;
105
106 // Delegated methods for fESDRun or AODHeader
107
108 virtual void SetRunNumber(Int_t n) = 0;
109 virtual void SetPeriodNumber(UInt_t n) = 0;
110 virtual void SetMagneticField(Double_t mf) = 0;
111
112 virtual Int_t GetRunNumber() const = 0;
113 virtual UInt_t GetPeriodNumber() const = 0;
114 virtual Double_t GetMagneticField() const = 0;
115
5303c167 116 virtual Double_t GetDiamondX() const {return -999.;}
117 virtual Double_t GetDiamondY() const {return -999.;}
118 virtual void GetDiamondCovXY(Float_t cov[3]) const
119 {cov[0]=-999.; return;}
120
6bc03c45 121 // Delegated methods for fHeader
122 virtual void SetOrbitNumber(UInt_t n) = 0;
123 virtual void SetBunchCrossNumber(UShort_t n) = 0;
124 virtual void SetEventType(UInt_t eventType)= 0;
125 virtual void SetTriggerMask(ULong64_t n) = 0;
126 virtual void SetTriggerCluster(UChar_t n) = 0;
127
128 virtual UInt_t GetOrbitNumber() const = 0;
129 virtual UShort_t GetBunchCrossNumber() const = 0;
130 virtual UInt_t GetEventType() const = 0;
131 virtual ULong64_t GetTriggerMask() const = 0;
132 virtual UChar_t GetTriggerCluster() const = 0;
6b3a0436 133 virtual TString GetFiredTriggerClasses() const = 0;
6bc03c45 134 virtual Double_t GetZDCN1Energy() const = 0;
135 virtual Double_t GetZDCP1Energy() const = 0;
136 virtual Double_t GetZDCN2Energy() const = 0;
137 virtual Double_t GetZDCP2Energy() const = 0;
a85132e7 138 virtual Double_t GetZDCEMEnergy(Int_t i) const = 0;
6bc03c45 139
140 // Tracks
141 virtual AliVParticle *GetTrack(Int_t i) const = 0;
142 //virtual Int_t AddTrack(const AliVParticle *t) = 0;
143 virtual Int_t GetNumberOfTracks() const = 0;
c1b93f02 144 virtual Int_t GetNumberOfV0s() const = 0;
bc0379e5 145 virtual Int_t GetNumberOfCascades() const = 0;
6bc03c45 146
5f8db5fe 147 // TOF header and T0 methods
148 virtual const AliTOFHeader *GetTOFHeader() const {return NULL;}
149 virtual Float_t GetEventTimeSpread() const {return 0.;}
150 virtual Float_t GetTOFTimeResolution() const {return 0.;}
151 virtual Double32_t GetT0TOF(Int_t icase) const {return 0.0*icase;}
152 virtual const Double32_t * GetT0TOF() const {return NULL;}
78cbd205 153 virtual Float_t GetT0spread(Int_t /*i*/) const {return 0.;}
5f8db5fe 154
c8fe2783 155 // Calorimeter Clusters/Cells
156 virtual AliVCluster *GetCaloCluster(Int_t) const {return 0;}
157 virtual Int_t GetNumberOfCaloClusters() const {return 0;}
158 virtual Int_t GetEMCALClusters(TRefArray *) const {return 0;}
159 virtual Int_t GetPHOSClusters (TRefArray *) const {return 0;}
160 virtual AliVCaloCells *GetEMCALCells() const {return 0;}
161 virtual AliVCaloCells *GetPHOSCells() const {return 0;}
162 const TGeoHMatrix* GetPHOSMatrix(Int_t /*i*/) const {return NULL;}
163 const TGeoHMatrix* GetEMCALMatrix(Int_t /*i*/) const {return NULL;}
35799643 164 virtual AliVCaloTrigger *GetCaloTrigger(TString /*calo*/) const {return NULL;}
c8fe2783 165
166
5303c167 167 // Primary vertex
168 virtual const AliVVertex *GetPrimaryVertex() const {return 0x0;}
a98c78e5 169 virtual Bool_t IsPileupFromSPD(Int_t /*minContributors*/,
170 Double_t /*minZdist*/,
171 Double_t /*nSigmaZdist*/,
172 Double_t /*nSigmaDiamXY*/,
173 Double_t /*nSigmaDiamZ*/)
174 const{
175 return kFALSE;
176 }
b46ff4b0 177
178 virtual Bool_t IsPileupFromSPDInMultBins() const {
179 return kFALSE;
180 }
befa9db4 181 virtual AliCentrality* GetCentrality() = 0;
ce7adfe9 182 virtual AliEventplane* GetEventplane() = 0;
befa9db4 183 virtual Int_t EventIndex(Int_t itrack) const = 0;
184 virtual Int_t EventIndexForCaloCluster(Int_t iclu) const = 0;
185 virtual Int_t EventIndexForPHOSCell(Int_t icell) const = 0;
186 virtual Int_t EventIndexForEMCALCell(Int_t icell) const = 0;
6bc03c45 187
16d867eb 188 virtual AliVVZERO *GetVZEROData() const = 0;
5e14e698 189 virtual const Float_t* GetVZEROEqFactors() const {return NULL;}
190 virtual Float_t GetVZEROEqMultiplicity(Int_t /* i */) const {return -1;}
cc4d0e9c 191 virtual void SetVZEROEqFactors(Float_t /* factors */[64]) const {return;}
16d867eb 192 virtual AliVZDC *GetZDCData() const = 0;
ae2bccf1 193
9aa7ebff 194 virtual Int_t GetNumberOfTrdTracks() const { return 0; }
195 virtual AliVTrdTrack* GetTrdTrack(Int_t /* iTrack */) const { return 0x0; }
196
ef7661fd 197 virtual Int_t GetNumberOfESDTracks() const { return 0; }
198
5e14e698 199 ClassDef(AliVEvent,2) // base class for AliEvent data
6bc03c45 200};
201#endif
202