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