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