]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDRecPoint.cxx
0. General code clean-up, including messages, and the like.
[u/mrichter/AliRoot.git] / FMD / AliFMDRecPoint.cxx
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 // Base class for reconstructed charged particle multiplicty in the
21 // FMD.  
22 // The class contains the field fMethod which is a flag set by
23 // the AliFMDRecPointAlgorithm that created the object. The flag tells us
24 // which algorithm was used to create the data stored in the object. 
25 //
26 #include "AliFMDRecPoint.h"     // ALIFMDRECPOINT_H
27 #include <TString.h>            // ROOT_TString 
28 #include <Riostream.h>          // ROOT_Riostream
29
30 //____________________________________________________________________
31 ClassImp(AliFMDRecPoint)
32 #if 0
33   ; // This is here to keep Emacs for indenting the next line
34 #endif
35
36 //____________________________________________________________________
37 AliFMDRecPoint::AliFMDRecPoint()
38   : fDetector(0),
39     fRing('\0'),
40     fSector(0),
41     fStrip(0),
42     fEta(0),
43     fPhi(0),
44     fEdep(0)
45 {}
46
47 //____________________________________________________________________
48 AliFMDRecPoint::AliFMDRecPoint(UShort_t detector,  Char_t   ring, 
49                                UShort_t sector,    UShort_t strip,
50                                Float_t  eta,       Float_t  phi,
51                                Float_t  edep,      Float_t  particles)
52   : fDetector(detector),
53     fRing(ring),
54     fSector(sector),
55     fStrip(strip),
56     fEta(eta),
57     fPhi(phi),
58     fEdep(edep),
59     fParticles(particles)
60 {
61 }
62
63 //____________________________________________________________________
64 const char*
65 AliFMDRecPoint::GetName() const 
66
67   static TString n;
68   n = Form("FMD%d%c[%2d,%3d]", fDetector,fRing,fSector,fStrip);
69   return n.Data();
70 }
71
72 //____________________________________________________________________
73 const char*
74 AliFMDRecPoint::GetTitle() const 
75
76   static TString t;
77   t = Form("%f (%f,%f)", fParticles, fEta, fPhi);
78   return t.Data();
79 }
80
81 //____________________________________________________________________
82 void
83 AliFMDRecPoint::Print(Option_t* option) const
84 {
85   // Print information 
86   // 
87   // Options:
88   //    D:           Detector (default)
89   //    E:           Eta range (default)
90   //    P:           Phi range (default)
91   //
92   TString opt(option);
93   cout << "FMD RecPoint in a strip: " << fParticles << endl;
94   if (opt.Contains("D", TString::kIgnoreCase))
95     cout << "  Detector:      FMD" << fDetector << fRing 
96          << "[" << fSector << "," << fStrip << "]" << endl;
97   if (opt.Contains("E", TString::kIgnoreCase))
98     cout << "  Eta range:     " << fEta << endl;
99   if (opt.Contains("P", TString::kIgnoreCase))
100     cout << "  Phi range:     " << fPhi << endl;
101 }
102
103     
104 //____________________________________________________________________
105 //
106 // EOF
107 //