#include "AliITSpidESD2.h"
#include "AliV0vertexer.h"
#include "AliCascadeVertexer.h"
+#include "AliITSInitGeometry.h"
ClassImp(AliITSReconstructor)
//___________________________________________________________________________
-AliITSReconstructor::AliITSReconstructor() : AliReconstructor(){
+AliITSReconstructor::AliITSReconstructor() : AliReconstructor(),
+fItsPID(0)
+{
// Default constructor
- fItsPID=0;
}
//___________________________________________________________________________
AliITSReconstructor::~AliITSReconstructor(){
delete fItsPID;
}
//______________________________________________________________________
-AliITSReconstructor::AliITSReconstructor(const AliITSReconstructor &ob) :AliReconstructor(ob) {
+AliITSReconstructor::AliITSReconstructor(const AliITSReconstructor &ob) :AliReconstructor(ob),
+fItsPID(ob.fItsPID)
+{
// Copy constructor
- // Copies are not allowed. The method is protected to avoid misuse.
- Error("AliITSpidESD2","Copy constructor not allowed\n");
}
//______________________________________________________________________
-AliITSReconstructor& AliITSReconstructor::operator=(const AliITSReconstructor& /* ob */){
+AliITSReconstructor& AliITSReconstructor::operator=(const AliITSReconstructor& ob ){
// Assignment operator
- // Assignment is not allowed. The method is protected to avoid misuse.
- Error("= operator","Assignment operator not allowed\n");
+ this->~AliITSReconstructor();
+ new(this) AliITSReconstructor(ob);
return *this;
}
+//______________________________________________________________________
+void AliITSReconstructor::Init(AliRunLoader *runLoader) const{
+ // Initalize this constructor bet getting/creating the objects
+ // nesseary for a proper ITS reconstruction.
+ // Inputs:
+ // AliRunLoader *runLoader Pointer to the run loader to allow
+ // the getting of files/folders data
+ // needed to do reconstruction
+ // Output:
+ // none.
+ // Return:
+ // none.
+ AliITSInitGeometry *initgeom = new AliITSInitGeometry("AliITSvPPRasymmFMD",
+ 2);
+ AliITSgeom *geom = initgeom->CreateAliITSgeom();
+ delete initgeom; // once created, do not need initgeom any more.
+ AliITSLoader* loader = static_cast<AliITSLoader*>
+ (runLoader->GetLoader("ITSLoader"));
+ if (!loader) {
+ Error("Init", "ITS loader not found");
+ return;
+ }
+ loader->SetITSgeom(geom);
+ return;
+}
//_____________________________________________________________________________
void AliITSReconstructor::Reconstruct(AliRunLoader* runLoader) const
{
// reconstruct clusters
- AliLoader* loader = runLoader->GetLoader("ITSLoader");
+ AliITSLoader* loader = static_cast<AliITSLoader*>(runLoader->GetLoader("ITSLoader"));
if (!loader) {
Error("Reconstruct", "ITS loader not found");
return;
}
- gAlice=runLoader->GetAliRun();
- TDirectory* olddir = gDirectory;
- runLoader->CdGAFile();
- AliITSgeom* geom = (AliITSgeom*)gDirectory->Get("AliITSgeom");
- olddir->cd();
- AliITSDetTypeRec* rec = new AliITSDetTypeRec();
- rec->SetLoader((AliITSLoader*)loader);
- rec->SetITSgeom(geom);
+ AliITSDetTypeRec* rec = new AliITSDetTypeRec(loader);
rec->SetDefaults();
loader->LoadRecPoints("recreate");
// reconstruct clusters
- AliLoader* loader = runLoader->GetLoader("ITSLoader");
+ AliITSLoader* loader = static_cast<AliITSLoader*>(runLoader->GetLoader("ITSLoader"));
if (!loader) {
Error("Reconstruct", "ITS loader not found");
return;
}
- gAlice=runLoader->GetAliRun();
- TDirectory* olddir = gDirectory;
- runLoader->CdGAFile();
- AliITSgeom* geom = (AliITSgeom*)gDirectory->Get("AliITSgeom");
- olddir->cd();
- AliITSDetTypeRec* rec = new AliITSDetTypeRec();
- rec->SetLoader((AliITSLoader*)loader);
- rec->SetITSgeom(geom);
+ AliITSDetTypeRec* rec = new AliITSDetTypeRec(loader);
rec->SetDefaults();
rec->SetDefaultClusterFindersV2(kTRUE);
Error("GetITSgeom", "couldn't get AliRun object");
return NULL;
}
-
- TDirectory * olddir = gDirectory;
- runLoader->CdGAFile();
- AliITSgeom* geom = (AliITSgeom*)gDirectory->Get("AliITSgeom");
- olddir->cd();
+ AliITSLoader *loader = (AliITSLoader*)runLoader->GetLoader("ITSLoader");
+ AliITSgeom* geom = (AliITSgeom*)loader->GetITSgeom();
if(!geom){
Error("GetITSgeom","no ITS geometry available");
return NULL;
return geom;
}
-