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