#include <Riostream.h>
#include <TList.h>
+#include <TH1.h>
+
#include "AliESDEvent.h"
#include "AliMCEvent.h"
#include "AliAODEvent.h"
// is then linked to the TList data member of this, which will contain all the output.
//
+ // initialize the list
if (!fOutList) fOutList = new TList;
fOutList->Clear();
+ fOutList->SetOwner(kTRUE);
- fRsnAnalysisManager.InitAllPairs(fOutList);
+ // initialize all pairs
+ fRsnAnalysisManager.InitAllPairs(fOutList);
PostData(2, fOutList);
}
// Recovers the input event and processes it with all included pair objects,
// using 'reconstructed' or 'MonteCarlo' functions depending on MC-only flag.
//
+
if (IsMixing()) return;
- if (fMCOnly) {
- fRsnAnalysisManager.ProcessAllMonitorsMC();
- fRsnAnalysisManager.ProcessAllPairsMC();
- }
- else {
- fRsnAnalysisManager.ProcessAllMonitors();
- fRsnAnalysisManager.ProcessAllPairs();
- }
+ fRsnAnalysisManager.ProcessAll(&fRsnEvent[0], 0x0, fMCOnly);
PostData(2, fOutList);
}
+//_____________________________________________________________________________
void AliRsnAnalysisTask::RsnUserExecMix(Option_t* /*opt*/)
{
+//
+// Execution of the analysis task with event mixing.
+// Recovers the input event and processes it with all included pair objects,
+// using 'reconstructed' or 'MonteCarlo' functions depending on MC-only flag.
+//
+
if (!IsMixing()) return;
AliDebug(AliLog::kDebug, Form("RSN Mixing %lld %d [%lld,%lld] %d", fMixedEH->CurrentEntry(), fMixedEH->NumberMixed(), fMixedEH->CurrentEntryMain(), fMixedEH->CurrentEntryMix(), fMixedEH->CurrentBinIndex()));
// the virtual class has already sorted tracks in the PID index
// so we need here just to call the execution of analysis
- if (!fMCOnly)
- fRsnAnalysisManager.ProcessAllPairs();
- else
- fRsnAnalysisManager.ProcessAllPairsMC();
+ fRsnAnalysisManager.ProcessAll(&fRsnEvent[0], &fRsnEvent[1], fMCOnly);
}
//_____________________________________________________________________________
}
//______________________________________________________________________________
-Bool_t AliRsnAnalysisTask::EventProcess()
+Bool_t AliRsnAnalysisTask::RsnEventProcess()
{
//
// Customized event pre-processing.
// initially, an event is expected to be bad
fTaskInfo.SetEventUsed(kFALSE);
- if (!AliRsnVAnalysisTask::EventProcess()) return kFALSE;
+ if (!AliRsnVAnalysisTask::RsnEventProcess()) return kFALSE;
// check #1: number of tracks in event (reject empty events)
- Int_t ntracks = fRsnEvent[0].GetMultiplicity();
+ Int_t ntracks = fRsnEvent[0].GetMultiplicityFromTracks();
Double_t zeroEventPercent = 0.0;
if (ntracks < 1) {
// if using the checker for amount of empty events, update it