*** V interface for TPCCalibTasks ***
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliVEvent.h
... / ...
CommitLineData
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>
18#include <TGeoMatrix.h>
19#include "AliVHeader.h"
20#include "AliVParticle.h"
21#include "AliVVertex.h"
22#include "AliVCluster.h"
23#include "AliVCaloCells.h"
24#include "AliVCaloTrigger.h"
25#include "TRefArray.h"
26#include "AliTOFHeader.h"
27#include "AliVTrdTrack.h"
28
29class AliVfriendEvent;
30class AliCentrality;
31class AliEventplane;
32class AliVVZERO;
33class AliVZDC;
34class AliVMFT; // AU
35class AliESDkink;
36class AliESDv0;
37class AliESDVertex;
38class AliVTrack;
39
40class AliVEvent : public TObject {
41 private:
42 // disable some methods from AliVEvent interface
43
44 ULong64_t GetTriggerMaskNext50() const { return 0; }
45
46public:
47 enum EOfflineTriggerTypes {
48 kMB = BIT(0), // Minimum bias trigger, i.e. interaction trigger, offline SPD or V0 selection
49 kINT7 = BIT(1), // V0AND trigger, offline V0 selection
50 kMUON = BIT(2), // Muon trigger, offline SPD or V0 selection
51 kHighMult = BIT(3), // High-multiplicity trigger (threshold defined online), offline SPD or V0 selection
52 kEMC1 = BIT(4), // EMCAL trigger
53 kCINT5 = BIT(5), // Minimum bias trigger without SPD. i.e. interaction trigger, offline V0 selection
54 kCMUS5 = BIT(6), // Muon trigger, offline V0 selection
55 kMUSPB = BIT(6), // idem for PbPb
56 kMUSH7 = BIT(7), // Muon trigger: high pt, single muon, offline V0 selection, CINT7 suite
57 kMUSHPB = BIT(7), // idem for PbPb
58 kMUL7 = BIT(8), // Muon trigger: like sign dimuon, offline V0 selection, CINT7 suite
59 kMuonLikePB = BIT(8), // idem for PbPb
60 kMUU7 = BIT(9), // Muon trigger, unlike sign dimuon, offline V0 selection, CINT7 suite
61 kMuonUnlikePB = BIT(9), // idem for PbPb
62 kEMC7 = BIT(10), // EMCAL trigger, CINT7 suite
63 kEMC8 = BIT(10), // EMCAL trigger, CINT8 suite
64 kMUS7 = BIT(11), // Muon trigger: low pt, single muon, offline V0 selection, CINT7 suite
65 kPHI1 = BIT(12), // PHOS trigger, CINT1 suite
66 kPHI7 = BIT(13), // PHOS trigger, CINT7 suite
67 kPHI8 = BIT(13), // PHOS trigger, CINT8 suite
68 kPHOSPb = BIT(13), // idem for PbPb
69 kEMCEJE = BIT(14), // EMCAL jet patch trigger
70 kEMCEGA = BIT(15), // EMCAL gamma trigger
71 kCentral = BIT(16), // PbPb central collision trigger
72 kSemiCentral = BIT(17), // PbPb semicentral collision trigger
73 kDG5 = BIT(18), // Double gap diffractive
74 kZED = BIT(19), // ZDC electromagnetic dissociation
75 kSPI7 = BIT(20), // Power interaction trigger
76 kSPI = BIT(20), // Power interaction trigger
77 kINT8 = BIT(21), // CINT8 trigger: 0TVX (T0 vertex) triger
78 kMuonSingleLowPt8 = BIT(22), // Muon trigger : single muon, low pt, T0 selection, CINT8 suite
79 kMuonSingleHighPt8 = BIT(23), // Muon trigger : single muon, high pt, T0 selection, CINT8 suite
80 kMuonLikeLowPt8 = BIT(24), // Muon trigger : like sign muon, low pt, T0 selection, CINT8 suite
81 kMuonUnlikeLowPt8 = BIT(25), // Muon trigger : unlike sign muon, low pt, T0 selection, CINT8 suite
82 kMuonUnlikeLowPt0 = BIT(26), // Muon trigger : unlike sign muon, low pt, no additional L0 requirement
83 kUserDefined = BIT(27), // Set when custom trigger classes are set in AliPhysicsSelection, offline SPD or V0 selection
84 kTRD = BIT(28), // TRD trigger
85 // Bits 29 and above are reserved for FLAGS
86 kFastOnly = BIT(30), // The fast cluster fired. This bit is set in to addition another trigger bit, e.g. kMB
87 kAny = 0xffffffff, // to accept any trigger
88 kAnyINT = kMB | kINT7 | kCINT5 | kINT8 | kSPI7 // to accept any interaction (aka minimum bias) trigger
89 };
90
91 AliVEvent() { }
92 virtual ~AliVEvent() { }
93 AliVEvent(const AliVEvent& vEvnt);
94 AliVEvent& operator=(const AliVEvent& vEvnt);
95
96 // Services
97 virtual void AddObject(TObject* obj) = 0;
98 virtual TObject* FindListObject(const char *name) const = 0;
99 virtual TList* GetList() const = 0;
100
101 virtual void CreateStdContent() = 0;
102 virtual void GetStdContent() = 0;
103
104 virtual void ReadFromTree(TTree *tree, Option_t* opt) = 0;
105 virtual void WriteToTree(TTree* tree) const = 0;
106
107 virtual void Reset() = 0;
108 //virtual void ResetStdContent() = 0;
109 virtual void SetStdNames() = 0;
110
111 virtual void Print(Option_t *option="") const = 0;
112
113 // Header
114 virtual AliVHeader* GetHeader() const = 0;
115 //
116 // field initialization
117 virtual Bool_t InitMagneticField() const {return kFALSE;}
118
119 // Delegated methods for fESDRun or AODHeader
120
121 virtual void SetRunNumber(Int_t n) = 0;
122 virtual void SetPeriodNumber(UInt_t n) = 0;
123 virtual void SetMagneticField(Double_t mf) = 0;
124
125 virtual Int_t GetRunNumber() const = 0;
126 virtual UInt_t GetPeriodNumber() const = 0;
127 virtual Double_t GetMagneticField() const = 0;
128
129 virtual Double_t GetDiamondX() const {return -999.;}
130 virtual Double_t GetDiamondY() const {return -999.;}
131 virtual void GetDiamondCovXY(Float_t cov[3]) const
132 {cov[0]=-999.; return;}
133
134 // Delegated methods for fHeader
135 virtual void SetOrbitNumber(UInt_t n) = 0;
136 virtual void SetBunchCrossNumber(UShort_t n) = 0;
137 virtual void SetEventType(UInt_t eventType)= 0;
138 virtual void SetTriggerMask(ULong64_t n) = 0;
139 virtual void SetTriggerCluster(UChar_t n) = 0;
140
141 virtual UInt_t GetOrbitNumber() const = 0;
142 virtual UShort_t GetBunchCrossNumber() const = 0;
143 virtual UInt_t GetEventType() const = 0;
144 virtual ULong64_t GetTriggerMask() const = 0;
145 virtual UChar_t GetTriggerCluster() const = 0;
146 virtual TString GetFiredTriggerClasses() const = 0;
147 virtual Double_t GetZDCN1Energy() const = 0;
148 virtual Double_t GetZDCP1Energy() const = 0;
149 virtual Double_t GetZDCN2Energy() const = 0;
150 virtual Double_t GetZDCP2Energy() const = 0;
151 virtual Double_t GetZDCEMEnergy(Int_t i) const = 0;
152
153 // Tracks
154 virtual AliVParticle *GetTrack(Int_t i) const = 0;
155 virtual AliVTrack *GetVTrack(Int_t /*i*/) const {return NULL;}
156 //virtual Int_t AddTrack(const AliVParticle *t) = 0;
157 virtual Int_t GetNumberOfTracks() const = 0;
158 virtual Int_t GetNumberOfV0s() const = 0;
159 virtual Int_t GetNumberOfCascades() const = 0;
160
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;}
167 virtual Float_t GetT0spread(Int_t /*i*/) const {return 0.;}
168
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;}
178 virtual AliVCaloTrigger *GetCaloTrigger(TString /*calo*/) const {return NULL;}
179
180 virtual Bool_t IsPileupFromSPD(Int_t /*minContributors*/,
181 Double_t /*minZdist*/,
182 Double_t /*nSigmaZdist*/,
183 Double_t /*nSigmaDiamXY*/,
184 Double_t /*nSigmaDiamZ*/)
185 const{
186 return kFALSE;
187 }
188
189 virtual Bool_t IsPileupFromSPDInMultBins() const {
190 return kFALSE;
191 }
192 virtual AliCentrality* GetCentrality() = 0;
193 virtual AliEventplane* GetEventplane() = 0;
194 virtual Int_t EventIndex(Int_t itrack) const = 0;
195 virtual Int_t EventIndexForCaloCluster(Int_t iclu) const = 0;
196 virtual Int_t EventIndexForPHOSCell(Int_t icell) const = 0;
197 virtual Int_t EventIndexForEMCALCell(Int_t icell) const = 0;
198
199 virtual AliVVZERO *GetVZEROData() const = 0;
200 virtual const Float_t* GetVZEROEqFactors() const {return NULL;}
201 virtual Float_t GetVZEROEqMultiplicity(Int_t /* i */) const {return -1;}
202 virtual void SetVZEROEqFactors(Float_t /* factors */[64]) const {return;}
203 virtual AliVZDC *GetZDCData() const = 0;
204
205 virtual Int_t GetNumberOfTrdTracks() const { return 0; }
206 virtual AliVTrdTrack* GetTrdTrack(Int_t /* iTrack */) const { return 0x0; }
207
208 virtual Int_t GetNumberOfESDTracks() const { return 0; }
209 virtual Int_t GetEventNumberInFile() const {return 0;}
210
211 //used in calibration:
212 virtual Int_t GetV0(AliESDv0&, Int_t /*iv0*/) const {return 0;}
213 virtual UInt_t GetTimeStamp() const { return 0; }
214 virtual AliVfriendEvent* FindFriend() const { return 0; }
215 virtual UInt_t GetEventSpecie() const { return 0; }
216 virtual AliESDkink* GetKink(Int_t /*i*/) const { return NULL; }
217 virtual Int_t GetNumberOfKinks() const { return 0; }
218
219 // Primary vertex
220 virtual const AliVVertex *GetPrimaryVertex() const {return 0x0;}
221 //virtual const AliVVertex *GetPrimaryVertexSPD() const {return 0x0;}
222 //virtual const AliVVertex *GetPrimaryVertexTPC() const {return 0x0;}
223 //virtual const AliVVertex *GetPrimaryVertexTracks() const {return 0x0;}
224
225 virtual Int_t GetPrimaryVertex( AliESDVertex & ) const {return 0;}
226 virtual Int_t GetPrimaryVertexTPC( AliESDVertex & ) const {return 0;}
227 virtual Int_t GetPrimaryVertexSPD( AliESDVertex & ) const {return 0;}
228 virtual Int_t GetPrimaryVertexTracks( AliESDVertex & ) const {return 0;}
229
230 virtual void ConnectTracks() {}
231
232 ClassDef(AliVEvent, 3) // base class for AliEvent data
233};
234#endif
235