]>
Commit | Line | Data |
---|---|---|
3513afb7 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | // | |
16 | // Debug event to look at the distribution of the variable we are cutting on | |
17 | // | |
18 | // | |
19 | #ifndef ALIHFEREDUCEDEVENT_H | |
20 | #define ALIHFEREDUCEDEVENT_H | |
21 | ||
22 | #include <TObject.h> | |
23 | ||
24 | class TObjArray; | |
25 | class AliHFEreducedTrack; | |
26 | class AliHFEreducedMCParticle; | |
27 | ||
28 | class AliHFEreducedEvent : public TObject{ | |
29 | public: | |
30 | AliHFEreducedEvent(); | |
31 | AliHFEreducedEvent(const AliHFEreducedEvent &ref); | |
32 | AliHFEreducedEvent &operator=(const AliHFEreducedEvent &ref); | |
33 | ~AliHFEreducedEvent(); | |
34 | ||
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; } | |
41 | ||
42 | Double_t GetVX() const { return fVX; } | |
43 | Double_t GetVY() const { return fVY; } | |
44 | Double_t GetVZ() const { return fVZ; } | |
45 | Int_t GetNContribVertex() const { return fNContrib; } | |
46 | Int_t GetRunNumber() const { return fRunNumber; } | |
47 | Double_t GetCentrality() const { return fCentrality[0]; } | |
48 | Double_t GetCentralityV0M() const { return fCentrality[0]; } | |
49 | Double_t GetCentralityV0A() const { return fCentrality[1]; } | |
50 | Double_t GetCentralityV0C() const { return fCentrality[2]; } | |
51 | Double_t GetCentralityTracklets() const { return fCentrality[3]; } | |
52 | Double_t GetCentralityTracks() const { return fCentrality[4]; } | |
53 | Double_t GetCentralityZNA() const { return fCentrality[5]; } | |
54 | Float_t GetV0AMultiplicity() const { return fV0Multiplicity[0]; } | |
55 | Float_t GetV0CMultiplicity() const { return fV0Multiplicity[1]; } | |
56 | Float_t GetV0MMultiplicity() const { return fV0Multiplicity[0] + fV0Multiplicity[1]; } | |
57 | Float_t GetZNAEnergy() const { return fZDCEnergy[0]; } | |
58 | Float_t GetZNCEnergy() const { return fZDCEnergy[1]; } | |
59 | Float_t GetZPAEnergy() const { return fZDCEnergy[2]; } | |
60 | Float_t GetZPCEnergy() const { return fZDCEnergy[3]; } | |
61 | Float_t GetZDCNEnergySum() const { return fZDCEnergy[0] + fZDCEnergy[1]; } | |
62 | Float_t GetZDCNEnergyDifference() const { return fZDCEnergy[0] - fZDCEnergy[1]; } | |
63 | Float_t GetZDCNEnergyAsymmetry() const { return fZDCEnergy[0] + fZDCEnergy[1] != 0 ? (fZDCEnergy[0] - fZDCEnergy[1])/(fZDCEnergy[0] + fZDCEnergy[1]) : 1.; } | |
64 | Float_t GetZDCPEnergySum() const { return fZDCEnergy[2] + fZDCEnergy[3]; } | |
65 | Float_t GetZDCPEnergyDifference() const { return fZDCEnergy[2] - fZDCEnergy[3]; } | |
66 | Float_t GetZDCPEnergyAsymmetry() const { return fZDCEnergy[2] + fZDCEnergy[3] != 0 ? (fZDCEnergy[2] - fZDCEnergy[3])/(fZDCEnergy[2] + fZDCEnergy[3]) : 1.; } | |
67 | Int_t GetSPDMultiplicity() const { return fSPDMultiplicity; } | |
68 | ||
69 | void SetVX(Double_t vx) { fVX = vx; } | |
70 | void SetVY(Double_t vy) { fVY = vy; } | |
71 | void SetVZ(Double_t vz) { fVZ = vz; } | |
72 | void SetRunNumber(Int_t runnumber) { fRunNumber = runnumber; } | |
73 | inline void SetCentrality(Float_t centV0M, Float_t centV0A, Float_t centV0C, Float_t centTLS, Float_t centTrks, Float_t centZNA); | |
74 | void SetNContribVertex(Int_t ncontrib) { fNContrib = ncontrib; } | |
75 | ||
76 | Bool_t IsMBTrigger() const { return TESTBIT(fTrigger, kMB); } | |
77 | Bool_t IsSemiCentralTrigger() const { return TESTBIT(fTrigger, kSemiCentral); } | |
78 | Bool_t IsCentralTrigger() const { return TESTBIT(fTrigger, kCentral); } | |
79 | Bool_t IsEMCalTrigger() const { return TESTBIT(fTrigger, kEMCAL); } | |
80 | Bool_t IsTRDSETrigger() const { return TESTBIT(fTrigger, kTRDSE); } | |
81 | Bool_t IsTRDDQTrigger() const { return TESTBIT(fTrigger, kTRDDQ); } | |
82 | ||
83 | void SetMBTrigger() { SETBIT(fTrigger, kMB); } | |
84 | void SetSemiCentralTrigger() { SETBIT(fTrigger, kSemiCentral); } | |
85 | void SetCentralTrigger() { SETBIT(fTrigger, kCentral); } | |
86 | void SetEMCALTrigger() { SETBIT(fTrigger, kEMCAL); } | |
87 | void SetTRDSETrigger() { SETBIT(fTrigger, kTRDSE); } | |
88 | void SetTRDDQTrigger() { SETBIT(fTrigger, kTRDDQ); } | |
89 | ||
90 | void SetV0Multiplicity(Float_t v0A, Float_t v0C) { | |
91 | fV0Multiplicity[0] = v0A; | |
92 | fV0Multiplicity[1] = v0C; | |
93 | } | |
94 | inline void SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc); | |
95 | void SetSPDMultiplicity(Int_t mult) { fSPDMultiplicity = mult; } | |
96 | ||
97 | private: | |
98 | typedef enum{ | |
99 | kMB = 0, | |
100 | kSemiCentral = 1, | |
101 | kCentral = 2, | |
102 | kEMCAL = 3, | |
103 | kTRDSE = 4, | |
104 | kTRDDQ = 5 | |
105 | } Trigger_t; | |
106 | TObjArray *fTracks; // Array with reconstructed tracks | |
107 | TObjArray *fMCparticles; // Array with MC particles | |
108 | Int_t fNtracks; // Number of tracks | |
109 | Int_t fNmcparticles; // Number of MC Particles | |
110 | Int_t fRunNumber; // Run Number | |
111 | Float_t fCentrality[6]; // Centrality (V0M, V0A, V0C, TLS, TRK, ZNA) | |
112 | Int_t fTrigger; // Trigger bits | |
113 | Double_t fVX; // Vertex X | |
114 | Double_t fVY; // Vertex Y | |
115 | Double_t fVZ; // Vertex Z | |
116 | Int_t fNContrib; // Number of vertex contributors | |
117 | Float_t fV0Multiplicity[2]; // V0 multiplicity | |
118 | Float_t fZDCEnergy[4]; // ZDC Energy (n,p) | |
119 | Int_t fSPDMultiplicity; // SPD tracklet multiplicity | |
120 | ||
121 | ClassDef(AliHFEreducedEvent, 1) | |
122 | }; | |
123 | ||
124 | //____________________________________________________________ | |
125 | void AliHFEreducedEvent::SetCentrality(Float_t centV0M, Float_t centV0A, Float_t centV0C, Float_t centTLS, Float_t centTrks, Float_t centZNA) { | |
126 | fCentrality[0] = centV0M; | |
127 | fCentrality[1] = centV0A; | |
128 | fCentrality[2] = centV0C; | |
129 | fCentrality[3] = centTLS; | |
130 | fCentrality[4] = centTrks; | |
131 | fCentrality[5] = centZNA; | |
132 | } | |
133 | //_________________________________________________________ | |
134 | void AliHFEreducedEvent::SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc){ | |
135 | fZDCEnergy[0] = zna; | |
136 | fZDCEnergy[1] = znc; | |
137 | fZDCEnergy[2] = zpa; | |
138 | fZDCEnergy[3] = zpc; | |
139 | } | |
140 | #endif |