]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFReconstructionerV2.cxx
iostream.h replaced by Riostream.h
[u/mrichter/AliRoot.git] / TOF / AliTOFReconstructionerV2.cxx
index 7286a91cd7b9644db8d1b79093664580090be602..dd127fa4fcf9178351fed6896a0ee1ecb08acc7b 100644 (file)
 #include "TROOT.h"
 #include "TSystem.h"
 #include <stdlib.h>
-#include <iostream.h>
-#include <fstream.h>
-#include "../TGeant3/TGeant3.h"
+#include <Riostream.h>
+#include <Riostream.h>
+#include "TGeant3.h"
+#include "TVirtualMC.h"
 
 #include "AliDetector.h"
-#include "AliMC.h"
 #include "AliRun.h"
 #include "AliTOF.h"
 #include "AliTOFDigitMap.h"
@@ -45,7 +45,7 @@
 #include "AliTOFReconstructionerV2.h"
 #include "AliTOFTrackV2.h"
 
-#include "../STEER/AliKalmanTrack.h"
+#include "AliKalmanTrack.h"
 #include "../TPC/AliTPCtrack.h"
 #include "../TRD/AliTRDtrack.h"
 
@@ -61,7 +61,6 @@ ClassImp(AliTOFReconstructionerV2)
   fdbg      =0;
   fDigitsMap=0x0;
   fField    =0;
-  fG3Geom   =0x0;
   fNDummyTracks=0;
   fScaleSigmaFactor=0.;
   fStep     =0; 
@@ -101,8 +100,6 @@ AliTOFReconstructionerV2::AliTOFReconstructionerV2(char* tpcBackTracks, char* to
   // initialize the G3 geometry 
   gAlice->Init();
   gAlice->Print(); 
-  // set the fg3 pointer to geometry used by IsInsideThePad method
-  fG3Geom = (TGeant3*) gMC;    
 
   // add Task to //root/Tasks folder
   TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; 
@@ -134,12 +131,6 @@ AliTOFReconstructionerV2::AliTOFReconstructionerV2(const AliTOFReconstructionerV
       fDigitsMap = 0;
     }
 
-  if (fG3Geom)
-    {
-      delete fG3Geom;
-      fG3Geom = 0;
-    }
-
   if (fTOFDigits)
     {
       delete fTOFDigits;
@@ -335,8 +326,8 @@ void AliTOFReconstructionerV2::Exec(Option_t* option)
       Double_t cc[15];
       // get sigmaY and sigmaZ
       rt->GetExternalCovariance(cc);
-      Double_t sigmaY =TMath::Sqrt(cc[0]); // [cm]
-      Double_t sigmaZ =TMath::Sqrt(cc[2]); // [cm]
+      //Double_t sigmaY =TMath::Sqrt(cc[0]); // [cm]
+      //Double_t sigmaZ =TMath::Sqrt(cc[2]); // [cm]
 
       // arrays used by the DigitFinder
       Int_t nSlot=1;
@@ -352,12 +343,12 @@ void AliTOFReconstructionerV2::Exec(Option_t* option)
       for (Int_t j=0; j<fNDummyTracks; i++) {
        AliTPCtrack *dummyrt=new AliTPCtrack(*rt);
        // get ylrf and zlrf
-       Double_t ylrf= dummyrt->GetY();  // P0
-       Double_t zlrf= dummyrt->GetZ();  // P1
+       //Double_t ylrf= dummyrt->GetY();  // P0
+       //Double_t zlrf= dummyrt->GetZ();  // P1
 
        // smear according to sigmaY and sigmaZ
-       Double_t ylrfNew=gRandom->Gaus(ylrf,fScaleSigmaFactor*sigmaY);
-       Double_t zlrfNew=gRandom->Gaus(zlrf,fScaleSigmaFactor*sigmaZ);
+       //Double_t ylrfNew=gRandom->Gaus(ylrf,fScaleSigmaFactor*sigmaY);
+       //Double_t zlrfNew=gRandom->Gaus(zlrf,fScaleSigmaFactor*sigmaZ);
 
        // set Y and Z accordingly
        // setter to be added in the class AliTPCtrack
@@ -719,6 +710,8 @@ void AliTOFReconstructionerV2::IsInsideThePad(Float_t x, Float_t y, Float_t z, I
   xTOF[1]=y;
   xTOF[2]=z;
   
+  TGeant3 * fG3Geom = (TGeant3*) gMC;
+
   fG3Geom->Gmedia(xTOF, numed);
   gcvolu=fG3Geom->Gcvolu();
   nLevel=gcvolu->nlevel;