adding an option to set OCDB drain
[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"
befa9db4 25class AliCentrality;
ce7adfe9 26class AliEventplane;
ae2bccf1 27class AliVVZERO;
16d867eb 28class AliVZDC;
6bc03c45 29
30class AliVEvent : public TObject {
31
32public:
0c6c629b 33 enum EOfflineTriggerTypes {
1209509c 34 kMB = BIT(0), // Minimum bias trigger, i.e. interaction trigger, offline SPD or V0 selection
35 // empty slot
28cbc692 36 kINT7 = BIT(1), // V0AND trigger, offline V0 selection
0c6c629b 37 kMUON = BIT(2), // Muon trigger, offline SPD or V0 selection
38 kHighMult = BIT(3), // High-multiplicity trigger (threshold defined online), offline SPD or V0 selection
6e98539d 39 kEMC1 = BIT(4), // EMCAL trigger
fcfb3d3a 40 kCINT5 = BIT(5), // Minimum bias trigger without SPD. i.e. interaction trigger, offline V0 selection
41 kCMUS5 = BIT(6), // Muon trigger, offline V0 selection
28cbc692 42 kMUSH7 = BIT(7), // Muon trigger: high pt, single muon, offline V0 selection, CINT7 suite
43 kMUL7 = BIT(8), // Muon trigger: like sign dimuon, offline V0 selection, CINT7 suite
44 kMUU7 = BIT(9), // Muon trigger, unlike sign dimuon, offline V0 selection, CINT7 suite
45 kEMC7 = BIT(10), // EMCAL trigger, CINT7 suite
baf9cdf8 46 kMUS7 = BIT(11), // Muon trigger: low pt, single muon, offline V0 selection, CINT7 suite
6340be16 47 kFastOnly = BIT(30), // The fast cluster fired. This bit is set in to addition another trigger bit, e.g. kMB
0c6c629b 48 kUserDefined = BIT(31), // Set when custom trigger classes are set in AliPhysicsSelection, offline SPD or V0 selection
baf9cdf8 49 kAny = 0xffffffff, // to accept any trigger
1173a0c9 50 kAnyINT = kMB | kINT7 | kCINT5 // to accept any interaction (aka minimum bias) trigger
0c6c629b 51 };
6bc03c45 52
53 AliVEvent() { }
54 virtual ~AliVEvent() { }
55 AliVEvent(const AliVEvent& vEvnt);
56 AliVEvent& operator=(const AliVEvent& vEvnt);
57
58 // Services
59 virtual void AddObject(TObject* obj) = 0;
2811495d 60 virtual TObject* FindListObject(const char *name) const = 0;
6bc03c45 61 virtual TList* GetList() const = 0;
62
63 virtual void CreateStdContent() = 0;
64 virtual void GetStdContent() = 0;
65
1d0dd492 66 virtual void ReadFromTree(TTree *tree, Option_t* opt) = 0;
f12d42ce 67 virtual void WriteToTree(TTree* tree) const = 0;
6bc03c45 68
ec8aded8 69 virtual void Reset() = 0;
6bc03c45 70 //virtual void ResetStdContent() = 0;
71 virtual void SetStdNames() = 0;
72
73 virtual void Print(Option_t *option="") const = 0;
74
75 // Header
76 virtual AliVHeader* GetHeader() const = 0;
77
78 // Delegated methods for fESDRun or AODHeader
79
80 virtual void SetRunNumber(Int_t n) = 0;
81 virtual void SetPeriodNumber(UInt_t n) = 0;
82 virtual void SetMagneticField(Double_t mf) = 0;
83
84 virtual Int_t GetRunNumber() const = 0;
85 virtual UInt_t GetPeriodNumber() const = 0;
86 virtual Double_t GetMagneticField() const = 0;
87
5303c167 88 virtual Double_t GetDiamondX() const {return -999.;}
89 virtual Double_t GetDiamondY() const {return -999.;}
90 virtual void GetDiamondCovXY(Float_t cov[3]) const
91 {cov[0]=-999.; return;}
92
6bc03c45 93 // Delegated methods for fHeader
94 virtual void SetOrbitNumber(UInt_t n) = 0;
95 virtual void SetBunchCrossNumber(UShort_t n) = 0;
96 virtual void SetEventType(UInt_t eventType)= 0;
97 virtual void SetTriggerMask(ULong64_t n) = 0;
98 virtual void SetTriggerCluster(UChar_t n) = 0;
99
100 virtual UInt_t GetOrbitNumber() const = 0;
101 virtual UShort_t GetBunchCrossNumber() const = 0;
102 virtual UInt_t GetEventType() const = 0;
103 virtual ULong64_t GetTriggerMask() const = 0;
104 virtual UChar_t GetTriggerCluster() const = 0;
105
106 virtual Double_t GetZDCN1Energy() const = 0;
107 virtual Double_t GetZDCP1Energy() const = 0;
108 virtual Double_t GetZDCN2Energy() const = 0;
109 virtual Double_t GetZDCP2Energy() const = 0;
a85132e7 110 virtual Double_t GetZDCEMEnergy(Int_t i) const = 0;
6bc03c45 111
112 // Tracks
113 virtual AliVParticle *GetTrack(Int_t i) const = 0;
114 //virtual Int_t AddTrack(const AliVParticle *t) = 0;
115 virtual Int_t GetNumberOfTracks() const = 0;
c1b93f02 116 virtual Int_t GetNumberOfV0s() const = 0;
bc0379e5 117 virtual Int_t GetNumberOfCascades() const = 0;
6bc03c45 118
c8fe2783 119 // Calorimeter Clusters/Cells
120 virtual AliVCluster *GetCaloCluster(Int_t) const {return 0;}
121 virtual Int_t GetNumberOfCaloClusters() const {return 0;}
122 virtual Int_t GetEMCALClusters(TRefArray *) const {return 0;}
123 virtual Int_t GetPHOSClusters (TRefArray *) const {return 0;}
124 virtual AliVCaloCells *GetEMCALCells() const {return 0;}
125 virtual AliVCaloCells *GetPHOSCells() const {return 0;}
126 const TGeoHMatrix* GetPHOSMatrix(Int_t /*i*/) const {return NULL;}
127 const TGeoHMatrix* GetEMCALMatrix(Int_t /*i*/) const {return NULL;}
128
129
5303c167 130 // Primary vertex
131 virtual const AliVVertex *GetPrimaryVertex() const {return 0x0;}
a98c78e5 132 virtual Bool_t IsPileupFromSPD(Int_t /*minContributors*/,
133 Double_t /*minZdist*/,
134 Double_t /*nSigmaZdist*/,
135 Double_t /*nSigmaDiamXY*/,
136 Double_t /*nSigmaDiamZ*/)
137 const{
138 return kFALSE;
139 }
b46ff4b0 140
141 virtual Bool_t IsPileupFromSPDInMultBins() const {
142 return kFALSE;
143 }
befa9db4 144 virtual AliCentrality* GetCentrality() = 0;
ce7adfe9 145 virtual AliEventplane* GetEventplane() = 0;
befa9db4 146 virtual Int_t EventIndex(Int_t itrack) const = 0;
147 virtual Int_t EventIndexForCaloCluster(Int_t iclu) const = 0;
148 virtual Int_t EventIndexForPHOSCell(Int_t icell) const = 0;
149 virtual Int_t EventIndexForEMCALCell(Int_t icell) const = 0;
6bc03c45 150
16d867eb 151 virtual AliVVZERO *GetVZEROData() const = 0;
152 virtual AliVZDC *GetZDCData() const = 0;
ae2bccf1 153
a8e24688 154 ClassDef(AliVEvent,1) // base class for AliEvent data
6bc03c45 155};
156#endif
157