1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
24 #include <TGeometry.h>
28 #include "AliITSgeom.h"
30 #include "AliITShit.h"
35 ////////////////////////////////////////////////////////////////////////
37 // Written by Rene Brun, Federico Carminati, and Roberto Barbera
40 // Modified and documented by Bjorn S. Nilsen
43 // AliITShit is the hit class for the ITS. Hits are the information
44 // that comes from a Monte Carlo at each step as a particle mass through
45 // sensitive detector elements as particles are transported through a
50 <img src="picts/ITS/AliITShit_Class_Diagram.gif">
53 <font size=+2 color=red>
54 <p>This show the relasionships between the ITS hit class and the rest of Aliroot.
59 //_____________________________________________________________________________
60 AliITShit::AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
64 // The creator of the AliITShit class. The variables shunt and
65 // track are passed to the creator of the AliHit class. See the AliHit
66 // class for a full description. the integer array *vol contains, in order,
67 // fLayer = vol[0], fDet = vol[1], fLadder = vol[2], fStatus = vol[3].
68 // The array *hits contains, in order, fX = hits[0], fY = hits[1],
69 // fZ = hits[2], fPx = hits[3], fPy = hits[4], fPz = hits[5],
70 // fDestep = hits[6], and fTof = hits[7].
72 fLayer = vol[0]; // Layer number
73 fLadder = vol[2]; // Ladder number
74 fDet = vol[1]; // Detector number
75 fStatus = vol[3]; // Track status flags
76 fX = hits[0]; // Track X position
77 fY = hits[1]; // Track Y position
78 fZ = hits[2]; // Track Z position
79 fPx = hits[3]; // Track X Momentum
80 fPy = hits[4]; // Track Y Momentum
81 fPz = hits[5]; // Track Z Momentum
82 fDestep = hits[6]; // Track dE/dx for this step
83 fTof = hits[7]; // Track Time of Flight for this step
86 void AliITShit::GetPositionL(Float_t &x,Float_t &y,Float_t &z){
87 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
93 gm->GtoL(fLayer,fLadder,fDet,g,l);
100 void AliITShit::GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof){
101 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
107 gm->GtoL(fLayer,fLadder,fDet,g,l);
115 Float_t AliITShit::GetXL(){
116 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
122 gm->GtoL(fLayer,fLadder,fDet,g,l);
126 Float_t AliITShit::GetYL(){
127 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
133 gm->GtoL(fLayer,fLadder,fDet,g,l);
137 Float_t AliITShit::GetZL(){
138 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
144 gm->GtoL(fLayer,fLadder,fDet,g,l);
148 void AliITShit::GetMomentumL(Float_t &px,Float_t &py,Float_t &pz){
149 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
155 gm->GtoLMomentum(fLayer,fLadder,fDet,g,l);