]>
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, | |
46 | AliFMDFloatMap::kMaxStrips) | |
47 | { | |
48 | // Default CTOR | |
49 | } | |
50 | ||
51 | //____________________________________________________________________ | |
52 | AliESDFMD::AliESDFMD(const AliESDFMD& other) | |
53 | : TObject(other), | |
54 | fMultiplicity(other.fMultiplicity), | |
55 | fEta(other.fEta) | |
56 | { | |
57 | // Default CTOR | |
58 | } | |
59 | ||
60 | //____________________________________________________________________ | |
61 | AliESDFMD& | |
62 | AliESDFMD::operator=(const AliESDFMD& other) | |
63 | { | |
64 | // Default CTOR | |
65 | fMultiplicity = other.fMultiplicity; | |
66 | fEta = other.fEta; | |
67 | return *this; | |
68 | } | |
69 | ||
70 | //____________________________________________________________________ | |
71 | void | |
72 | AliESDFMD::Clear(Option_t* ) | |
73 | { | |
74 | fMultiplicity.Reset(kInvalidMult); | |
75 | fEta.Reset(kInvalidEta); | |
76 | } | |
77 | ||
78 | ||
79 | //____________________________________________________________________ | |
80 | Float_t | |
81 | AliESDFMD::Multiplicity(UShort_t detector, Char_t ring, UShort_t sector, | |
82 | UShort_t strip) const | |
83 | { | |
84 | // Return rough estimate of charged particle multiplicity in the | |
85 | // strip FMD<detector><ring>[<sector>,<strip>]. | |
86 | // | |
87 | // Note, that this should at most be interpreted as the sum | |
88 | // multiplicity of secondaries and primaries. | |
89 | return fMultiplicity(detector, ring, sector, strip); | |
90 | } | |
91 | ||
92 | //____________________________________________________________________ | |
93 | Float_t | |
94 | AliESDFMD::Eta(UShort_t detector, Char_t ring, UShort_t /* sector */, | |
95 | UShort_t strip) const | |
96 | { | |
97 | // Return pseudo-rapidity of the strip | |
98 | // FMD<detector><ring>[<sector>,<strip>]. (actually, the sector | |
99 | // argument is ignored, as it is assumed that the primary vertex is | |
100 | // a (x,y) = (0,0), and that the modules are aligned with a | |
101 | // precision better than 2 degrees in the azimuthal angle). | |
102 | // | |
103 | return fEta(detector, ring, 0, strip); | |
104 | } | |
105 | ||
106 | //____________________________________________________________________ | |
107 | void | |
108 | AliESDFMD::SetMultiplicity(UShort_t detector, Char_t ring, UShort_t sector, | |
109 | UShort_t strip, Float_t mult) | |
110 | { | |
111 | // Return rough estimate of charged particle multiplicity in the | |
112 | // strip FMD<detector><ring>[<sector>,<strip>]. | |
113 | // | |
114 | // Note, that this should at most be interpreted as the sum | |
115 | // multiplicity of secondaries and primaries. | |
116 | fMultiplicity(detector, ring, sector, strip) = mult; | |
117 | } | |
118 | ||
119 | //____________________________________________________________________ | |
120 | void | |
121 | AliESDFMD::SetEta(UShort_t detector, Char_t ring, UShort_t /* sector */, | |
122 | UShort_t strip, Float_t eta) | |
123 | { | |
124 | // Set pseudo-rapidity of the strip | |
125 | // FMD<detector><ring>[<sector>,<strip>]. (actually, the sector | |
126 | // argument is ignored, as it is assumed that the primary vertex is | |
127 | // a (x,y) = (0,0), and that the modules are aligned with a | |
128 | // precision better than 2 degrees in the azimuthal angle). | |
129 | // | |
130 | fEta(detector, ring, 0, strip) = eta; | |
131 | } | |
132 | ||
133 | //____________________________________________________________________ | |
134 | void | |
135 | AliESDFMD::Print(Option_t* /* option*/) const | |
136 | { | |
6169f936 | 137 | // Print all information to standard output. |
9da38871 | 138 | std::cout << "AliESDFMD:" << std::endl; |
139 | for (size_t det = 1; det <= fMultiplicity.MaxDetectors(); det++) { | |
140 | for (size_t ir = 0; ir < fMultiplicity.MaxRings(); ir++) { | |
141 | Char_t ring = (ir == 0 ? 'I' : 'O'); | |
142 | std::cout << "FMD" << det << ring << ":" << std::endl; | |
143 | for (size_t sec = 0; sec < fMultiplicity.MaxSectors(); sec++) { | |
144 | std::cout << " Sector # " << sec << ":" << std::flush; | |
145 | for (size_t str = 0; str < fMultiplicity.MaxStrips(); str++) { | |
146 | if (str % 6 == 0) std::cout << "\n " << std::flush; | |
147 | Float_t m = fMultiplicity(det, ring, sec, str); | |
148 | Float_t e = fEta(det, ring, 0, str); | |
149 | if (m == kInvalidMult && e == kInvalidEta) break; | |
150 | if (m == kInvalidMult) std::cout << " ---- "; | |
151 | else std::cout << Form("%6.3f", m); | |
152 | std::cout << "/"; | |
153 | if (e == kInvalidEta) std::cout << " ---- "; | |
154 | else std::cout << Form("%-6.3f", e); | |
155 | std::cout << " " << std::flush; | |
156 | } | |
157 | std::cout << std::endl; | |
158 | } | |
159 | } | |
160 | } | |
161 | } | |
162 | ||
163 | ||
164 | //____________________________________________________________________ | |
165 | // | |
166 | // EOF | |
167 | // |