From 35293055d4fdd9a84c01d955772e836e67ab4c50 Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 9 Jan 2004 18:10:53 +0000 Subject: [PATCH] Add method Clusters2Tracks --- PHOS/AliPHOSReconstructioner.cxx | 31 ++++++++++++++++++++++++++++++- PHOS/AliPHOSReconstructioner.h | 6 ++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/PHOS/AliPHOSReconstructioner.cxx b/PHOS/AliPHOSReconstructioner.cxx index be93fe0d18f..add207d148a 100644 --- a/PHOS/AliPHOSReconstructioner.cxx +++ b/PHOS/AliPHOSReconstructioner.cxx @@ -64,12 +64,15 @@ // --- AliRoot header files --- #include "AliRunLoader.h" +#include "AliESD.h" +#include "AliESDCaloTrack.h" #include "AliPHOSReconstructioner.h" #include "AliPHOSClusterizerv1.h" #include "AliPHOSDigitizer.h" #include "AliPHOSSDigitizer.h" #include "AliPHOSTrackSegmentMakerv1.h" #include "AliPHOSPIDv1.h" +#include "AliPHOSGetter.h" #include "AliPHOSLoader.h" @@ -160,7 +163,7 @@ TTask("AliPHOSReconstructioner",evFoldName) fIsInitialized = kTRUE ; } //____________________________________________________________________________ -void AliPHOSReconstructioner::Exec(Option_t opt) +void AliPHOSReconstructioner::Exec(Option_t *opt) { //check, if the names of branches, which should be made conicide with already //existing @@ -169,6 +172,32 @@ void AliPHOSReconstructioner::Exec(Option_t opt) if(!fIsInitialized) Init() ; } +//____________________________________________________________________________ +void AliPHOSReconstructioner:: Clusters2Tracks(Int_t ievent, AliESD *event) +{ + // Convert PHOS reconstructed particles into ESD object for event# ievent. + // ESD object is returned as an argument event + + if(!fIsInitialized) Init() ; + + fClusterizer->SetEventRange(ievent,ievent); + fClusterizer->ExecuteTask(); + + fTSMaker ->SetEventRange(ievent,ievent); + fTSMaker ->ExecuteTask(); + + fPID ->SetEventRange(ievent,ievent); + fPID ->ExecuteTask(); + + AliPHOSGetter *gime = AliPHOSGetter::Instance(); + TClonesArray *recParticles = gime->RecParticles(); + Int_t nOfRecParticles = recParticles->GetEntries(); + for (Int_t recpart=0; recpartAt(recpart)); + event->AddCaloTrack(ct); + } + +} //____________________________________________________________________________ void AliPHOSReconstructioner::Init() { diff --git a/PHOS/AliPHOSReconstructioner.h b/PHOS/AliPHOSReconstructioner.h index 5de72d17cac..11b6a7eb323 100644 --- a/PHOS/AliPHOSReconstructioner.h +++ b/PHOS/AliPHOSReconstructioner.h @@ -21,6 +21,7 @@ class AliPHOSClusterizer ; class AliPHOSTrackSegmentMaker ; class AliPHOSPID ; class AliPHOSSDigitizer ; +class AliESD ; // --- Standard library --- @@ -40,7 +41,8 @@ public: virtual ~AliPHOSReconstructioner() ; - virtual void Exec(Option_t) ; + virtual void Exec(Option_t *) ; + void Clusters2Tracks(Int_t ievent, AliESD *event); AliPHOSDigitizer * GetDigitizer() const { return fDigitizer ; } AliPHOSClusterizer * GetClusterizer()const { return fClusterizer ; } @@ -59,7 +61,7 @@ public: AliPHOSReconstructioner & operator = (const AliPHOSReconstructioner & /*rvalue*/) { // assignement operator requested by coding convention but not needed - Fatal("operator =", "not implementeyd") ; + Fatal("operator =", "not implemented") ; return *this ; } -- 2.39.3