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