Line data Source code
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 : /* $Id$ */
16 : /** @file AliFMDRecPoint.cxx
17 : @author Christian Holm Christensen <cholm@nbi.dk>
18 : @date Mon Mar 27 12:46:26 2006
19 : @brief Pseudo reconstructed charged particle multiplicity
20 : */
21 : //____________________________________________________________________
22 : //
23 : // Base class for reconstructed charged particle multiplicty in the
24 : // FMD.
25 : // The class contains the field fMethod which is a flag set by
26 : // the AliFMDRecPointAlgorithm that created the object. The flag tells us
27 : // which algorithm was used to create the data stored in the object.
28 : //
29 : #include "AliFMDRecPoint.h" // ALIFMDRECPOINT_H
30 : #include <TString.h> // ROOT_TString
31 : #include <Riostream.h> // ROOT_Riostream
32 :
33 : //____________________________________________________________________
34 : using std::cout;
35 : using std::endl;
36 12 : ClassImp(AliFMDRecPoint)
37 : #if 0
38 : ; // This is here to keep Emacs for indenting the next line
39 : #endif
40 :
41 : //____________________________________________________________________
42 2 : AliFMDRecPoint::AliFMDRecPoint()
43 2 : : fDetector(0),
44 2 : fRing('\0'),
45 2 : fSector(0),
46 2 : fStrip(0),
47 2 : fEta(0),
48 2 : fPhi(0),
49 2 : fEdep(0),
50 2 : fParticles(0)
51 10 : {
52 : // CTOR
53 4 : }
54 :
55 : //____________________________________________________________________
56 409600 : AliFMDRecPoint::AliFMDRecPoint(UShort_t detector, Char_t ring,
57 : UShort_t sector, UShort_t strip,
58 : Float_t eta, Float_t phi,
59 : Float_t edep, Float_t particles)
60 409600 : : fDetector(detector),
61 409600 : fRing(ring),
62 409600 : fSector(sector),
63 409600 : fStrip(strip),
64 409600 : fEta(eta),
65 409600 : fPhi(phi),
66 409600 : fEdep(edep),
67 409600 : fParticles(particles)
68 2048000 : {
69 819200 : }
70 :
71 : //____________________________________________________________________
72 : const char*
73 : AliFMDRecPoint::GetName() const
74 : {
75 : // Get the name
76 0 : static TString n;
77 0 : n = Form("FMD%d%c[%2d,%3d]", fDetector,fRing,fSector,fStrip);
78 0 : return n.Data();
79 0 : }
80 :
81 : //____________________________________________________________________
82 : const char*
83 : AliFMDRecPoint::GetTitle() const
84 : {
85 : // Get the title
86 0 : static TString t;
87 0 : t = Form("%f (%f,%f)", fParticles, fEta, fPhi);
88 0 : return t.Data();
89 0 : }
90 :
91 : //____________________________________________________________________
92 : void
93 : AliFMDRecPoint::Print(Option_t* option) const
94 : {
95 : // Print information
96 : //
97 : // Options:
98 : // D: Detector (default)
99 : // E: Eta range (default)
100 : // P: Phi range (default)
101 : //
102 0 : TString opt(option);
103 0 : cout << "FMD RecPoint in a strip: " << fParticles << endl;
104 0 : if (opt.Contains("D", TString::kIgnoreCase))
105 0 : cout << " Detector: FMD" << fDetector << fRing
106 0 : << "[" << fSector << "," << fStrip << "]" << endl;
107 0 : if (opt.Contains("E", TString::kIgnoreCase))
108 0 : cout << " Eta range: " << fEta << endl;
109 0 : if (opt.Contains("P", TString::kIgnoreCase))
110 0 : cout << " Phi range: " << fPhi << endl;
111 0 : }
112 :
113 :
114 : //____________________________________________________________________
115 : //
116 : // EOF
117 : //
|