// --- ROOT system ---
class TFile;
#include <TFolder.h>
-#include <TROOT.h>
#include <TTree.h>
#include <TVirtualMC.h>
// --- Standard library ---
-#include <Riostream.h>
// --- AliRoot header files ---
#include "AliMagF.h"
+#include "AliESDCaloTrack.h"
+#include "AliESD.h"
#include "AliPHOS.h"
-#include "AliPHOSGeometry.h"
-#include "AliPHOSLoader.h"
+#include "AliPHOSGetter.h"
#include "AliPHOSQAChecker.h"
#include "AliRun.h"
-
+#include "AliPHOSDigitizer.h"
+#include "AliPHOSSDigitizer.h"
+#include "AliPHOSReconstructioner.h"
ClassImp(AliPHOS)
//____________________________________________________________________________
AliPHOS:: AliPHOS() : AliDetector()
}
+//____________________________________________________________________________
+void AliPHOS::Copy(AliPHOS & phos)
+{
+ TObject::Copy(phos) ;
+ // fQATask = AliPHOSQAChecker::Copy(*(phos.fQATask)) ;
+ phos.fTreeQA = fTreeQA->CloneTree() ;
+}
+
+//____________________________________________________________________________
+AliDigitizer* AliPHOS::CreateDigitizer(AliRunDigitizer* manager) const
+{
+ return new AliPHOSDigitizer(manager);
+}
+
//____________________________________________________________________________
void AliPHOS::CreateMaterials()
{
}
//____________________________________________________________________________
-AliPHOSGeometry * AliPHOS::GetGeometry() const
-{
- // gets the pointer to the AliPHOSGeometry unique instance
-
- return AliPHOSGeometry::GetInstance(GetTitle(),"") ;
+void AliPHOS::FillESD(AliESD* esd) const
+{
+ // Fill the ESD with all RecParticles
+ 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++) {
+ AliESDCaloTrack *ct = new AliESDCaloTrack((AliPHOSRecParticle*)recParticles->At(recpart));
+ esd->AddCaloTrack(ct);
+ }
+}
+
+//____________________________________________________________________________
+void AliPHOS::Hits2SDigits()
+{
+// create summable digits
+ AliPHOSSDigitizer* phosDigitizer =
+ new AliPHOSSDigitizer(fLoader->GetRunLoader()->GetFileName().Data()) ;
+ phosDigitizer->SetEventRange(0, -1) ; // do all the events
+ phosDigitizer->ExecuteTask("all") ;
+}
+
+//____________________________________________________________________________
+AliLoader* AliPHOS::MakeLoader(const char* topfoldername)
+{
+//different behaviour than standard (singleton getter)
+// --> to be discussed and made eventually coherent
+ fLoader = new AliPHOSLoader(GetName(),topfoldername);
+ return fLoader;
}
//____________________________________________________________________________
void AliPHOS::SetTreeAddress()
{
-
+ // Links Hits in the Tree to Hits array
TBranch *branch;
char branchname[20];
sprintf(branchname,"%s",GetName());
}
}
+//____________________________________________________________________________
+void AliPHOS::Reconstruct() const
+{
+ AliPHOSReconstructioner * rec = new AliPHOSReconstructioner((fLoader->GetRunLoader()->GetFileName()).Data()) ;
+ rec->SetEventRange(0, -1) ; // do all the events
+ rec->ExecuteTask() ;
+}
+
//____________________________________________________________________________
void AliPHOS::WriteQA()
{
//fTreeQA->Fill() ;
}
-
-//____________________________________________________________________________
-AliLoader* AliPHOS::MakeLoader(const char* topfoldername)
-{
-//different behaviour than standard (singleton getter)
-// --> to be discussed and made eventually coherent
- fLoader = new AliPHOSLoader(GetName(),topfoldername);
- return fLoader;
-}