//
// // And finally one can call ExecuteTask() with the following options
// root [5] r->ExecuteTask("debug all timing")
-// // deb - prints the numbers of produced SDigits, Digits etc.
-// // deb all - prints in addition list of made SDigits, digits etc.
-// // timing - prints benchmarking results
+// // deb - prints the numbers of RecPoints, TrackSegments, RecParticles
+// // deb all - prints in addition list of RecPoints, TrackSegments, RecParticles
+// // timing - prints benchmarking results
///////////////////////////////////////////////////////////////////////////////////////////////////
// --- ROOT system ---
// --- Standard library ---
-#include "Riostream.h"
// --- 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"
ClassImp(AliPHOSReconstructioner)
AliPHOSReconstructioner::AliPHOSReconstructioner():TTask("AliPHOSReconstructioner","")
{
// ctor
- fDigitizer = 0 ;
fClusterizer = 0 ;
fTSMaker = 0 ;
fPID = 0 ;
- fSDigitizer = 0 ;
-
+ fFirstEvent = 0 ;
+ fLastEvent = -1 ;
fIsInitialized = kFALSE ;
}
TTask("AliPHOSReconstructioner",evFoldName)
{
// ctor
- AliRunLoader* rl = AliRunLoader::GetRunLoader(evFoldName);
- if (rl == 0x0)
- {
- Fatal("AliPHOSReconstructioner","Can not get Run Loader from folder %s.",evFoldName);
- }
- if (rl->GetAliRun() == 0x0)
- {
- delete gAlice;
- gAlice = 0x0;
- rl->LoadgAlice();
- gAlice = rl->GetAliRun();
- }
-
- AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
- if (gime == 0x0)
- {
- Error("AliPHOSReconstructioner","Can not get PHOS Loader");
- return;
- }
-
- TString galicefn = rl->GetFileName();
- TString method("AliPHOSReconstructioner::AliPHOSReconstructioner(");
- method = (((method + evFoldName)+",")+branchName)+"): ";
-
- fSDigitsBranch= branchName;
-
- //P.Skowronski remark
- // Tasks has default fixed names
- // other tasks can be added, even runtime
- // with arbitrary name. See AliDataLoader::
- cout<<"\n\n\n";
- cout<<method<<"\n\nCreating SDigitizer\n";
- fSDigitizer = new AliPHOSSDigitizer(galicefn,GetTitle());
- Add(fSDigitizer);
- gime->PostSDigitizer(fSDigitizer);
- fDigitsBranch=branchName ;
- cout<<"\n\n\n";
- cout<<method<<"\n\nCreating Digitizer\n";
- fDigitizer = new AliPHOSDigitizer(galicefn,GetTitle()) ;
- Add(fDigitizer) ;
- gime->PostDigitizer(fDigitizer);
+ AliPHOSGetter::Instance(evFoldName) ;
fRecPointBranch=branchName ;
- cout<<"\n\n\n";
- cout<<method<<"Creating Clusterizer\n";
- fClusterizer = new AliPHOSClusterizerv1(galicefn,GetTitle());
+ fClusterizer = new AliPHOSClusterizerv1(evFoldName, GetTitle());
Add(fClusterizer);
- gime->PostReconstructioner(fClusterizer);
fTSBranch=branchName ;
- fTSMaker = new AliPHOSTrackSegmentMakerv1(galicefn,GetTitle());
+ fTSMaker = new AliPHOSTrackSegmentMakerv1(evFoldName, GetTitle());
Add(fTSMaker) ;
- gime->PostTracker(fTSMaker);
-
fRecPartBranch=branchName ;
- cout<<"\n\n\n";
- cout<<method<<"Creating PID\n";
- fPID = new AliPHOSPIDv1(galicefn,GetTitle());
+ fPID = new AliPHOSPIDv1(evFoldName, GetTitle());
Add(fPID);
- cout<<"\nFINISHED \n\n"<<method;
fIsInitialized = kTRUE ;
}
//____________________________________________________________________________
void AliPHOSReconstructioner::Exec(Option_t *opt)
{
- //check, if the names of branches, which should be made conicide with already
+ //check, if the names of branches, which should be made coincide with already
//existing
if (!opt)
return ;
// initiliaze Reconstructioner if necessary: we can not do this in default constructor
if(!fIsInitialized){
- // Initialisation
-
- fSDigitsBranch="Default" ;
- fSDigitizer = new AliPHOSSDigitizer(GetTitle(),fSDigitsBranch.Data()) ;
- Add(fSDigitizer) ;
-
- fDigitsBranch="Default" ;
- fDigitizer = new AliPHOSDigitizer(GetTitle(),fDigitsBranch.Data());
- Add(fDigitizer) ;
-
+
fRecPointBranch="Default" ;
fClusterizer = new AliPHOSClusterizerv1(GetTitle(),fRecPointBranch.Data());
Add(fClusterizer) ;
message += " Reconstruction of the header file %s\n" ;
message += " with the following modules:\n" ;
- if(fSDigitizer->IsActive()){
- message += " (+) %s to branch %s\n" ;
- }
- if(fDigitizer->IsActive()){
- message += " (+) %s to branch %s\n" ;
- }
-
if(fClusterizer->IsActive()){
message += " (+) %s to branch %s\n" ;
}
}
Info("Print", message.Data(),
GetTitle(),
- fSDigitizer->GetName(), fSDigitsBranch.Data(),
- fDigitizer->GetName(), fDigitsBranch.Data() ,
fClusterizer->GetName(), fRecPointBranch.Data(),
fTSMaker->GetName(), fTSBranch.Data() ,
fPID->GetName(), fRecPartBranch.Data() ) ;
}
+
+//____________________________________________________________________________
+void AliPHOSReconstructioner::SetEventRange(Int_t first, Int_t last)
+{
+ // Set the event range to process
+ fFirstEvent=first;
+ fLastEvent=last;
+ fClusterizer->SetEventRange(fFirstEvent, fLastEvent) ;
+ fTSMaker->SetEventRange(fFirstEvent, fLastEvent) ;
+ fPID->SetEventRange(fFirstEvent, fLastEvent) ;
+}