#include "AliESDInputHandler.h"
#include "AliESDtrackCuts.h"
#include "AliCentrality.h"
+#include "AliLog.h"
#include "AliAnalysisTaskEfficiencyBF.h"
// Create histograms
// Called once
+ // global switch disabling the reference
+ // (to avoid "Replacing existing TH1" if several wagons are created in train)
+ Bool_t oldStatus = TH1::AddDirectoryStatus();
+ TH1::AddDirectory(kFALSE);
+
fQAList = new TList();
fQAList->SetName("QAList");
fQAList->SetOwner();
PostData(1, fQAList);
PostData(2, fOutputList);
+
+ TH1::AddDirectory(oldStatus);
+
}
//________________________________________________________________________
AliMCEvent* mcEvent = MCEvent();
if (!mcEvent) {
- Printf("ERROR: Could not retrieve MC event");
+ AliError("ERROR: Could not retrieve MC event");
return;
}
AliStack* stack = mcEvent->Stack();
if (!stack) {
- Printf("ERROR: Could not retrieve MC stack");
+ AliError("ERROR: Could not retrieve MC stack");
return;
}
if(vertex->GetNContributors() > 0) {
if(vertex->GetZRes() != 0) {
fHistEventStats->Fill(3); //events with a proper vertex
- if(TMath::Abs(vertex->GetXv()) < fVxMax) {
- if(TMath::Abs(vertex->GetYv()) < fVyMax) {
- if(TMath::Abs(vertex->GetZv()) < fVzMax) {
+ if(TMath::Abs(vertex->GetX()) < fVxMax) {
+ if(TMath::Abs(vertex->GetY()) < fVyMax) {
+ if(TMath::Abs(vertex->GetZ()) < fVzMax) {
fHistEventStats->Fill(4); //analyzed events
Int_t nMCParticles = mcEvent->GetNumberOfTracks();
for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {
AliMCParticle *mcTrack = (AliMCParticle*) mcEvent->GetTrack(iTracks);
if (!mcTrack) {
- Printf("ERROR: Could not receive track %d (mc loop)", iTracks);
+ AliError(Form("ERROR: Could not receive track %d (mc loop)", iTracks));
continue;
}
labelArray.AddAt(label,labelCounter);
labelCounter += 1;
- Bool_t iFound = kFALSE;
Int_t mcGoods = nMCLabelCounter;
for (Int_t k = 0; k < mcGoods; k++) {
Int_t mcLabel = labelMCArray.At(k);
- iFound = kFALSE;
if (mcLabel != TMath::Abs(label)) continue;
if(mcLabel != label) continue;