1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 // Debug event to look at the distribution of the variable we are cutting on
19 #ifndef ALIHFEREDUCEDEVENT_H
20 #define ALIHFEREDUCEDEVENT_H
25 class AliHFEreducedTrack;
26 class AliHFEreducedMCParticle;
28 class AliHFEreducedEvent : public TObject{
31 AliHFEreducedEvent(const AliHFEreducedEvent &ref);
32 AliHFEreducedEvent &operator=(const AliHFEreducedEvent &ref);
33 ~AliHFEreducedEvent();
35 void AddTrack(const AliHFEreducedTrack *track);
36 const AliHFEreducedTrack *GetTrack(int itrk) const;
37 Int_t GetNumberOfTracks() const { return fNtracks; }
38 void AddMCParticle(const AliHFEreducedMCParticle *mctrack);
39 const AliHFEreducedMCParticle *GetMCParticle(int itrk) const;
40 Int_t GetNumberOfMCParticles() const { return fNmcparticles; }
42 Float_t GetVX() const { return fVX[0]; }
43 Float_t GetVY() const { return fVY[0]; }
44 Float_t GetVZ() const { return fVZ[0]; }
45 Float_t GetVXSPD() const { return fVX[1]; }
46 Float_t GetVYSPD() const { return fVY[1]; }
47 Float_t GetVZSPD() const { return fVZ[1]; }
48 Int_t GetNContribVertex() const { return fNContrib[0]; }
49 Int_t GetNContribVertexSPD() const { return fNContrib[1]; }
50 Bool_t HasPrimaryVertex() const { return fNContrib[0] > 0; }
51 Bool_t HasPrimaryVertexSPD() const { return fNContrib[1] > 0; }
52 Float_t GetVertexZResolution() const { return fVertexResolution[0]; };
53 Float_t GetVertexZResolutionSPD() const { return fVertexResolution[1]; };
54 Int_t GetRunNumber() const { return fRunNumber; }
55 Double_t GetCentrality() const { return fCentrality[0]; }
56 Double_t GetCentralityV0M() const { return fCentrality[0]; }
57 Double_t GetCentralityV0A() const { return fCentrality[1]; }
58 Double_t GetCentralityV0C() const { return fCentrality[2]; }
59 Double_t GetCentralityTracklets() const { return fCentrality[3]; }
60 Double_t GetCentralityTracks() const { return fCentrality[4]; }
61 Double_t GetCentralityZNA() const { return fCentrality[5]; }
62 Double_t GetCentralityZNC() const { return fCentrality[6]; }
63 Double_t GetCentralityCL0() const { return fCentrality[7]; }
64 Double_t GetCentralityCL1() const { return fCentrality[8]; }
65 Double_t GetCentralityCND() const { return fCentrality[9]; }
66 Float_t GetV0AMultiplicity() const { return fV0Multiplicity[0]; }
67 Float_t GetV0CMultiplicity() const { return fV0Multiplicity[1]; }
68 Float_t GetV0MMultiplicity() const { return fV0Multiplicity[0] + fV0Multiplicity[1]; }
69 Float_t GetZNAEnergy() const { return fZDCEnergy[0]; }
70 Float_t GetZNCEnergy() const { return fZDCEnergy[1]; }
71 Float_t GetZPAEnergy() const { return fZDCEnergy[2]; }
72 Float_t GetZPCEnergy() const { return fZDCEnergy[3]; }
73 Float_t GetZDCNEnergySum() const { return fZDCEnergy[0] + fZDCEnergy[1]; }
74 Float_t GetZDCNEnergyDifference() const { return fZDCEnergy[0] - fZDCEnergy[1]; }
75 Float_t GetZDCNEnergyAsymmetry() const { return fZDCEnergy[0] + fZDCEnergy[1] != 0 ? (fZDCEnergy[0] - fZDCEnergy[1])/(fZDCEnergy[0] + fZDCEnergy[1]) : 1.; }
76 Float_t GetZDCPEnergySum() const { return fZDCEnergy[2] + fZDCEnergy[3]; }
77 Float_t GetZDCPEnergyDifference() const { return fZDCEnergy[2] - fZDCEnergy[3]; }
78 Float_t GetZDCPEnergyAsymmetry() const { return fZDCEnergy[2] + fZDCEnergy[3] != 0 ? (fZDCEnergy[2] - fZDCEnergy[3])/(fZDCEnergy[2] + fZDCEnergy[3]) : 1.; }
79 Int_t GetSPDMultiplicity() const { return fSPDMultiplicity; }
81 void SetVX(Float_t vx) { fVX[0] = vx; }
82 void SetVY(Float_t vy) { fVY[0] = vy; }
83 void SetVZ(Float_t vz) { fVZ[0] = vz; }
84 void SetVXSPD(Float_t vx) { fVX[1] = vx; }
85 void SetVYSPD(Float_t vy) { fVY[1] = vy; }
86 void SetVZSPD(Float_t vz) { fVZ[1] = vz; }
87 void SetRunNumber(Int_t runnumber) { fRunNumber = runnumber; }
88 inline void SetCentrality(
100 void SetNContribVertex(Int_t ncontrib) { fNContrib[0] = ncontrib; }
101 void SetNContribVertexSPD(Int_t ncontrib) { fNContrib[1] = ncontrib; }
102 void SetVertexResolution(Float_t res) { fVertexResolution[0] = res; }
103 void SetVertexResolutionSPD(Float_t res) { fVertexResolution[1] = res; }
105 Bool_t IsMBTrigger() const { return TESTBIT(fTrigger, kMB); }
106 Bool_t IsSemiCentralTrigger() const { return TESTBIT(fTrigger, kSemiCentral); }
107 Bool_t IsCentralTrigger() const { return TESTBIT(fTrigger, kCentral); }
108 Bool_t IsEMCalTrigger() const { return TESTBIT(fTrigger, kEMCAL); }
109 Bool_t IsTRDSETrigger() const { return TESTBIT(fTrigger, kTRDSE); }
110 Bool_t IsTRDDQTrigger() const { return TESTBIT(fTrigger, kTRDDQ); }
111 Bool_t IsINTTrigger() const { return TESTBIT(fTrigger, kINTTRG); }
113 void SetMBTrigger() { SETBIT(fTrigger, kMB); }
114 void SetSemiCentralTrigger() { SETBIT(fTrigger, kSemiCentral); }
115 void SetCentralTrigger() { SETBIT(fTrigger, kCentral); }
116 void SetEMCALTrigger() { SETBIT(fTrigger, kEMCAL); }
117 void SetTRDSETrigger() { SETBIT(fTrigger, kTRDSE); }
118 void SetTRDDQTrigger() { SETBIT(fTrigger, kTRDDQ); }
119 void SetINTTrigger() { SETBIT(fTrigger, kINTTRG); }
121 void SetV0Multiplicity(Float_t v0A, Float_t v0C) {
122 fV0Multiplicity[0] = v0A;
123 fV0Multiplicity[1] = v0C;
125 inline void SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc);
126 void SetSPDMultiplicity(Int_t mult) { fSPDMultiplicity = mult; }
141 TObjArray *fTracks; // Array with reconstructed tracks
142 TObjArray *fMCparticles; // Array with MC particles
143 Int_t fNtracks; // Number of tracks
144 Int_t fNmcparticles; // Number of MC Particles
145 Int_t fRunNumber; // Run Number
146 Float_t fCentrality[kCentBuff]; // Centrality (V0M, V0A, V0C, TLS, TRK, ZNA, ZNC, CL0, CL1, CND)
147 Int_t fTrigger; // Trigger bits
148 Float_t fVX[2]; // Vertex X
149 Float_t fVY[2]; // Vertex Y
150 Float_t fVZ[2]; // Vertex Z
151 Int_t fNContrib[2]; // Number of vertex contributors
152 Float_t fVertexResolution[2];// z-Vertex resolution
153 Float_t fV0Multiplicity[2]; // V0 multiplicity
154 Float_t fZDCEnergy[4]; // ZDC Energy (n,p)
155 Int_t fSPDMultiplicity; // SPD tracklet multiplicity
157 ClassDef(AliHFEreducedEvent, 4)
160 //____________________________________________________________
161 void AliHFEreducedEvent::SetCentrality(
174 fCentrality[0] = centV0M;
175 fCentrality[1] = centV0A;
176 fCentrality[2] = centV0C;
177 fCentrality[3] = centTLS;
178 fCentrality[4] = centTrks;
179 fCentrality[5] = centZNA;
180 fCentrality[6] = centZNC;
181 fCentrality[7] = centCL0;
182 fCentrality[8] = centCL1;
183 fCentrality[9] = centCND;
186 //_________________________________________________________
187 void AliHFEreducedEvent::SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc){