TSelector(),
fRunVertexFinder(kTRUE),
fRunVertexFinderTracks(kTRUE),
- fRunHLTTracking(kFALSE),
fRunMuonTracking(kFALSE),
fRunV0Finder(kTRUE),
fRunCascadeFinder(kTRUE),
TSelector(),
fRunVertexFinder(rec.fRunVertexFinder),
fRunVertexFinderTracks(rec.fRunVertexFinderTracks),
- fRunHLTTracking(rec.fRunHLTTracking),
fRunMuonTracking(rec.fRunMuonTracking),
fRunV0Finder(rec.fRunV0Finder),
fRunCascadeFinder(rec.fRunCascadeFinder),
fRunVertexFinder = rec.fRunVertexFinder;
fRunVertexFinderTracks = rec.fRunVertexFinderTracks;
- fRunHLTTracking = rec.fRunHLTTracking;
fRunMuonTracking = rec.fRunMuonTracking;
fRunV0Finder = rec.fRunV0Finder;
fRunCascadeFinder = rec.fRunCascadeFinder;
AliQAManager::QAManager()->RunOneEvent(fRawReader) ;
AliSysInfo::AddStamp(Form("RawQA_%d",iEvent), 0,0,iEvent);
}
- // local single event reconstruction
- if (!fRunLocalReconstruction.IsNull()) {
- TString detectors=fRunLocalReconstruction;
- // run HLT event reconstruction first
- // ;-( IsSelected changes the string
- if (IsSelected("HLT", detectors) &&
- !RunLocalEventReconstruction("HLT")) {
- if (fStopOnError) {CleanUp(); return kFALSE;}
- }
- detectors=fRunLocalReconstruction;
- detectors.ReplaceAll("HLT", "");
- if (!RunLocalEventReconstruction(detectors)) {
- if (fStopOnError) {
- CleanUp();
- return kFALSE;
- }
- }
- }
-
// fill Event header information from the RawEventHeader
if (fRawReader){FillRawEventHeaderESD(fesd);}
if (fRawReader){FillRawEventHeaderESD(fhltesd);}
fhltesd->SetUniformBMap(fld->IsUniform());
fhltesd->SetBInfoStored();
}
+
+ //
+ // run full HLT reconstruction first
+ //
+ {
+ TString detectors=fRunLocalReconstruction;
+ if (IsSelected("HLT", detectors) &&
+ !RunLocalEventReconstruction("HLT")) {
+ if (fStopOnError) {CleanUp(); return kFALSE;}
+ }
+ detectors=fFillESD;
+ // run HLT on hltesd
+ if (IsSelected("HLT", detectors) &&
+ !FillESD(fhltesd, "HLT")) {
+ if (fStopOnError) {CleanUp(); return kFALSE;}
+ }
+ }
+
+ // local single event reconstruction
+ if (!fRunLocalReconstruction.IsNull()) {
+ TString detectors=fRunLocalReconstruction;
+ // the logic for selection and correct sequence of reconstruction relies on the
+ // full list of detectors. Keyword 'ALL' should have been replaced at this point.
+ if (detectors.Contains("ALL")) {
+ AliFatal("Keyword 'ALL' needs to be replaced by the full list of detectors in "
+ "fRunLocalReconstruction. This should have been done by the framework");
+ }
+ detectors.ReplaceAll("HLT", "");
+ if (!RunLocalEventReconstruction(detectors)) {
+ if (fStopOnError) {
+ CleanUp();
+ return kFALSE;
+ }
+ }
+ }
+
+
//
// Set most probable pt, for B=0 tracking
// Get the global reco-params. They are atposition 16 inside the array of detectors in fRecoParam
// fill ESD
if (!fFillESD.IsNull()) {
TString detectors=fFillESD;
- // run HLT first and on hltesd
- // ;-( IsSelected changes the string
- if (IsSelected("HLT", detectors) &&
- !FillESD(fhltesd, "HLT")) {
- if (fStopOnError) {CleanUp(); return kFALSE;}
- }
- detectors=fFillESD;
- // Temporary fix to avoid problems with HLT that overwrites the offline ESDs
+ // the logic for selection and correct sequence of reconstruction relies on the
+ // full list of detectors. Keyword 'ALL' should have been replaced at this point.
if (detectors.Contains("ALL")) {
- detectors="";
- for (Int_t idet=0; idet<kNDetectors; ++idet){
- detectors += fgkDetectorName[idet];
- detectors += " ";
- }
+ AliFatal("Keyword 'ALL' needs to be replaced by the full list of detectors in "
+ "fFillESD. This should have been done by the framework");
}
+ // remove HLT as this has been executed at the beginning of the event reconstruction
detectors.ReplaceAll("HLT", "");
if (!FillESD(fesd, detectors)) {
if (fStopOnError) {CleanUp(); return kFALSE;}
}
}
-
ffile->cd();
fesdf->~AliESDfriend();
new (fesdf) AliESDfriend(); // Reset...
}
+
+ for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
+ if (fReconstructor[iDet]) fReconstructor[iDet]->FinishEvent();
+ }
gSystem->GetProcInfo(&procInfo);
Long_t dMres=(procInfo.fMemResident-oldMres)/1024;
// execute HLT reconstruction first since other detector reconstruction
// might depend on HLT data
// key 'HLT' is removed from detStr by IsSelected
- if (!IsSelected("HLT", detStr)) {
+ if (IsSelected("HLT", detStr)) {
AliReconstructor* reconstructor = GetReconstructor(kNDetectors-1);
if (reconstructor) {
// there is no AliLoader for HLT, see
return kTRUE;
}
-//_____________________________________________________________________________
-Bool_t AliReconstruction::RunHLTTracking(AliESDEvent*& esd)
-{
-// run the HLT barrel tracking
-
- AliCodeTimerAuto("",0)
-
- if (!fRunLoader) {
- AliError("Missing runLoader!");
- return kFALSE;
- }
-
- AliInfo("running HLT tracking");
-
- // Get a pointer to the HLT reconstructor
- AliReconstructor *reconstructor = GetReconstructor(kNDetectors-1);
- if (!reconstructor) return kFALSE;
-
- // TPC + ITS
- for (Int_t iDet = 1; iDet >= 0; iDet--) {
- TString detName = fgkDetectorName[iDet];
- AliDebug(1, Form("%s HLT tracking", detName.Data()));
- reconstructor->SetOption(detName.Data());
- AliTracker *tracker = reconstructor->CreateTracker();
- if (!tracker) {
- AliWarning(Form("couldn't create a HLT tracker for %s", detName.Data()));
- if (fStopOnError) return kFALSE;
- continue;
- }
- Double_t vtxPos[3];
- Double_t vtxErr[3]={0.005,0.005,0.010};
- const AliESDVertex *vertex = esd->GetVertex();
- vertex->GetXYZ(vtxPos);
- tracker->SetVertex(vtxPos,vtxErr);
- if(iDet != 1) {
- fLoader[iDet]->LoadRecPoints("read");
- TTree* tree = fLoader[iDet]->TreeR();
- if (!tree) {
- AliError(Form("Can't get the %s cluster tree", detName.Data()));
- return kFALSE;
- }
- tracker->LoadClusters(tree);
- }
- if (tracker->Clusters2Tracks(esd) != 0) {
- AliError(Form("HLT %s Clusters2Tracks failed", fgkDetectorName[iDet]));
- return kFALSE;
- }
- if(iDet != 1) {
- tracker->UnloadClusters();
- }
- delete tracker;
- }
-
- return kTRUE;
-}
-
//_____________________________________________________________________________
Bool_t AliReconstruction::RunMuonTracking(AliESDEvent*& esd)
{
TString libs = gSystem->GetLibraries();
for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
TString detName = fgkDetectorName[iDet];
- if (detName == "HLT") continue;
if (libs.Contains("lib" + detName + "base.so")) continue;
gSystem->Load("lib" + detName + "base.so");
}
TObject* obj = fOptions.FindObject(detName.Data());
if (obj) reconstructor->SetOption(obj->GetTitle());
reconstructor->SetRunInfo(fRunInfo);
+ reconstructor->SetHLTESD(fhltesd);
reconstructor->Init();
fReconstructor[iDet] = reconstructor;
}
AliReconstructor* reconstructor = GetReconstructor(iDet);
if (!reconstructor) continue;
TString detName = fgkDetectorName[iDet];
- if (detName == "HLT") {
- fRunHLTTracking = kTRUE;
- continue;
- }
if (detName == "MUON") {
fRunMuonTracking = kTRUE;
continue;
void SetRunMultFinder(Bool_t flag=kTRUE) {fRunMultFinder=flag;};
void SetRunVertexFinder(Bool_t flag=kTRUE) {fRunVertexFinder=flag;};
void SetRunVertexFinderTracks(Bool_t flag=kTRUE) {fRunVertexFinderTracks=flag;};
- void SetRunHLTTracking(Bool_t flag=kTRUE) {fRunHLTTracking=flag;};
void SetRunV0Finder(Bool_t flag=kTRUE) {fRunV0Finder=flag;};
void SetRunCascadeFinder(Bool_t flag=kTRUE) {fRunCascadeFinder=flag;};
void SetStopOnError(Bool_t flag=kTRUE) {fStopOnError=flag;}
Bool_t ReadIntensityInfoCDB();
Bool_t RunLocalEventReconstruction(const TString& detectors);
Bool_t RunVertexFinder(AliESDEvent*& esd);
- Bool_t RunHLTTracking(AliESDEvent*& esd);
Bool_t RunMuonTracking(AliESDEvent*& esd);
Bool_t RunSPDTrackleting(AliESDEvent*& esd);
Bool_t RunMultFinder(AliESDEvent*& esd);
//*** Global reconstruction flags *******************
Bool_t fRunVertexFinder; // run the vertex finder
Bool_t fRunVertexFinderTracks; // run the vertex finder with tracks
- Bool_t fRunHLTTracking; // run the HLT tracking
- Bool_t fRunMuonTracking; // run the HLT tracking
+ Bool_t fRunMuonTracking; // run the MUON tracking
Bool_t fRunV0Finder; // run the ESD V0 finder
Bool_t fRunCascadeFinder; // run the ESD cascade finder
Bool_t fRunMultFinder; // run the trackleter for ITS clusters
Int_t fMaxVMEM; // max VMEM memory, MB
static const char* fgkStopEvFName; // filename for stop.event stamp
//
- ClassDef(AliReconstruction, 43) // class for running the reconstruction
+ ClassDef(AliReconstruction, 44) // class for running the reconstruction
};
#endif