]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulationFastPointsV0.cxx
filter out additional compile defines to fit into rootcints 1024 char limit
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationFastPointsV0.cxx
index 7f6548831bf91eaa4bd811a18b844a3727cf3456..517a66c839450c0e5c48f8f61cb4cfc9c32ed0ef 100644 (file)
 
 ClassImp(AliITSsimulationFastPointsV0)
 
-AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0()
-{
+AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0():
+fNrecp(0),
+fSx(0),
+fSz(0){
   // default constructor
-  fSx = 0;
-  fSz = 0;
 }
-AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const char *dataType){
+AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const char *dataType):
+fNrecp(0),
+fSx(0),
+fSz(0){
   //constructor
   Info("AliITSsimulationFastPointsV0","Standard constructor %s",dataType);
   fSx = new AliITSstatistics(2);
   fSz = new AliITSstatistics(2);
 }
 //______________________________________________________________________
-AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const AliITSsimulationFastPointsV0 &/*rec*/):AliITSsimulation(/*rec*/){
+AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const AliITSsimulationFastPointsV0 & rec):AliITSsimulation(rec),
+fNrecp(rec.fNrecp),
+fSx(rec.fSx),
+fSz(rec.fSz){
     // Copy constructor. 
 
-  Error("Copy constructor","Copy constructor not allowed");
-  
 }
 //______________________________________________________________________
-AliITSsimulationFastPointsV0& AliITSsimulationFastPointsV0::operator=(const AliITSsimulationFastPointsV0& /*source*/){
-    // Assignment operator. This is a function which is not allowed to be
-    // done.
-    Error("operator=","Assignment operator not allowed\n");
-    return *this; 
+AliITSsimulationFastPointsV0& AliITSsimulationFastPointsV0::operator=(const AliITSsimulationFastPointsV0&  /*source*/){
+    // Assignment operator
+  Error("operator=","Assignment operator not allowed");
+  return *this;
 }
 
 //----------------------------------------------------------
@@ -120,61 +123,50 @@ void AliITSsimulationFastPointsV0::CreateFastRecPoints(AliITSmodule *mod,Int_t m
 }
 //_______________________________________________________________________
 void AliITSsimulationFastPointsV0::AddSPD(Float_t &e,
-                                         AliITSmodule* /*mod*/,Int_t trackNumber,TClonesArray* recp){
+                                         AliITSmodule* mod,Int_t trackNumber,TClonesArray* recp){
   //
   TClonesArray &pt=*recp;
   const Float_t kmicronTocm = 1.0e-4;
   //  const Float_t kdEdXtoQ = ;
   const Float_t kRMSx = 12.0*kmicronTocm; // microns->cm ITS TDR Table 1.3
   const Float_t kRMSz = 70.0*kmicronTocm; // microns->cm ITS TDR Table 1.3
-  Float_t a1,a2; // general float.
-  AliITSRecPoint rpSPD;
-
-  rpSPD.fTracks[0]=trackNumber;
-  rpSPD.fTracks[1]=-3;
-  rpSPD.fTracks[2]=-3;
-  rpSPD.SetX(fSx->GetMean());
-  rpSPD.SetZ(fSz->GetMean());
-  rpSPD.SetdEdX(e);
-  rpSPD.SetQ(1.0);
-  a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
+  
+  Int_t lab[4] = {trackNumber,-3,-3,mod->GetIndex()};
+  Float_t a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
   //  if(a1>1.E5) printf("addSPD: layer=%d track #%d dedx=%e sigmaX2= %e ",
   //               mod->GetLayer(),trackNumber,e,a1);
-  rpSPD.SetSigmaX2(a1);
-  a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
+  Float_t a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
   //  if(a1>1.E5) printf(" sigmaZ2= %e\n",a2);
-  rpSPD.SetSigmaZ2(a2);
+  Float_t hit[5] = {fSx->GetMean(),fSz->GetMean(),a1,a2,1.0};
+  Int_t info[3] = {0,0,mod->GetLayer()};
+
+  AliITSRecPoint rpSPD(lab,hit,info,kTRUE);
+  rpSPD.SetdEdX(e);
 
-  //(mod->GetITS())->AddRecPoint(rpSPD);
   new (pt[fNrecp]) AliITSRecPoint(rpSPD);
   fNrecp++;
 }
 //_______________________________________________________________________
 void AliITSsimulationFastPointsV0::AddSDD(Float_t &e,
-                                         AliITSmodule* /*mod*/,Int_t trackNumber,TClonesArray* recp){
+                                         AliITSmodule* mod,Int_t trackNumber,TClonesArray* recp){
   //
   TClonesArray &pt=*recp;
   const Float_t kmicronTocm = 1.0e-4;
   const Float_t kdEdXtoQ = 2.778e+8; 
   const Float_t kRMSx = 38.0*kmicronTocm; // microns->cm ITS TDR Table 1.3
   const Float_t kRMSz = 28.0*kmicronTocm; // microns->cm ITS TDR Table 1.3
-  Float_t a1,a2; // general float.
-  AliITSRecPoint rpSDD;
-
-  rpSDD.fTracks[0]=trackNumber;
-  rpSDD.fTracks[1]=-3;
-  rpSDD.fTracks[2]=-3;
-  rpSDD.SetX(fSx->GetMean());
-  rpSDD.SetZ(fSz->GetMean());
-  rpSDD.SetdEdX(e);
-  rpSDD.SetQ(kdEdXtoQ*e);
-  a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
-  //  if(a1>1.E5) printf("addSDD: layer=%d track #%d dedx=%e sigmaX2= %e ",
+
+  Int_t lab[4] = {trackNumber,-3,-3,mod->GetIndex()};
+  Float_t a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
+  //  if(a1>1.E5) printf("addSPD: layer=%d track #%d dedx=%e sigmaX2= %e ",
   //               mod->GetLayer(),trackNumber,e,a1);
-  rpSDD.SetSigmaX2(a1);
-  a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
+  Float_t a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
   //  if(a1>1.E5) printf(" sigmaZ2= %e\n",a2);
-  rpSDD.SetSigmaZ2(a2);
+  Float_t hit[5] = {fSx->GetMean(),fSz->GetMean(),a1,a2,kdEdXtoQ*e};
+  Int_t info[3] = {0,0,mod->GetLayer()};
+
+  AliITSRecPoint rpSDD(lab,hit,info,kTRUE);
+  rpSDD.SetdEdX(e);
 
   new (pt[fNrecp]) AliITSRecPoint(rpSDD);
   fNrecp++;
@@ -182,30 +174,25 @@ void AliITSsimulationFastPointsV0::AddSDD(Float_t &e,
 }
 //_______________________________________________________________________
 void AliITSsimulationFastPointsV0::AddSSD(Float_t &e,
-                                         AliITSmodule* /*mod*/,Int_t trackNumber,TClonesArray* recp){
+                                         AliITSmodule* mod,Int_t trackNumber,TClonesArray* recp){
   // 
   TClonesArray &pt=*recp;
   const Float_t kmicronTocm = 1.0e-4;
   const Float_t kdEdXtoQ = 2.778e+8;
   const Float_t kRMSx = 20.0*kmicronTocm;  // microns->cm ITS TDR Table 1.3
   const Float_t kRMSz = 830.0*kmicronTocm; // microns->cm ITS TDR Table 1.3
-  Float_t a1,a2; // general float.
-  AliITSRecPoint rpSSD;
-
-  rpSSD.fTracks[0]=trackNumber;
-  rpSSD.fTracks[1]=-3;
-  rpSSD.fTracks[2]=-3;
-  rpSSD.SetX(fSx->GetMean());
-  rpSSD.SetZ(fSz->GetMean());
-  rpSSD.SetdEdX(e);
-  rpSSD.SetQ(kdEdXtoQ*e);
-  a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
-  //  if(a1>1.E5) printf("addSSD: layer=%d track #%d dedx=%e sigmaX2= %e ",
+
+  Int_t lab[4] = {trackNumber,-3,-3,mod->GetIndex()};
+  Float_t a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx;
+  //  if(a1>1.E5) printf("addSPD: layer=%d track #%d dedx=%e sigmaX2= %e ",
   //               mod->GetLayer(),trackNumber,e,a1);
-  rpSSD.SetSigmaX2(a1);
-  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);
+  Float_t a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz;
+  //  if(a1>1.E5) printf(" sigmaZ2= %e\n",a2);
+  Float_t hit[5] = {fSx->GetMean(),fSz->GetMean(),a1,a2,kdEdXtoQ*e};
+  Int_t info[3] = {0,0,mod->GetLayer()};
+
+  AliITSRecPoint rpSSD(lab,hit,info,kTRUE);
+  rpSSD.SetdEdX(e);
 
   new (pt[fNrecp]) AliITSRecPoint(rpSSD);
   fNrecp++;