]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDHit.cxx
Replacing array of objects by array of pointers
[u/mrichter/AliRoot.git] / FMD / AliFMDHit.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 //  Hits in the FMD 
21 //
22 // Latest changes by Christian Holm Christensen
23 //
24 #include "AliFMDHit.h"          // ALIFMDHIT_H
25 #include "AliLog.h"             // ALILOG_H
26 #include "Riostream.h"          // ROOT_Riostream
27
28 //____________________________________________________________________
29 ClassImp(AliFMDHit)
30 #if 0
31   ; // This is here to keep Emacs for indenting the next line
32 #endif
33
34
35 //____________________________________________________________________
36 AliFMDHit::AliFMDHit()
37   : fDetector(0), 
38     fRing(0), 
39     fSector(0), 
40     fStrip('\0'), 
41     fPx(0),
42     fPy(0),
43     fPz(0),
44     fPdg(0),
45     fEdep(0), 
46     fTime(0)
47 {
48   fX = fY = fZ = 0;
49 }
50   
51
52 //____________________________________________________________________
53 AliFMDHit::AliFMDHit(Int_t    shunt, 
54                      Int_t    track, 
55                      UShort_t detector, 
56                      Char_t   ring, 
57                      UShort_t sector, 
58                      UShort_t strip, 
59                      Float_t  x, 
60                      Float_t  y, 
61                      Float_t  z,
62                      Float_t  px, 
63                      Float_t  py, 
64                      Float_t  pz,
65                      Float_t  edep,
66                      Int_t    pdg,
67                      Float_t  t)
68   : AliHit(shunt, track),
69     fDetector(detector), 
70     fRing(ring), 
71     fSector(sector), 
72     fStrip(strip), 
73     fPx(px),
74     fPy(py),
75     fPz(pz),
76     fPdg(pdg),
77     fEdep(edep), 
78     fTime(t)
79 {
80   // Normal FMD hit ctor
81   // 
82   // Parameters:
83   // 
84   //    shunt     ???
85   //    track     Track #
86   //    detector  Detector # (1, 2, or 3)                      
87   //    ring      Ring ID ('I' or 'O')
88   //    sector    Sector # (For inner/outer rings: 0-19/0-39)
89   //    strip     Strip # (For inner/outer rings: 0-511/0-255)
90   //    x         Track's X-coordinate at hit
91   //    y         Track's Y-coordinate at hit
92   //    z         Track's Z-coordinate at hit
93   //    px        X-component of track's momentum 
94   //    py        Y-component of track's momentum
95   //    pz        Z-component of track's momentum
96   //    edep      Energy deposited by track
97   //    pdg       Track's particle Id #
98   //    t         Time when the track hit 
99   // 
100   fX = x;
101   fY = y;
102   fZ = z;
103 }
104
105 //____________________________________________________________________
106 void
107 AliFMDHit::Print(Option_t* /* option */) const 
108 {
109   // Print Hit to standard out 
110   cout << "AliFMDHit: FMD" 
111        << fDetector << fRing << "[" 
112        << setw(3) << fSector << ","
113        << setw(3) << fStrip << "] = " 
114        << fEdep << endl;
115 }
116
117 //____________________________________________________________________
118 //
119 // EOF
120 //