OADB Classes for the physics selection and filling scheme
[u/mrichter/AliRoot.git] / STEER / 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;
6bc03c45 28
29class AliVEvent : public TObject {
30
31public:
0c6c629b 32 enum EOfflineTriggerTypes {
1209509c 33 kMB = BIT(0), // Minimum bias trigger, i.e. interaction trigger, offline SPD or V0 selection
34 // empty slot
0c6c629b 35 kMUON = BIT(2), // Muon trigger, offline SPD or V0 selection
36 kHighMult = BIT(3), // High-multiplicity trigger (threshold defined online), offline SPD or V0 selection
37 kUserDefined = BIT(31), // Set when custom trigger classes are set in AliPhysicsSelection, offline SPD or V0 selection
38 kAny = 0xffffffff // to accept any trigger
39 };
6bc03c45 40
41 AliVEvent() { }
42 virtual ~AliVEvent() { }
43 AliVEvent(const AliVEvent& vEvnt);
44 AliVEvent& operator=(const AliVEvent& vEvnt);
45
46 // Services
47 virtual void AddObject(TObject* obj) = 0;
2811495d 48 virtual TObject* FindListObject(const char *name) const = 0;
6bc03c45 49 virtual TList* GetList() const = 0;
50
51 virtual void CreateStdContent() = 0;
52 virtual void GetStdContent() = 0;
53
1d0dd492 54 virtual void ReadFromTree(TTree *tree, Option_t* opt) = 0;
f12d42ce 55 virtual void WriteToTree(TTree* tree) const = 0;
6bc03c45 56
ec8aded8 57 virtual void Reset() = 0;
6bc03c45 58 //virtual void ResetStdContent() = 0;
59 virtual void SetStdNames() = 0;
60
61 virtual void Print(Option_t *option="") const = 0;
62
63 // Header
64 virtual AliVHeader* GetHeader() const = 0;
65
66 // Delegated methods for fESDRun or AODHeader
67
68 virtual void SetRunNumber(Int_t n) = 0;
69 virtual void SetPeriodNumber(UInt_t n) = 0;
70 virtual void SetMagneticField(Double_t mf) = 0;
71
72 virtual Int_t GetRunNumber() const = 0;
73 virtual UInt_t GetPeriodNumber() const = 0;
74 virtual Double_t GetMagneticField() const = 0;
75
5303c167 76 virtual Double_t GetDiamondX() const {return -999.;}
77 virtual Double_t GetDiamondY() const {return -999.;}
78 virtual void GetDiamondCovXY(Float_t cov[3]) const
79 {cov[0]=-999.; return;}
80
6bc03c45 81 // Delegated methods for fHeader
82 virtual void SetOrbitNumber(UInt_t n) = 0;
83 virtual void SetBunchCrossNumber(UShort_t n) = 0;
84 virtual void SetEventType(UInt_t eventType)= 0;
85 virtual void SetTriggerMask(ULong64_t n) = 0;
86 virtual void SetTriggerCluster(UChar_t n) = 0;
87
88 virtual UInt_t GetOrbitNumber() const = 0;
89 virtual UShort_t GetBunchCrossNumber() const = 0;
90 virtual UInt_t GetEventType() const = 0;
91 virtual ULong64_t GetTriggerMask() const = 0;
92 virtual UChar_t GetTriggerCluster() const = 0;
93
94 virtual Double_t GetZDCN1Energy() const = 0;
95 virtual Double_t GetZDCP1Energy() const = 0;
96 virtual Double_t GetZDCN2Energy() const = 0;
97 virtual Double_t GetZDCP2Energy() const = 0;
a85132e7 98 virtual Double_t GetZDCEMEnergy(Int_t i) const = 0;
6bc03c45 99
100 // Tracks
101 virtual AliVParticle *GetTrack(Int_t i) const = 0;
102 //virtual Int_t AddTrack(const AliVParticle *t) = 0;
103 virtual Int_t GetNumberOfTracks() const = 0;
c1b93f02 104 virtual Int_t GetNumberOfV0s() const = 0;
bc0379e5 105 virtual Int_t GetNumberOfCascades() const = 0;
6bc03c45 106
c8fe2783 107 // Calorimeter Clusters/Cells
108 virtual AliVCluster *GetCaloCluster(Int_t) const {return 0;}
109 virtual Int_t GetNumberOfCaloClusters() const {return 0;}
110 virtual Int_t GetEMCALClusters(TRefArray *) const {return 0;}
111 virtual Int_t GetPHOSClusters (TRefArray *) const {return 0;}
112 virtual AliVCaloCells *GetEMCALCells() const {return 0;}
113 virtual AliVCaloCells *GetPHOSCells() const {return 0;}
114 const TGeoHMatrix* GetPHOSMatrix(Int_t /*i*/) const {return NULL;}
115 const TGeoHMatrix* GetEMCALMatrix(Int_t /*i*/) const {return NULL;}
116
117
5303c167 118 // Primary vertex
119 virtual const AliVVertex *GetPrimaryVertex() const {return 0x0;}
a98c78e5 120 virtual Bool_t IsPileupFromSPD(Int_t /*minContributors*/,
121 Double_t /*minZdist*/,
122 Double_t /*nSigmaZdist*/,
123 Double_t /*nSigmaDiamXY*/,
124 Double_t /*nSigmaDiamZ*/)
125 const{
126 return kFALSE;
127 }
b46ff4b0 128
129 virtual Bool_t IsPileupFromSPDInMultBins() const {
130 return kFALSE;
131 }
befa9db4 132 virtual AliCentrality* GetCentrality() = 0;
ce7adfe9 133 virtual AliEventplane* GetEventplane() = 0;
befa9db4 134 virtual Int_t EventIndex(Int_t itrack) const = 0;
135 virtual Int_t EventIndexForCaloCluster(Int_t iclu) const = 0;
136 virtual Int_t EventIndexForPHOSCell(Int_t icell) const = 0;
137 virtual Int_t EventIndexForEMCALCell(Int_t icell) const = 0;
6bc03c45 138
ae2bccf1 139 virtual AliVVZERO *GetVZEROData() const = 0;
140
a8e24688 141 ClassDef(AliVEvent,1) // base class for AliEvent data
6bc03c45 142};
143#endif
144