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 Float_t GetV0AMultiplicity() const { return fV0Multiplicity[0]; }
63 Float_t GetV0CMultiplicity() const { return fV0Multiplicity[1]; }
64 Float_t GetV0MMultiplicity() const { return fV0Multiplicity[0] + fV0Multiplicity[1]; }
65 Float_t GetZNAEnergy() const { return fZDCEnergy[0]; }
66 Float_t GetZNCEnergy() const { return fZDCEnergy[1]; }
67 Float_t GetZPAEnergy() const { return fZDCEnergy[2]; }
68 Float_t GetZPCEnergy() const { return fZDCEnergy[3]; }
69 Float_t GetZDCNEnergySum() const { return fZDCEnergy[0] + fZDCEnergy[1]; }
70 Float_t GetZDCNEnergyDifference() const { return fZDCEnergy[0] - fZDCEnergy[1]; }
71 Float_t GetZDCNEnergyAsymmetry() const { return fZDCEnergy[0] + fZDCEnergy[1] != 0 ? (fZDCEnergy[0] - fZDCEnergy[1])/(fZDCEnergy[0] + fZDCEnergy[1]) : 1.; }
72 Float_t GetZDCPEnergySum() const { return fZDCEnergy[2] + fZDCEnergy[3]; }
73 Float_t GetZDCPEnergyDifference() const { return fZDCEnergy[2] - fZDCEnergy[3]; }
74 Float_t GetZDCPEnergyAsymmetry() const { return fZDCEnergy[2] + fZDCEnergy[3] != 0 ? (fZDCEnergy[2] - fZDCEnergy[3])/(fZDCEnergy[2] + fZDCEnergy[3]) : 1.; }
75 Int_t GetSPDMultiplicity() const { return fSPDMultiplicity; }
77 void SetVX(Float_t vx) { fVX[0] = vx; }
78 void SetVY(Float_t vy) { fVY[0] = vy; }
79 void SetVZ(Float_t vz) { fVZ[0] = vz; }
80 void SetVXSPD(Float_t vx) { fVX[1] = vx; }
81 void SetVYSPD(Float_t vy) { fVY[1] = vy; }
82 void SetVZSPD(Float_t vz) { fVZ[1] = vz; }
83 void SetRunNumber(Int_t runnumber) { fRunNumber = runnumber; }
84 inline void SetCentrality(Float_t centV0M, Float_t centV0A, Float_t centV0C, Float_t centTLS, Float_t centTrks, Float_t centZNA);
85 void SetNContribVertex(Int_t ncontrib) { fNContrib[0] = ncontrib; }
86 void SetNContribVertexSPD(Int_t ncontrib) { fNContrib[1] = ncontrib; }
87 void SetVertexResolution(Float_t res) { fVertexResolution[0] = res; }
88 void SetVertexResolutionSPD(Float_t res) { fVertexResolution[1] = res; }
90 Bool_t IsMBTrigger() const { return TESTBIT(fTrigger, kMB); }
91 Bool_t IsSemiCentralTrigger() const { return TESTBIT(fTrigger, kSemiCentral); }
92 Bool_t IsCentralTrigger() const { return TESTBIT(fTrigger, kCentral); }
93 Bool_t IsEMCalTrigger() const { return TESTBIT(fTrigger, kEMCAL); }
94 Bool_t IsTRDSETrigger() const { return TESTBIT(fTrigger, kTRDSE); }
95 Bool_t IsTRDDQTrigger() const { return TESTBIT(fTrigger, kTRDDQ); }
97 void SetMBTrigger() { SETBIT(fTrigger, kMB); }
98 void SetSemiCentralTrigger() { SETBIT(fTrigger, kSemiCentral); }
99 void SetCentralTrigger() { SETBIT(fTrigger, kCentral); }
100 void SetEMCALTrigger() { SETBIT(fTrigger, kEMCAL); }
101 void SetTRDSETrigger() { SETBIT(fTrigger, kTRDSE); }
102 void SetTRDDQTrigger() { SETBIT(fTrigger, kTRDDQ); }
104 void SetV0Multiplicity(Float_t v0A, Float_t v0C) {
105 fV0Multiplicity[0] = v0A;
106 fV0Multiplicity[1] = v0C;
108 inline void SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc);
109 void SetSPDMultiplicity(Int_t mult) { fSPDMultiplicity = mult; }
120 TObjArray *fTracks; // Array with reconstructed tracks
121 TObjArray *fMCparticles; // Array with MC particles
122 Int_t fNtracks; // Number of tracks
123 Int_t fNmcparticles; // Number of MC Particles
124 Int_t fRunNumber; // Run Number
125 Float_t fCentrality[6]; // Centrality (V0M, V0A, V0C, TLS, TRK, ZNA)
126 Int_t fTrigger; // Trigger bits
127 Float_t fVX[2]; // Vertex X
128 Float_t fVY[2]; // Vertex Y
129 Float_t fVZ[2]; // Vertex Z
130 Int_t fNContrib[2]; // Number of vertex contributors
131 Float_t fVertexResolution[2];// z-Vertex resolution
132 Float_t fV0Multiplicity[2]; // V0 multiplicity
133 Float_t fZDCEnergy[4]; // ZDC Energy (n,p)
134 Int_t fSPDMultiplicity; // SPD tracklet multiplicity
136 ClassDef(AliHFEreducedEvent, 2)
139 //____________________________________________________________
140 void AliHFEreducedEvent::SetCentrality(Float_t centV0M, Float_t centV0A, Float_t centV0C, Float_t centTLS, Float_t centTrks, Float_t centZNA) {
141 fCentrality[0] = centV0M;
142 fCentrality[1] = centV0A;
143 fCentrality[2] = centV0C;
144 fCentrality[3] = centTLS;
145 fCentrality[4] = centTrks;
146 fCentrality[5] = centZNA;
148 //_________________________________________________________
149 void AliHFEreducedEvent::SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc){