1. Leading time was not decoded properly (there are coarse and fine gains in the...
[u/mrichter/AliRoot.git] / STEER / AliMixedEvent.h
CommitLineData
7eb061fb 1// -*- mode: C++ -*-
2#ifndef ALIMIXEDEVENT_H
3#define ALIMIXEDEVENT_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 AliMixedEvent
12// VEvent which is the container of several VEvents
13// Use Case: Event Mixing
14// Origin: Andreas Morsch, CERN, Andreas.Morsch@cern.ch
15//-------------------------------------------------------------------------
16
17#include "AliVEvent.h"
bbeb9cae 18#include "AliVVertex.h"
7eb061fb 19#include <TList.h>
bbeb9cae 20#include <TObjArray.h>
7eb061fb 21
22class AliMixedEvent : public AliVEvent {
23
24public:
25
26 AliMixedEvent();
27 virtual ~AliMixedEvent() {Reset();}
28 AliMixedEvent(const AliMixedEvent& vEvnt);
29 AliMixedEvent& operator=(const AliMixedEvent& vEvnt);
30
31 // Services from VEvent
32 virtual void AddObject(TObject* /*obj*/) {;}
33 virtual TObject* FindListObject(const char* /*name*/) {return 0;}
34 virtual TList* GetList() const {return 0;}
35 virtual void CreateStdContent() {;}
36 virtual void GetStdContent() {;}
37 virtual void ReadFromTree(TTree* /*tree*/, Option_t* /*opt*/) {;}
38 virtual void WriteToTree(TTree* /*tree*/) const {;}
39 virtual void SetStdNames() {;}
40 virtual void Print(Option_t * /*option*/) const {;}
41 // Specific Services
42 virtual void AddEvent(AliVEvent* evt);
bbeb9cae 43 virtual void SetPrimaryVertex(AliVVertex* newVertex) {fMeanVertex = newVertex;}
44 AliVVertex* GetPrimaryVtx(){return fMeanVertex;}
7eb061fb 45 virtual void Reset();
46 virtual void Init();
bbeb9cae 47 const AliVVertex* GetEventVertex(Int_t i) const;
7eb061fb 48
49 // Header
50 virtual AliVHeader* GetHeader() const {return 0;}
51
52 // Delegated methods for fESDRun or AODHeader
53
54 virtual void SetRunNumber(Int_t /*n*/) {;}
55 virtual void SetPeriodNumber(UInt_t /*n*/) {;}
56 virtual void SetMagneticField(Double_t /*mf*/) {;}
57
58 virtual Int_t GetRunNumber() const {return -999 ;}
59 virtual UInt_t GetPeriodNumber() const {return 0 ;}
60 virtual Double_t GetMagneticField() const {return -999.;}
61
62 virtual Double_t GetDiamondX() const {return -999.;}
63 virtual Double_t GetDiamondY() const {return -999.;}
64 virtual void GetDiamondCovXY(Float_t cov[3]) const
65 {cov[0]=-999.; return;}
66
67 // Delegated methods for fHeader
68 virtual void SetOrbitNumber(UInt_t /*n*/) {;}
69 virtual void SetBunchCrossNumber(UShort_t /*n*/) {;}
70 virtual void SetEventType(UInt_t /*eventType*/) {;}
71 virtual void SetTriggerMask(ULong64_t /*n*/) {;}
72 virtual void SetTriggerCluster(UChar_t /*n*/) {;}
73
74 virtual UInt_t GetOrbitNumber() const {return 0;}
75 virtual UShort_t GetBunchCrossNumber() const {return 0;}
76 virtual UInt_t GetEventType() const {return 0;}
77 virtual ULong64_t GetTriggerMask() const {return 0;}
78 virtual UChar_t GetTriggerCluster() const {return 0;}
79
80 virtual Double_t GetZDCN1Energy() const {return -999.;}
81 virtual Double_t GetZDCP1Energy() const {return -999.;}
82 virtual Double_t GetZDCN2Energy() const {return -999.;}
83 virtual Double_t GetZDCP2Energy() const {return -999.;}
84 virtual Double_t GetZDCEMEnergy(Int_t /*i*/) const {return -999.;}
85
86 // Tracks
fbeafd67 87 virtual AliVParticle *GetTrack(Int_t i) const;
88 virtual Int_t GetNumberOfTracks() const {return fNumberOfTracks;}
89 virtual Int_t GetNumberOfV0s() const {return -999;}
90 virtual Int_t GetNumberOfCascades() const {return -999;}
91
7eb061fb 92 virtual Int_t EventIndex(Int_t itrack);
93
94 // Primary vertex
95 virtual const AliVVertex *GetPrimaryVertex() const {return 0;}
bbeb9cae 96 virtual void ComputeVtx(TObjArray *vertices,Double_t *pos,Double_t *sig);
7eb061fb 97private:
98 TList fEventList; //! List of Events
99 Int_t fNEvents; //! Number of Events
100 Int_t fNumberOfTracks; //! Total number of tracks
101 Int_t* fNTracksCumul; //! Cumulant
bbeb9cae 102 AliVVertex* fMeanVertex; //! Mean vertex
7eb061fb 103
104 ClassDef(AliMixedEvent, 0) // Container for mixed events
105};
106#endif
107