#include <AliESDtrack.h>
#include <AliESD.h>
+
#include "AliEventCut.h"
#include "AliReader.h"
#include "AliVAODParticle.h"
Error("Run","Reader is not set");
return 1;
}
+ TDirectory* cwd = gDirectory;
/******************************/
/* Init Event */
/******************************/
while (fReader->Next() == kFALSE)
{
- AliAOD* eventsim = fReader->GetEventSim();
- AliAOD* eventrec = fReader->GetEventRec();
-
- /******************************/
- /* Event Cut */
- /******************************/
- if ( Pass(eventrec,eventsim) )
- {
- if (AliVAODParticle::GetDebug()) Info("Run","Event rejected by Event Cut");
- continue; //Did not pass the
- }
- /******************************/
- /* Process Event */
- /******************************/
- for (Int_t an = 0; an < fAnalysies.GetEntries(); an++)
- {
- AliAnalysis* analysis = (AliAnalysis*)fAnalysies.At(an);
- analysis->ProcessEvent(eventrec,eventsim);
- }
+ AliAOD* eventrec = fReader->GetEventRec();
+ AliAOD* eventsim = fReader->GetEventSim();
+
+ /******************************/
+ /* Event Cut */
+ /******************************/
+ if ( Rejected(eventrec,eventsim) )
+ {
+ if (AliVAODParticle::GetDebug()) Info("Run","Event rejected by Event Cut");
+ continue; //Did not pass the
+ }
+ /******************************/
+ /* Process Event */
+ /******************************/
+ for (Int_t an = 0; an < fAnalysies.GetEntries(); an++)
+ {
+ AliAnalysis* analysis = (AliAnalysis*)fAnalysies.At(an);
+ analysis->ProcessEvent(eventrec,eventsim);
+ }
}//end of loop over events
/******************************/
/* Finish Event */
/******************************/
+ if (cwd) cwd->cd();
for (Int_t an = 0; an < fAnalysies.GetEntries(); an++)
{
AliAnalysis* analysis = (AliAnalysis*)fAnalysies.At(an);
/*********************************************************/
-Bool_t AliRunAnalysis::Pass(AliAOD* recevent, AliAOD* simevent)
+Bool_t AliRunAnalysis::Rejected(AliAOD* recevent, AliAOD* simevent)
{
//checks the event cut
if (fEventCut == 0x0) return kFALSE;
if (fCutOnRec)
- if (fEventCut->Pass(recevent)) return kTRUE;
+ if (fEventCut->Rejected(recevent)) return kTRUE;
if (fCutOnSim)
- if (fEventCut->Pass(simevent)) return kTRUE;
+ if (fEventCut->Rejected(simevent)) return kTRUE;
return kFALSE;
}