// --- 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()
fName="PHOS";
fQATask = 0;
fTreeQA = 0;
+ fDebug = 0;
}
//____________________________________________________________________________
fQATask = 0;
fTreeQA = 0;
+ fDebug = 0;
}
//____________________________________________________________________________
//____________________________________________________________________________
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() ;
}
-//____________________________________________________________________________
-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()
{
}
}
-//____________________________________________________________________________
-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()
{