// //
// class for HLT reconstruction //
// <Cvetan.Cheshkov@cern.ch> //
+// <loizides@ikf.uni-frankfurt.de> //
///////////////////////////////////////////////////////////////////////////////
// very ugly but it has to work fast
fHLT->DoNonVertexTracking(); /*2 tracking passes, last without vertex contraint.*/
fHLT->WriteFiles("./hlt/");
fHLT->ProcessEvent(0, 35, iEvent);
-
- char filename[256];
- sprintf(filename, "confmap_%d",iEvent);
- fHLT->DoBench(filename);
+ if(fDoBench){
+ char filename[256];
+ sprintf(filename, "confmap_%d",iEvent);
+ fHLT->DoBench(filename);
+ }
delete fHLT;
}
}
hough->WriteTracks("./hough");
- char filename[256];
- sprintf(filename, "hough_%d",iEvent);
- hough->DoBench(filename);
-
+ if(fDoBench){
+ char filename[256];
+ sprintf(filename, "hough_%d",iEvent);
+ hough->DoBench(filename);
+ }
delete hough;
}
if(fDoTracker) FillESDforConformalMapping(esd,iEvent);
if(fDoHough) FillESDforHoughTransform(esd,iEvent);
-#if 0
- char name[256];
- gSystem->Exec("rm -rf hlt");
- sprintf(name, "rm -f confmap_%d.root confmap_%d.dat",iEvent,iEvent);
- gSystem->Exec(name);
- gSystem->Exec("rm -rf hough");
- sprintf(name, "rm -f hough_%d.root hough_%d.dat",iEvent,iEvent);
- gSystem->Exec(name);
-#endif
+ if(fDoCleanUp){
+ char name[256];
+ gSystem->Exec("rm -rf hlt");
+ sprintf(name, "rm -f confmap_%d.root confmap_%d.dat",iEvent,iEvent);
+ gSystem->Exec(name);
+ gSystem->Exec("rm -rf hough");
+ sprintf(name, "rm -f hough_%d.root hough_%d.dat",iEvent,iEvent);
+ gSystem->Exec(name);
+ }
}
void AliHLTReconstructor::FillESDforConformalMapping(AliESD* esd,Int_t iEvent) const
AliL3Evaluate *fHLTEval = new AliL3Evaluate("./hlt",nclusters,good,ptmin,ptmax,slicerange);
fHLTEval->SetMaxFalseClusters(maxfalseratio);
-
fHLTEval->LoadData(iEvent,kTRUE);
fHLTEval->AssignPIDs();
fHLTEval->AssignIDs();
AliL3TrackArray *fTracks = fHLTEval->GetTracks();
+ if(!fTracks){
+ delete fHLTEval;
+ return;
+ }
for(Int_t i=0; i<fTracks->GetNTracks(); i++)
{
AliL3Track *tpt = (AliL3Track *)fTracks->GetCheckedTrack(i);
AliL3FileHandler *tfile = new AliL3FileHandler();
if(!tfile->SetBinaryInput(filename)){
- Error("FillESD","Inputfile ",filename," does not exist");
+ LOG(AliL3Log::kError,"AliHLTReconstructor::FillESDforHoughTransform","Input file")
+ <<" Missing file "<<filename<<ENDLOG;
return;
}
tfile->Binary2TrackArray(fTracks);
tfile->CloseBinaryInput();
delete tfile;
-
+ if(!fTracks) return;
for(Int_t i=0; i<fTracks->GetNTracks(); i++)
{
AliL3HoughTrack *tpt = (AliL3HoughTrack *)fTracks->GetCheckedTrack(i);
delete fTracks;
}
-
#endif
AliL3Log::fgLevel=AliL3Log::kWarning;
fDoTracker=1;
fDoHough=1;
+ fDoBench=0;
+ fDoCleanUp=1;
};
AliHLTReconstructor(Bool_t doTracker, Bool_t doHough): AliReconstructor() {
AliL3Log::fgLevel=AliL3Log::kWarning;
fDoTracker=doTracker;
fDoHough=doHough;
+ fDoBench=0;
+ fDoCleanUp=1;
};
virtual ~AliHLTReconstructor() {};
virtual void Reconstruct(AliRunLoader* runLoader) const;
virtual void FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+ void SetDoBench(Bool_t b){fDoBench=b;}
+ void SetDoCleanup(Bool_t b){fDoCleanUp=b;}
private:
void ReconstructWithConformalMapping(AliRunLoader* runLoader,Int_t iEvent) const;
void FillESDforHoughTransform(AliESD* esd,Int_t iEvent) const;
- Bool_t fDoHough;
- Bool_t fDoTracker;
+ Bool_t fDoHough; //do the hough transform
+ Bool_t fDoTracker; //do the standard conformal tracker
+ Bool_t fDoBench; //store the benchmark results
+ Bool_t fDoCleanUp; //delete tmp tracking files
ClassDef(AliHLTReconstructor, 0) // class for the TPC reconstruction
};