]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 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 | ||
88cb7938 | 16 | /* $Id$ */ |
0e83b872 | 17 | |
34c512f6 | 18 | // MUON classe for MonteCarlo Hits, inherited from AliHit for the |
19 | // In addition to the ALiHit data member fX, fY, fZ and fTrack, AliMUONHit contains some info about the particle crossing the chamber: | |
20 | // Impulsion: fPtot, fPx, fPy and fPz | |
21 | // Reference position at the center of the chamber (wire plane) fXref, fYref and fZref | |
22 | // Cumulated path along the active volume fTlength for spliting of hits for very inclined tracks | |
23 | // Energy loss of the particle inside the gas active volume. | |
24 | // Incident fTheta and fPhi angle with respect of the wire plane of the chamber. | |
25 | // | |
26 | ||
30178c30 | 27 | #include <TMath.h> |
28 | ||
a9e2aefa | 29 | #include "AliMUONHit.h" |
30 | ||
31 | ClassImp(AliMUONHit) | |
32 | ||
30178c30 | 33 | //___________________________________________ |
34 | AliMUONHit::AliMUONHit() | |
35 | : AliHit() | |
36 | { | |
37 | // Default constructor | |
38 | } | |
39 | ||
a9e2aefa | 40 | //___________________________________________ |
0e83b872 | 41 | AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits): |
a9e2aefa | 42 | AliHit(shunt, track) |
43 | { | |
44 | // Constructor | |
2eb55fab | 45 | fChamber = vol[0]; |
46 | fParticle = hits[0]; | |
47 | fX = hits[1]; | |
48 | fY = hits[2]; | |
49 | fZ = hits[3]; | |
50 | fTheta = hits[4]; | |
51 | fPhi = hits[5]; | |
52 | fTlength = hits[6]; | |
53 | fEloss = hits[7]; | |
54 | fPHfirst = (Int_t) hits[8]; | |
55 | fPHlast = (Int_t) hits[9]; | |
56 | fPTot = hits[10]; | |
57 | fPx = hits[11]; | |
58 | fPy = hits[12]; | |
59 | fPz = hits[13]; | |
60 | fAge = hits[14]; | |
1391e633 | 61 | fXref = 0.; |
62 | fYref = 0.; | |
63 | fZref = 0.; | |
a9e2aefa | 64 | } |
0e83b872 | 65 | //___________________________________________ |
1391e633 | 66 | AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart, |
67 | Float_t X, Float_t Y, Float_t Z, Float_t tof, Float_t momentum, | |
68 | Float_t theta, Float_t phi, Float_t length, Float_t destep): | |
0e83b872 | 69 | AliHit(shunt, track) |
70 | { | |
71 | // Constructor | |
72 | fChamber = iChamber; | |
73 | fParticle = idpart; | |
74 | fX = X; | |
75 | fY = Y; | |
76 | fZ = Z; | |
77 | fTheta = theta; | |
78 | fPhi = phi; | |
79 | fTlength = length; | |
80 | fEloss = destep; | |
81 | fPHfirst = 0; | |
82 | fPHlast = 0; | |
83 | fPTot = momentum; | |
c55ca9e5 | 84 | fPx = momentum * TMath::Sin(theta) * TMath::Cos(phi); |
85 | fPy = momentum * TMath::Sin(theta) * TMath::Sin(phi); | |
86 | fPx = momentum * TMath::Cos(theta) ; | |
0e83b872 | 87 | fAge = tof; |
1391e633 | 88 | fXref = 0.; |
89 | fYref = 0.; | |
90 | fZref = 0.; | |
0e83b872 | 91 | } |
1391e633 | 92 | //----------------------------------------------------------------------------------------------- |
93 | AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart, | |
94 | Float_t X, Float_t Y, Float_t Z, Float_t tof, Float_t momentum, | |
95 | Float_t theta, Float_t phi, Float_t length, Float_t destep, | |
96 | Float_t Xref,Float_t Yref,Float_t Zref): | |
97 | AliHit(shunt, track) | |
98 | { | |
99 | // Constructor | |
100 | fChamber = iChamber; | |
101 | fParticle = idpart; | |
102 | fX = X; | |
103 | fY = Y; | |
104 | fZ = Z; | |
105 | fTheta = theta; | |
106 | fPhi = phi; | |
107 | fTlength = length; | |
108 | fEloss = destep; | |
109 | fPHfirst = 0; | |
110 | fPHlast = 0; | |
111 | fPTot = momentum; | |
c55ca9e5 | 112 | fPx = momentum * TMath::Sin(theta) * TMath::Cos(phi); |
113 | fPy = momentum * TMath::Sin(theta) * TMath::Sin(phi); | |
114 | fPx = momentum * TMath::Cos(theta) ; | |
1391e633 | 115 | fAge = tof; |
116 | fXref = Xref; | |
117 | fYref = Yref; | |
118 | fZref = Zref; | |
119 | } | |
120 | //----------------------------------------------------------------------------------------------- | |
a9e2aefa | 121 |