]>
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 | ||
c55ca9e5 | 27 | #include "TMath.h" |
a9e2aefa | 28 | #include "AliMUONHit.h" |
29 | ||
30 | ClassImp(AliMUONHit) | |
31 | ||
32 | //___________________________________________ | |
0e83b872 | 33 | AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits): |
a9e2aefa | 34 | AliHit(shunt, track) |
35 | { | |
36 | // Constructor | |
2eb55fab | 37 | fChamber = vol[0]; |
38 | fParticle = hits[0]; | |
39 | fX = hits[1]; | |
40 | fY = hits[2]; | |
41 | fZ = hits[3]; | |
42 | fTheta = hits[4]; | |
43 | fPhi = hits[5]; | |
44 | fTlength = hits[6]; | |
45 | fEloss = hits[7]; | |
46 | fPHfirst = (Int_t) hits[8]; | |
47 | fPHlast = (Int_t) hits[9]; | |
48 | fPTot = hits[10]; | |
49 | fPx = hits[11]; | |
50 | fPy = hits[12]; | |
51 | fPz = hits[13]; | |
52 | fAge = hits[14]; | |
1391e633 | 53 | fXref = 0.; |
54 | fYref = 0.; | |
55 | fZref = 0.; | |
a9e2aefa | 56 | } |
0e83b872 | 57 | //___________________________________________ |
1391e633 | 58 | AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart, |
59 | Float_t X, Float_t Y, Float_t Z, Float_t tof, Float_t momentum, | |
60 | Float_t theta, Float_t phi, Float_t length, Float_t destep): | |
0e83b872 | 61 | AliHit(shunt, track) |
62 | { | |
63 | // Constructor | |
64 | fChamber = iChamber; | |
65 | fParticle = idpart; | |
66 | fX = X; | |
67 | fY = Y; | |
68 | fZ = Z; | |
69 | fTheta = theta; | |
70 | fPhi = phi; | |
71 | fTlength = length; | |
72 | fEloss = destep; | |
73 | fPHfirst = 0; | |
74 | fPHlast = 0; | |
75 | fPTot = momentum; | |
c55ca9e5 | 76 | fPx = momentum * TMath::Sin(theta) * TMath::Cos(phi); |
77 | fPy = momentum * TMath::Sin(theta) * TMath::Sin(phi); | |
78 | fPx = momentum * TMath::Cos(theta) ; | |
0e83b872 | 79 | fAge = tof; |
1391e633 | 80 | fXref = 0.; |
81 | fYref = 0.; | |
82 | fZref = 0.; | |
0e83b872 | 83 | } |
1391e633 | 84 | //----------------------------------------------------------------------------------------------- |
85 | AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart, | |
86 | Float_t X, Float_t Y, Float_t Z, Float_t tof, Float_t momentum, | |
87 | Float_t theta, Float_t phi, Float_t length, Float_t destep, | |
88 | Float_t Xref,Float_t Yref,Float_t Zref): | |
89 | AliHit(shunt, track) | |
90 | { | |
91 | // Constructor | |
92 | fChamber = iChamber; | |
93 | fParticle = idpart; | |
94 | fX = X; | |
95 | fY = Y; | |
96 | fZ = Z; | |
97 | fTheta = theta; | |
98 | fPhi = phi; | |
99 | fTlength = length; | |
100 | fEloss = destep; | |
101 | fPHfirst = 0; | |
102 | fPHlast = 0; | |
103 | fPTot = momentum; | |
c55ca9e5 | 104 | fPx = momentum * TMath::Sin(theta) * TMath::Cos(phi); |
105 | fPy = momentum * TMath::Sin(theta) * TMath::Sin(phi); | |
106 | fPx = momentum * TMath::Cos(theta) ; | |
1391e633 | 107 | fAge = tof; |
108 | fXref = Xref; | |
109 | fYref = Yref; | |
110 | fZref = Zref; | |
111 | } | |
112 | //----------------------------------------------------------------------------------------------- | |
a9e2aefa | 113 |