1 /**************************************************************************
2 * Copyright(c) 2004, 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 **************************************************************************/
18 //____________________________________________________________________
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
26 #include "AliESDFMD.h" // ALIFMDESD_H
27 #include "AliLog.h" // ALILOG_H
28 #include "Riostream.h" // ROOT_Riostream
30 //____________________________________________________________________
33 ; // This is here to keep Emacs for indenting the next line
37 //____________________________________________________________________
38 AliESDFMD::AliESDFMD()
39 : fMultiplicity(AliFMDFloatMap::kMaxDetectors,
40 AliFMDFloatMap::kMaxRings,
41 AliFMDFloatMap::kMaxSectors,
42 AliFMDFloatMap::kMaxStrips),
43 fEta(AliFMDFloatMap::kMaxDetectors,
44 AliFMDFloatMap::kMaxRings,
46 AliFMDFloatMap::kMaxStrips)
51 //____________________________________________________________________
52 AliESDFMD::AliESDFMD(const AliESDFMD& other)
54 fMultiplicity(other.fMultiplicity),
60 //____________________________________________________________________
62 AliESDFMD::operator=(const AliESDFMD& other)
65 fMultiplicity = other.fMultiplicity;
70 //____________________________________________________________________
72 AliESDFMD::Clear(Option_t* )
74 fMultiplicity.Reset(kInvalidMult);
75 fEta.Reset(kInvalidEta);
79 //____________________________________________________________________
81 AliESDFMD::Multiplicity(UShort_t detector, Char_t ring, UShort_t sector,
84 // Return rough estimate of charged particle multiplicity in the
85 // strip FMD<detector><ring>[<sector>,<strip>].
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);
92 //____________________________________________________________________
94 AliESDFMD::Eta(UShort_t detector, Char_t ring, UShort_t /* sector */,
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).
103 return fEta(detector, ring, 0, strip);
106 //____________________________________________________________________
108 AliESDFMD::SetMultiplicity(UShort_t detector, Char_t ring, UShort_t sector,
109 UShort_t strip, Float_t mult)
111 // Return rough estimate of charged particle multiplicity in the
112 // strip FMD<detector><ring>[<sector>,<strip>].
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;
119 //____________________________________________________________________
121 AliESDFMD::SetEta(UShort_t detector, Char_t ring, UShort_t /* sector */,
122 UShort_t strip, Float_t eta)
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).
130 fEta(detector, ring, 0, strip) = eta;
133 //____________________________________________________________________
135 AliESDFMD::Print(Option_t* /* option*/) const
137 // Print all information to standard output.
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);
153 if (e == kInvalidEta) std::cout << " ---- ";
154 else std::cout << Form("%-6.3f", e);
155 std::cout << " " << std::flush;
157 std::cout << std::endl;
164 //____________________________________________________________________