]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGUD/UPC/AliUPCEvent.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGUD / UPC / AliUPCEvent.h
CommitLineData
05e1b6ea 1#ifndef ALIUPCEVENT_H
2#define ALIUPCEVENT_H
3
4//_____________________________________________________________________________
5// Class for UPC data
6// Author: Jaroslav Adam
7//_____________________________________________________________________________
8
9#define NTRG 24
10#include "TObject.h"
11
8961649c 12class TParticle;
b5048c08 13class AliUPCTrack;
14class AliUPCMuonTrack;
8961649c 15
05e1b6ea 16class AliUPCEvent : public TObject
17{
18public:
19 AliUPCEvent();
20 virtual ~AliUPCEvent();
21
22 void ClearEvent(void);
23
24 //Setters
25 void SetIsESD(Bool_t isESD=kTRUE);
26 void SetIsMC(Bool_t isMC=kTRUE);
27 void SetFlagBit(UChar_t ibit) {fFlags |= (1 << ibit);}
28 void ResetFlagBits(void) {fFlags = 0;}
29
30 void SetL0inputs(UInt_t inputs) {fL0inputs=inputs;}
31 void SetTriggerClass(Int_t idx, Bool_t fired);
32 void SetRecoPass(Char_t passId) {fRecoPass=passId;}
33 void SetInputFileName(const char *s);
34 void SetEventNumber(Long64_t evt) {fEvtNum=evt;}
35 void SetRunNumber(Int_t run) {fRunNum=run;}
36
37 void SetPrimaryVertex(Double_t *pos, Double_t chi2, Double_t *cov, Int_t ncontrib);
38 void SetPrimaryVertexTitle(const char *s);
39 void SetPrimaryVertexSPD(Double_t *pos, Double_t chi2, Double_t *cov, Int_t ncontrib);
40 void SetPrimaryVertexSPDtitle(const char *s);
41 void SetPrimaryVertexMC(Float_t *pos);
42
43 void SetNumberOfTracklets(Int_t tcklets) {fNTracklets=tcklets;}
44 void SetNSPDfiredInner(Int_t nInner) {fNSPDfiredInner=nInner;}
45 void SetNSPDfiredOuter(Int_t nOuter) {fNSPDfiredOuter=nOuter;}
46
47 void SetV0ADecision(Int_t decision) {fV0ADecision=decision;}
48 void SetV0CDecision(Int_t decision) {fV0CDecision=decision;}
49 void SetBBtriggerV0Cmask(UInt_t ibit);
50 void SetBBFlagV0Cmask(UInt_t ibit);
51
52 void SetZNCEnergy(Double_t energy) {fZNCEnergy = energy;}
53 void SetZPCEnergy(Double_t energy) {fZPCEnergy = energy;}
54 void SetZNAEnergy(Double_t energy) {fZNAEnergy = energy;}
55 void SetZPAEnergy(Double_t energy) {fZPAEnergy = energy;}
56 void SetZNCtdc(Bool_t tdc) {fZNCtdc = tdc;}
57 void SetZPCtdc(Bool_t tdc) {fZPCtdc = tdc;}
58 void SetZNAtdc(Bool_t tdc) {fZNAtdc = tdc;}
59 void SetZPAtdc(Bool_t tdc) {fZPAtdc = tdc;}
60
61 AliUPCTrack *AddTrack(void);
62 AliUPCMuonTrack *AddMuonTrack(void);
63
64 TParticle *AddMCParticle(void);
65
66 //Getters
67 Bool_t GetIsESD(void) const;
68 Bool_t GetIsMC(void) const;
69 Bool_t GetFlagBit(UChar_t ibit) const;
70 UChar_t GetFlag(void) const { return fFlags; }
71
72 UInt_t GetL0inputs(void) const { return fL0inputs; }
73 Bool_t GetTriggerClass(Int_t idx) const;
74 Char_t GetRecoPass(void) const { return fRecoPass; }
75 TObjString *GetInputFileName(void) const { return fDataFilnam; }
76 Long64_t GetEventNumber(void) const { return fEvtNum; }
77 Int_t GetRunNumber(void) const { return fRunNum; }
78
79 void GetPrimaryVertex(Double_t *pos, Double_t &chi2, Double_t *cov, Int_t &ncontrib) const;
80 TObjString *GetPrimaryVertexTitle(void) const { return fVtxTitle; }
81 void GetPrimaryVertexSPD(Double_t *pos, Double_t &chi2, Double_t *cov, Int_t &ncontrib) const;
82 TObjString *GetPrimaryVertexSPDtitle(void) const { return fVtxSPDtitle; }
83 void GetPrimaryVertexMC(Float_t *pos) const;
84
85 Int_t GetNumberOfTracklets(void) const { return fNTracklets; }
86 Int_t GetNSPDfiredInner(void) const { return fNSPDfiredInner; }
87 Int_t GetNSPDfiredOuter(void) const { return fNSPDfiredOuter; }
88
89 Int_t GetV0ADecision(void) const { return fV0ADecision; }
90 Int_t GetV0CDecision(void) const { return fV0CDecision; }
91 UInt_t GetBBtriggerV0C(void) const { return fBBtriggerV0C; }
92 UInt_t GetBBFlagV0C(void) const { return fBBFlagV0C; }
93 Int_t GetNV0ChitsOffline(void) const;
94 Int_t GetNV0ChitsOnline(void) const;
95
96 Double_t GetZNCEnergy(void) const { return fZNCEnergy; }
97 Double_t GetZPCEnergy(void) const { return fZPCEnergy; }
98 Double_t GetZNAEnergy(void) const { return fZNAEnergy; }
99 Double_t GetZPAEnergy(void) const { return fZPAEnergy; }
100 Bool_t GetZNCtdc(void) const { return fZNCtdc; }
101 Bool_t GetZPCtdc(void) const { return fZPCtdc; }
102 Bool_t GetZNAtdc(void) const { return fZNAtdc; }
103 Bool_t GetZPAtdc(void) const { return fZPAtdc; }
104 Bool_t GetAllZDCtdc(void) const;
105
106 Int_t GetNumberOfTracks(void) const { return fNtracks; }
107 AliUPCTrack *GetTrack(Int_t iTrack) const;
108 Int_t GetNumberOfMuonTracks(void) const { return fNmuons; }
109 AliUPCMuonTrack *GetMuonTrack(Int_t iTrack) const;
110
111 Int_t GetNumberOfMCParticles(void) const { return fNmc; }
112 TParticle *GetMCParticle(Int_t iMC) const;
113
114protected:
115 AliUPCEvent(const AliUPCEvent &o); // not implemented
116 AliUPCEvent &operator=(const AliUPCEvent &o); // not implemented
117
118 UChar_t fFlags; // event flags bits: 0 = ESD, 1 = MC
119 UInt_t fL0inputs; // L0 trigger inputs
120 Bool_t fTrgClasses[NTRG]; // fired trigger classes
121 Char_t fRecoPass; // reconstruction pass identifier
122 TObjString *fDataFilnam; //-> input file name and path
123 Long64_t fEvtNum; // event number in input file
124 Int_t fRunNum; // run number
125 Double_t fVtxPos[3]; // default primary vertex position
126 Double_t fVtxChi2perNDF; // chi2/ndf of vertex fit
127 Double_t fVtxCov[6]; // vertex covariance matrix
128 Int_t fVtxNContributors; // # of tracklets/tracks used for the estimate
129 TObjString *fVtxTitle; //-> title of default primary vertex
130 Double_t fVtxSPDpos[3]; // SPD primary vertex position
131 Double_t fVtxSPDchi2perNDF; // chi2/ndf of vertex fit
132 Double_t fVtxSPDcov[6]; // vertex covariance matrix
133 Int_t fVtxSPDnContributors; // # of tracklets/tracks used for the estimate
134 TObjString *fVtxSPDtitle; //-> title of SPD primary vertex
135 Float_t fVtxMCpos[3]; // MC primary vertex position
136 Int_t fNTracklets; // number of SPD tracklets
137 Int_t fNSPDfiredInner; // number of fired SPD FO chips, inner layer
138 Int_t fNSPDfiredOuter; // number of fired SPD FO chips, outer layer
139 Int_t fV0ADecision; // V0A decision, set by enumeration: kV0Invalid = -1, kV0Empty = 0, kV0BB, kV0BG, kV0Fake
140 Int_t fV0CDecision; // V0C decision
141 UInt_t fBBtriggerV0C; // offline beam-beam flags in V0C one bit per cell
142 UInt_t fBBFlagV0C; // online beam-beam flags in V0C one bit per cell
143 Double_t fZNCEnergy; // reconstructed energy in the neutron ZDC, C-side
144 Double_t fZPCEnergy; // reconstructed energy in the proton ZDC, C-side
145 Double_t fZNAEnergy; // reconstructed energy in the neutron ZDC, A-side
146 Double_t fZPAEnergy; // reconstructed energy in the proton ZDC, A-side
147 Bool_t fZNCtdc; // ZDC TDC data, NC
148 Bool_t fZPCtdc; // ZDC TDC data, PC
149 Bool_t fZNAtdc; // ZDC TDC data, NA
150 Bool_t fZPAtdc; // ZDC TDC data, PA
151 TClonesArray *fUPCTracks; //-> array of central upc tracks
152 Int_t fNtracks; // number of central upc tracks in event
153 TClonesArray *fUPCMuonTracks; //-> array of muon upc tracks
154 Int_t fNmuons; // number of muon upc tracks in event
155 TClonesArray *fMCParticles; // array of MC particles
156 Int_t fNmc; // number of mc particles in event
157
158 static TClonesArray *fgUPCTracks; // array of central upc tracks
159 static TClonesArray *fgUPCMuonTracks; // array of muon upc tracks
160 static TClonesArray *fgMCParticles; // array of MC particles
161
162 ClassDef(AliUPCEvent,1)
163};
164
165#endif
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186