Line data Source code
1 : /**************************************************************************
2 : * Copyright(c) 1998-1999, 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 : // volume:
19 : // [0] = module number 1-60 (1==>(0-0), 60 (5-9)
20 : // [1] = Plastic number: 0 (down) to 1 (up)
21 : //
22 : // hit
23 : // [0] = PID
24 : // [1-3] = x, y, z
25 : // [4] = time
26 : // [5-7] = px, py, pz
27 : // [8] = energy
28 : // [9] = energy loss
29 : // [10] = trak length in plastic
30 :
31 : #include "AliACORDEhit.h"
32 :
33 : #include <TMath.h>
34 :
35 : #include "AliConst.h"
36 :
37 12 : ClassImp(AliACORDEhit)
38 :
39 : //____________________________________________________________________________
40 : AliACORDEhit::AliACORDEhit()
41 1 : : AliHit(),
42 1 : fModule(0),
43 1 : fPlastic(0),
44 1 : fTrackId(0),
45 1 : fTime(0),
46 1 : fPx(0),
47 1 : fPy(0),
48 1 : fPz(0),
49 1 : fEloss(0),
50 1 : fEnergy(0),
51 1 : fTrkLength(0)
52 5 : {
53 : //
54 : // default ctor for AliACORDEhit object
55 : //
56 2 : }
57 :
58 : //_____________________________________________________________________________
59 : AliACORDEhit::AliACORDEhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits)
60 0 : : AliHit(shunt, track),
61 0 : fModule(vol[0]),
62 0 : fPlastic(vol[1]),
63 0 : fTrackId((Int_t) hits[0]),
64 0 : fTime(hits[4]),
65 0 : fPx(hits[5]),
66 0 : fPy(hits[6]),
67 0 : fPz(hits[7]),
68 0 : fEloss(hits[9]),
69 0 : fEnergy(hits[8]),
70 0 : fTrkLength(hits[10])
71 0 : {
72 : //
73 : // Constructor of hit object
74 : //
75 0 : fX = hits[1];
76 0 : fY = hits[2];
77 0 : fZ = hits[3];
78 0 : }
79 :
80 :
81 : //_____________________________________________________________________________
82 : AliACORDEhit::~AliACORDEhit()
83 4 : {
84 : //
85 : // Default destructor.
86 : //
87 4 : }
88 :
89 :
90 : //_____________________________________________________________________________
91 : Float_t AliACORDEhit::PolarAngle() const
92 : {
93 : //
94 : //
95 : //
96 : // return kRaddeg*TMath::ACos(-fPy/this->Energy());
97 0 : return kRaddeg*TMath::ACos(fPz/this->Energy());
98 : }
99 :
100 : //_____________________________________________________________________________
101 : Float_t AliACORDEhit::AzimuthAngle() const
102 : {
103 : //
104 : //
105 : //
106 : // return kRaddeg*TMath::ATan2(-fPx, -fPz);
107 0 : return kRaddeg*TMath::ATan2(fPx, fPz);
108 : }
|