]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOS.cxx
Pi0 identification with PID was wrongly done, changes in GetEllipseParameters
[u/mrichter/AliRoot.git] / PHOS / AliPHOS.cxx
index 941ffa3d08de8ea727877afb84c30a65113c02d3..4d36217dd8209550cee1962dad2db3b64ee32dd4 100644 (file)
@@ -35,15 +35,12 @@ class TFile;
 
 // --- AliRoot header files ---
 #include "AliMagF.h"
-#include "AliESDtrack.h" 
-#include "AliESD.h"
 #include "AliPHOS.h"
-#include "AliPHOSGetter.h"
-#include "AliPHOSQAChecker.h"
+#include "AliPHOSLoader.h"
 #include "AliRun.h"
 #include "AliPHOSDigitizer.h"
 #include "AliPHOSSDigitizer.h"
-#include "AliPHOSReconstructioner.h"
+
 ClassImp(AliPHOS)
 //____________________________________________________________________________
 AliPHOS:: AliPHOS() : AliDetector()
@@ -52,6 +49,7 @@ AliPHOS:: AliPHOS() : AliDetector()
   fName="PHOS";
   fQATask = 0;
   fTreeQA = 0;
+  fDebug  = 0; 
 }
 
 //____________________________________________________________________________
@@ -61,6 +59,7 @@ AliPHOS::AliPHOS(const char* name, const char* title): AliDetector(name, title)
   
   fQATask = 0;
   fTreeQA = 0;
+  fDebug =  0; 
 }
 
 //____________________________________________________________________________
@@ -72,6 +71,7 @@ AliPHOS::~AliPHOS()
 //____________________________________________________________________________
 void AliPHOS::Copy(AliPHOS & phos)
 {
+  // copy method to be used byy the cpy ctor
   TObject::Copy(phos) ; 
   //  fQATask = AliPHOSQAChecker::Copy(*(phos.fQATask)) ; 
   phos.fTreeQA = fTreeQA->CloneTree() ; 
@@ -374,50 +374,6 @@ void AliPHOS::CreateMaterials()
 
 }
 
-//____________________________________________________________________________
-void AliPHOS::FillESD(AliESD* esd) const 
-{
-  // Called by AliReconstruct after Reconstruct() and global tracking and vertxing
-
-  //Creates the tracksegments and Recparticles
-  AliPHOSReconstructioner * rec = new AliPHOSReconstructioner((fLoader->GetRunLoader()->GetFileName()).Data()) ; 
-  TList * taskslist = rec->GetListOfTasks() ; 
-  Int_t index ;
-  TTask * task ; 
-  TString name ; 
-  // set clusterizer task inactive 
-  for (index = 0; index < taskslist->GetSize(); index++) {
-    task = dynamic_cast<TTask *>(taskslist->At(index)) ; 
-    name = task->GetName() ; 
-    if ( name.Contains(AliConfig::Instance()->GetReconstructionerTaskName()))
-      task->SetActive(kFALSE) ; 
-    if ( name.Contains(AliConfig::Instance()->GetTrackerTaskName()))
-      (dynamic_cast<AliPHOSTrackSegmentMaker *> (task))->SetESD(esd) ; 
-  }
-  rec->SetEventRange(0, -1) ; // do all the events
-  rec->ExecuteTask("deb") ; 
-
-  // Creates AliESDtrack from AliPHOSRecParticles 
-  AliPHOSGetter *gime = AliPHOSGetter::Instance( (fLoader->GetRunLoader()->GetFileName()).Data() ) ;
-  gime->Event(gime->EventNumber(), "P") ; 
-  TClonesArray *recParticles = gime->RecParticles();
-  Int_t nOfRecParticles = recParticles->GetEntries();
-  for (Int_t recpart = 0 ; recpart < nOfRecParticles ; recpart++) {
-    AliPHOSRecParticle * rp = dynamic_cast<AliPHOSRecParticle*>(recParticles->At(recpart));
-    rp->Print();
-    AliESDtrack * et = new AliESDtrack() ; 
-    // fills the ESDtrack
-    Double_t xyz[3];
-    for (Int_t ixyz=0; ixyz<3; ixyz++) xyz[ixyz] = rp->GetPos()[ixyz];
-    et->SetPHOSposition(xyz) ; 
-    et->SetPHOSsignal  (rp->Energy()) ; 
-    et->SetPHOSpid     (rp->GetPID()) ; 
-    // add the track to the esd object
-    esd->AddTrack(et);
-    delete et;
-  }
-}       
-
 //____________________________________________________________________________
 void AliPHOS::Hits2SDigits()  
 { 
@@ -459,31 +415,6 @@ void AliPHOS::SetTreeAddress()
   }
 }
 
-//____________________________________________________________________________
-void AliPHOS::Reconstruct() const 
-{ 
-  // method called by AliReconstruction; it should not be called otherwise but the AliPHOSReconstructionner 
-  // should be called for stand alone reconstruction.
-  // Only the clusterization is performed,; the rest of the reconstruction is done in FillESD because the track
-  // segment maker needs access to the AliESD object to retrieve the tracks reconstructed by 
-  // the global tracking.
-  AliPHOSReconstructioner * rec = new AliPHOSReconstructioner((fLoader->GetRunLoader()->GetFileName()).Data()) ; 
-  TList * taskslist = rec->GetListOfTasks() ; 
-  Int_t index ;
-  TTask * task ; 
-  TString name ; 
-  // set all tasks inactive except clusterizer
-  for (index = 0; index < taskslist->GetSize(); index++) {
-    task = dynamic_cast<TTask *>(taskslist->At(index)) ; 
-    name = task->GetName() ; 
-    if ( !name.Contains(AliConfig::Instance()->GetReconstructionerTaskName()))
-      task->SetActive(kFALSE) ; 
-  }
-  rec->SetEventRange(0, -1) ; // do all the events
-  rec->ExecuteTask("deb") ; 
-}
-
 //____________________________________________________________________________
 void AliPHOS::WriteQA()
 {