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 **************************************************************************/
18 Revision 1.1.2.1 2000/06/11 20:16:05 barbera
19 New: Fast simulation class for the ITS, class as part of new ITS code
24 #include <TParticle.h>
26 #include "AliITSsimulationFastPoints.h"
27 #include "AliITSstatistics.h"
29 ClassImp(AliITSsimulationFastPoints)
31 AliITSsimulationFastPoints::AliITSsimulationFastPoints()
34 fSx = new AliITSstatistics(2);
35 fSz = new AliITSstatistics(2);
38 //----------------------------------------------------------
39 AliITSsimulationFastPoints::~AliITSsimulationFastPoints()
47 //-------------------------------------------------------------
48 void AliITSsimulationFastPoints::CreateFastRecPoints(AliITSmodule *mod){
49 // Fast points simulator for all of the ITS.
50 Int_t nhit,h,trk,ifirst;
51 Float_t x,y,z,t,e;// local coordinate (cm) and time of flight, and dedx.
55 fSx->Reset(); // Start out with things clearly zeroed
56 fSz->Reset(); // Start out with things clearly zeroed
57 e = 0.; // Start out with things clearly zeroed
59 nhit = mod->GetNhits();
63 hit->GetPositionL(x,y,z,t);
64 if(ifirst) {x1=x;y1=y;z1=z;}
65 e += hit->GetIonization();
66 trk = hit->GetTrack();
67 fSx->AddValue((Double_t)x,weight);
68 fSz->AddValue((Double_t)z,weight);
70 if(hit->StatusExiting()|| // leaving volume
71 hit->StatusDisappeared()|| // interacted/decayed...
72 hit->StatusStop() // dropped below E cuts.
73 ){ // exiting track, write out RecPoint.
74 // if(fSz->GetRMS()>1.E-1) {
75 // TParticle *part = hit->GetParticle();
76 // printf("idpart %d energy %f \n",part->GetPdgCode(),part->Energy());
77 // printf("diffx=%e diffy=%e diffz=%e\n",x-x1,y-y1,z-z1);
79 switch (mod->GetLayer()){
80 case 1: case 2: // SPDs
83 case 3: case 4: // SDDs
86 case 5: case 6: // SSDs
98 //_______________________________________________________________________
99 void AliITSsimulationFastPoints::AddSPD(Float_t &e,
100 AliITSmodule *mod,Int_t trackNumber){
101 const Float_t kcmTomicron = 1.0e4;
102 // const Float_t kdEdXtoQ = ;
103 const Float_t kRMSx = 12.0; // microns ITS TDR Table 1.3
104 const Float_t kRMSz = 70.0; // microns ITS TDR Table 1.3
105 Float_t a1,a2; // general float.
106 AliITSRecPoint rpSPD;
107 Int_t *trk = rpSPD.GetTracks();
109 trk[0] = trackNumber;
110 trk[1] = 0; trk[2] = 0;
111 rpSPD.SetX(kcmTomicron*fSx->GetMean());
112 rpSPD.SetZ(kcmTomicron*fSz->GetMean());
115 a1 = kcmTomicron*fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
116 // if(a1>1.E5) printf("addSPD: layer=%d track #%d dedx=%e sigmaX2= %e ",
117 // mod->GetLayer(),trackNumber,e,a1);
118 rpSPD.SetSigmaX2(a1);
119 a2 = kcmTomicron*fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
120 // if(a1>1.E5) printf(" sigmaZ2= %e\n",a2);
121 rpSPD.SetSigmaZ2(a2);
122 rpSPD.SetProbability(1.0);
124 (mod->GetITS())->AddRecPoint(rpSPD);
126 //_______________________________________________________________________
127 void AliITSsimulationFastPoints::AddSDD(Float_t &e,
128 AliITSmodule *mod,Int_t trackNumber){
130 const Float_t kcmTomicron = 1.0e4;
131 const Float_t kdEdXtoQ = 2.778e+8; // Boris Batyuna June 10 2000.
132 const Float_t kRMSx = 38.0; // microns ITS TDR Table 1.3
133 const Float_t kRMSz = 28.0; // microns ITS TDR Table 1.3
134 Float_t a1,a2; // general float.
135 AliITSRecPoint rpSDD;
136 Int_t *trk = rpSDD.GetTracks();
138 trk[0] = trackNumber;
139 trk[1] = 0; trk[2] = 0;
140 rpSDD.SetX(kcmTomicron*fSx->GetMean());
141 rpSDD.SetZ(kcmTomicron*fSz->GetMean());
143 rpSDD.SetQ(kdEdXtoQ*e);
144 a1 = kcmTomicron*fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
145 // if(a1>1.E5) printf("addSDD: layer=%d track #%d dedx=%e sigmaX2= %e ",
146 // mod->GetLayer(),trackNumber,e,a1);
147 rpSDD.SetSigmaX2(a1);
148 a2 = kcmTomicron*fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
149 // if(a1>1.E5) printf(" sigmaZ2= %e\n",a2);
150 rpSDD.SetSigmaZ2(a2);
151 rpSDD.SetProbability(1.0);
153 (mod->GetITS())->AddRecPoint(rpSDD);
155 //_______________________________________________________________________
156 void AliITSsimulationFastPoints::AddSSD(Float_t &e,
157 AliITSmodule *mod,Int_t trackNumber){
159 const Float_t kcmTomicron = 1.0e4;
160 const Float_t kdEdXtoQ = 2.778e+8; // Boris Batyuna June 10 2000.
161 const Float_t kRMSx = 20.0; // microns ITS TDR Table 1.3
162 const Float_t kRMSz = 830.0; // microns ITS TDR Table 1.3
163 Float_t a1,a2; // general float.
164 AliITSRecPoint rpSSD;
165 Int_t *trk = rpSSD.GetTracks();
167 trk[0] = trackNumber;
168 trk[1] = 0; trk[2] = 0;
169 rpSSD.SetX(kcmTomicron*fSx->GetMean());
170 rpSSD.SetZ(kcmTomicron*fSz->GetMean());
172 rpSSD.SetQ(kdEdXtoQ*e);
173 a1 = kcmTomicron*fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
174 // if(a1>1.E5) printf("addSSD: layer=%d track #%d dedx=%e sigmaX2= %e ",
175 // mod->GetLayer(),trackNumber,e,a1);
176 rpSSD.SetSigmaX2(a1);
177 a2 = kcmTomicron*fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
178 // if(a1>1.E5) printf(" sigmaZ2= %e RMSx=%e RMSz=%e\n",a2,fSx->GetRMS(),fSz->GetRMS());
179 rpSSD.SetSigmaZ2(a2);
180 rpSSD.SetProbability(1.0);
182 (mod->GetITS())->AddRecPoint(rpSSD);
184 //_______________________________________________________________________