]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulationFastPointsV0.cxx
fRandomized field added - needed by HBTAN
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationFastPointsV0.cxx
index b0d9578712810516b03c6232f0005fb2a849fa5f..447bc9ce7f53f55b7208d5f21b8e739d508aac58 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-*/
+/* $Id$ */
 
 #include <TParticle.h>
 #include <TRandom.h>
 
-
 #include "AliITS.h"
+#include "AliITShit.h"
+#include "AliITSRecPoint.h"
+#include "AliITSmodule.h"
+#include "AliITSgeom.h"
 #include "AliITSsimulationFastPointsV0.h"
 #include "AliITSstatistics.h"
 
@@ -29,7 +30,13 @@ ClassImp(AliITSsimulationFastPointsV0)
 
 AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0()
 {
+  // default constructor
+  fSx = 0;
+  fSz = 0;
+}
+AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const char *dataType){
   //constructor
+  Info("AliITSsimulationFastPointsV0","Standard constructor %s",dataType);
   fSx = new AliITSstatistics(2);
   fSz = new AliITSstatistics(2);
 }
@@ -38,8 +45,8 @@ AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0()
 AliITSsimulationFastPointsV0::~AliITSsimulationFastPointsV0()
 {
   //destructor
-  delete fSx;
-  delete fSz;
+  if(fSx) delete fSx;
+  if(fSz) delete fSz;
 
 }
 
@@ -51,6 +58,7 @@ void AliITSsimulationFastPointsV0::CreateFastRecPoints(AliITSmodule *mod,Int_t m
   Float_t x1,y1,z1;
   AliITShit *hit;
 
+  if(rndm!=0) module=0; // fix unsued parameter warnings.
   fSx->Reset(); // Start out with things clearly zeroed
   fSz->Reset(); // Start out with things clearly zeroed
   e = 0.; // Start out with things clearly zeroed
@@ -105,11 +113,11 @@ void AliITSsimulationFastPointsV0::AddSPD(Float_t &e,
   AliITSRecPoint rpSPD;
 
   rpSPD.fTracks[0]=trackNumber;
-  rpSPD.fTracks[1]=0;
-  rpSPD.fTracks[2]=0;
+  rpSPD.fTracks[1]=-3;
+  rpSPD.fTracks[2]=-3;
   rpSPD.SetX(fSx->GetMean());
   rpSPD.SetZ(fSz->GetMean());
-  rpSPD.SetdEdX(0.0);
+  rpSPD.SetdEdX(e);
   rpSPD.SetQ(1.0);
   a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
   //  if(a1>1.E5) printf("addSPD: layer=%d track #%d dedx=%e sigmaX2= %e ",
@@ -118,7 +126,6 @@ void AliITSsimulationFastPointsV0::AddSPD(Float_t &e,
   a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
   //  if(a1>1.E5) printf(" sigmaZ2= %e\n",a2);
   rpSPD.SetSigmaZ2(a2);
-  rpSPD.SetProbability(1.0);
 
   (mod->GetITS())->AddRecPoint(rpSPD);
 }
@@ -134,8 +141,8 @@ void AliITSsimulationFastPointsV0::AddSDD(Float_t &e,
   AliITSRecPoint rpSDD;
 
   rpSDD.fTracks[0]=trackNumber;
-  rpSDD.fTracks[1]=0;
-  rpSDD.fTracks[2]=0;
+  rpSDD.fTracks[1]=-3;
+  rpSDD.fTracks[2]=-3;
   rpSDD.SetX(fSx->GetMean());
   rpSDD.SetZ(fSz->GetMean());
   rpSDD.SetdEdX(e);
@@ -147,7 +154,6 @@ void AliITSsimulationFastPointsV0::AddSDD(Float_t &e,
   a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
   //  if(a1>1.E5) printf(" sigmaZ2= %e\n",a2);
   rpSDD.SetSigmaZ2(a2);
-  rpSDD.SetProbability(1.0);
 
   (mod->GetITS())->AddRecPoint(rpSDD);
 }
@@ -163,8 +169,8 @@ void AliITSsimulationFastPointsV0::AddSSD(Float_t &e,
   AliITSRecPoint rpSSD;
 
   rpSSD.fTracks[0]=trackNumber;
-  rpSSD.fTracks[1]=0;
-  rpSSD.fTracks[2]=0;
+  rpSSD.fTracks[1]=-3;
+  rpSSD.fTracks[2]=-3;
   rpSSD.SetX(fSx->GetMean());
   rpSSD.SetZ(fSz->GetMean());
   rpSSD.SetdEdX(e);
@@ -176,7 +182,6 @@ void AliITSsimulationFastPointsV0::AddSSD(Float_t &e,
   a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
   //  if(a1>1.E5) printf(" sigmaZ2= %e RMSx=%e RMSz=%e\n",a2,fSx->GetRMS(),fSz->GetRMS());
   rpSSD.SetSigmaZ2(a2);
-  rpSSD.SetProbability(1.0);
 
   (mod->GetITS())->AddRecPoint(rpSSD);
 }