]>
Commit | Line | Data |
---|---|---|
9da38871 | 1 | /************************************************************************** |
2 | * Copyright(c) 2004, 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 | /* $Id$ */ | |
17 | ||
18 | //____________________________________________________________________ | |
19 | // | |
20 | // ESD information from the FMD | |
21 | // Contains information on: | |
22 | // Charged particle multiplicty per strip (rough estimate) | |
23 | // Psuedo-rapdity per strip | |
24 | // Latest changes by Christian Holm Christensen | |
25 | // | |
26 | #include "AliESDFMD.h" // ALIFMDESD_H | |
27 | #include "AliLog.h" // ALILOG_H | |
28 | #include "Riostream.h" // ROOT_Riostream | |
29 | ||
30 | //____________________________________________________________________ | |
31 | ClassImp(AliESDFMD) | |
32 | #if 0 | |
33 | ; // This is here to keep Emacs for indenting the next line | |
34 | #endif | |
35 | ||
36 | ||
37 | //____________________________________________________________________ | |
38 | AliESDFMD::AliESDFMD() | |
39 | : fMultiplicity(AliFMDFloatMap::kMaxDetectors, | |
40 | AliFMDFloatMap::kMaxRings, | |
41 | AliFMDFloatMap::kMaxSectors, | |
42 | AliFMDFloatMap::kMaxStrips), | |
43 | fEta(AliFMDFloatMap::kMaxDetectors, | |
44 | AliFMDFloatMap::kMaxRings, | |
45 | 1, | |
c05d076f | 46 | AliFMDFloatMap::kMaxStrips), |
47 | fAngleCorrected(kFALSE) | |
9da38871 | 48 | { |
49 | // Default CTOR | |
50 | } | |
51 | ||
52 | //____________________________________________________________________ | |
53 | AliESDFMD::AliESDFMD(const AliESDFMD& other) | |
54 | : TObject(other), | |
55 | fMultiplicity(other.fMultiplicity), | |
56 | fEta(other.fEta) | |
57 | { | |
58 | // Default CTOR | |
59 | } | |
60 | ||
61 | //____________________________________________________________________ | |
62 | AliESDFMD& | |
63 | AliESDFMD::operator=(const AliESDFMD& other) | |
64 | { | |
65 | // Default CTOR | |
66 | fMultiplicity = other.fMultiplicity; | |
67 | fEta = other.fEta; | |
68 | return *this; | |
69 | } | |
70 | ||
c05d076f | 71 | //____________________________________________________________________ |
72 | void | |
73 | AliESDFMD::CheckNeedUShort(TFile* file) | |
74 | { | |
75 | fMultiplicity.CheckNeedUShort(file); | |
76 | fEta.CheckNeedUShort(file); | |
77 | } | |
78 | ||
9da38871 | 79 | //____________________________________________________________________ |
80 | void | |
81 | AliESDFMD::Clear(Option_t* ) | |
82 | { | |
83 | fMultiplicity.Reset(kInvalidMult); | |
84 | fEta.Reset(kInvalidEta); | |
85 | } | |
86 | ||
87 | ||
88 | //____________________________________________________________________ | |
89 | Float_t | |
90 | AliESDFMD::Multiplicity(UShort_t detector, Char_t ring, UShort_t sector, | |
91 | UShort_t strip) const | |
92 | { | |
93 | // Return rough estimate of charged particle multiplicity in the | |
94 | // strip FMD<detector><ring>[<sector>,<strip>]. | |
95 | // | |
96 | // Note, that this should at most be interpreted as the sum | |
97 | // multiplicity of secondaries and primaries. | |
98 | return fMultiplicity(detector, ring, sector, strip); | |
99 | } | |
100 | ||
101 | //____________________________________________________________________ | |
102 | Float_t | |
103 | AliESDFMD::Eta(UShort_t detector, Char_t ring, UShort_t /* sector */, | |
104 | UShort_t strip) const | |
105 | { | |
106 | // Return pseudo-rapidity of the strip | |
107 | // FMD<detector><ring>[<sector>,<strip>]. (actually, the sector | |
108 | // argument is ignored, as it is assumed that the primary vertex is | |
109 | // a (x,y) = (0,0), and that the modules are aligned with a | |
110 | // precision better than 2 degrees in the azimuthal angle). | |
111 | // | |
112 | return fEta(detector, ring, 0, strip); | |
113 | } | |
114 | ||
115 | //____________________________________________________________________ | |
116 | void | |
117 | AliESDFMD::SetMultiplicity(UShort_t detector, Char_t ring, UShort_t sector, | |
118 | UShort_t strip, Float_t mult) | |
119 | { | |
120 | // Return rough estimate of charged particle multiplicity in the | |
121 | // strip FMD<detector><ring>[<sector>,<strip>]. | |
122 | // | |
123 | // Note, that this should at most be interpreted as the sum | |
124 | // multiplicity of secondaries and primaries. | |
125 | fMultiplicity(detector, ring, sector, strip) = mult; | |
126 | } | |
127 | ||
128 | //____________________________________________________________________ | |
129 | void | |
130 | AliESDFMD::SetEta(UShort_t detector, Char_t ring, UShort_t /* sector */, | |
131 | UShort_t strip, Float_t eta) | |
132 | { | |
133 | // Set pseudo-rapidity of the strip | |
134 | // FMD<detector><ring>[<sector>,<strip>]. (actually, the sector | |
135 | // argument is ignored, as it is assumed that the primary vertex is | |
136 | // a (x,y) = (0,0), and that the modules are aligned with a | |
137 | // precision better than 2 degrees in the azimuthal angle). | |
138 | // | |
139 | fEta(detector, ring, 0, strip) = eta; | |
140 | } | |
141 | ||
142 | //____________________________________________________________________ | |
143 | void | |
144 | AliESDFMD::Print(Option_t* /* option*/) const | |
145 | { | |
6169f936 | 146 | // Print all information to standard output. |
9da38871 | 147 | std::cout << "AliESDFMD:" << std::endl; |
9eeb02aa | 148 | for (UShort_t det = 1; det <= fMultiplicity.MaxDetectors(); det++) { |
149 | for (UShort_t ir = 0; ir < fMultiplicity.MaxRings(); ir++) { | |
9da38871 | 150 | Char_t ring = (ir == 0 ? 'I' : 'O'); |
151 | std::cout << "FMD" << det << ring << ":" << std::endl; | |
9eeb02aa | 152 | for (UShort_t sec = 0; sec < fMultiplicity.MaxSectors(); sec++) { |
9da38871 | 153 | std::cout << " Sector # " << sec << ":" << std::flush; |
9eeb02aa | 154 | for (UShort_t str = 0; str < fMultiplicity.MaxStrips(); str++) { |
9da38871 | 155 | if (str % 6 == 0) std::cout << "\n " << std::flush; |
156 | Float_t m = fMultiplicity(det, ring, sec, str); | |
157 | Float_t e = fEta(det, ring, 0, str); | |
158 | if (m == kInvalidMult && e == kInvalidEta) break; | |
159 | if (m == kInvalidMult) std::cout << " ---- "; | |
160 | else std::cout << Form("%6.3f", m); | |
161 | std::cout << "/"; | |
162 | if (e == kInvalidEta) std::cout << " ---- "; | |
163 | else std::cout << Form("%-6.3f", e); | |
164 | std::cout << " " << std::flush; | |
165 | } | |
166 | std::cout << std::endl; | |
167 | } | |
168 | } | |
169 | } | |
170 | } | |
171 | ||
172 | ||
173 | //____________________________________________________________________ | |
174 | // | |
175 | // EOF | |
176 | // |