// joins the loop on tracks and v0s, by looping the indexes from 0
// to the sum of them, and checking what to take depending of its value
Int_t i0, i1, i;
+ Bool_t filled;
AliRsnDaughter daughter0, daughter1;
AliRsnPair *pair = 0x0;
TObjArrayIter next(&fPairs);
for (i0 = 0; i0 < nTracks[0]; i0++)
{
// assign first track
- if (i0 < nTracks[0]) ev0->SetDaughter(daughter0, i0, AliRsnDaughter::kTrack);
- else ev0->SetDaughter(daughter0, i0 - nTracks[0], AliRsnDaughter::kV0);
+ ev0->SetDaughterMC(daughter0, i0);
// internal loop (same criterion)
for (i1 = 0; i1 < nTracks[1]; i1++)
if (ev0 == ev1 && i0 == i1) continue;
// assign second track
- if (i1 < nTracks[1]) ev1->SetDaughter(daughter1, i1, AliRsnDaughter::kTrack);
- else ev1->SetDaughter(daughter1, i1 - nTracks[1], AliRsnDaughter::kV0);
+ ev1->SetDaughterMC(daughter1, i1);
// loop over all pairs and make computations
next.Reset();
if (pair->GetPairDef()->IsLikeSign() && i1 < i0) continue;
// process the two tracks
- if (!pair->Fill(&daughter0, &daughter1, ev0, ev1)) continue;
+ filled = pair->Fill(&daughter0, &daughter1, ev0, ev1);
+ if (!filled) continue;
pair->Compute();
}
}
// MC info & references
AliVParticle* GetRef() const {return fRef;}
+ AliMCParticle* GetRefMCtrack() const {return dynamic_cast<AliMCParticle*>(fRef);}
AliESDtrack* GetRefESDtrack() const {return dynamic_cast<AliESDtrack*>(fRef);}
AliAODTrack* GetRefAODtrack() const {return dynamic_cast<AliAODTrack*>(fRef);}
AliESDv0* GetRefESDv0() const {return dynamic_cast<AliESDv0*>(fRef);}
AliMCParticle* GetRefMC() const {return fRefMC;}
TParticle* GetParticle() const {if (fRefMC) return fRefMC->Particle(); else return 0x0;}
Int_t GetMotherPDG() const {return fMotherPDG;}
+ Bool_t IsMC() const {if (GetRefMCtrack()) return kTRUE; return kFALSE;}
Bool_t IsAOD() const {if (GetRefAODtrack() || GetRefAODv0()) return kTRUE; return kFALSE;}
Bool_t IsESD() const {if (GetRefESDtrack() || GetRefESDv0()) return kTRUE; return kFALSE;}
- Bool_t IsTrack() const {if (GetRefESDtrack() || GetRefAODtrack()) return kTRUE; return kFALSE;}
+ Bool_t IsTrack() const {if (GetRefESDtrack() || GetRefAODtrack() || GetRefMCtrack()) return kTRUE; return kFALSE;}
Bool_t IsV0() const {if (GetRefESDv0() || GetRefAODv0()) return kTRUE; return kFALSE;}
ERefType RefType() const {if (IsTrack()) return kTrack; if (IsV0()) return kV0; return kNoType;}
void SetRef(AliVParticle *ref) {fRef = ref;}
// initialize task with all available slots, even if not all of them will be used:
AliRsnAnalysisSE *task = new AliRsnAnalysisSE("RsnAnalysis");
task->SetZeroEventPercentWarning(100.0);
- task->SelectCollisionCandidates();
+ //task->SelectCollisionCandidates();
+ task->SetMCOnly(kTRUE);
// load and execute configuration macro
gROOT->LoadMacro(configMacro);
// primary vertex range
AliRsnCutPrimaryVertex *cutVertex = new AliRsnCutPrimaryVertex("cutVertex", 10.0, 0, kFALSE);
AliRsnCutSet *cutSetEvent = new AliRsnCutSet("eventCuts", AliRsnCut::kEvent);
- cutSetEvent->AddCut(cutVertex);
- cutSetEvent->SetCutScheme("cutVertex");
- task->SetEventCuts(cutSetEvent);
+ //cutSetEvent->AddCut(cutVertex);
+ //cutSetEvent->SetCutScheme("cutVertex");
+ //task->SetEventCuts(cutSetEvent);
//
// -- Setup pairs ---------------------------------------------------------------------------------
// --> add related cuts
//cutSetDaughterCommon->AddCut(cuts2010);
- //cutSetDaughterCommon->AddCut(cutPID);
+ cutSetDaughterCommon->AddCut(cutPID);
// --> define schemes
- //cutSetDaughterCommon->SetCutScheme("cuts2010&cutPID");
+ cutSetDaughterCommon->SetCutScheme("cutPID");
// cut managers
// define a proper name for each mult bin, to avoid omonyme output histos
- //pairPMhist->GetCutManager()->SetCommonDaughterCuts(cutSetDaughterCommon);
- //pairPMntp ->GetCutManager()->SetCommonDaughterCuts(cutSetDaughterCommon);
+ pairPMhist->GetCutManager()->SetCommonDaughterCuts(cutSetDaughterCommon);
+ pairPMntp ->GetCutManager()->SetCommonDaughterCuts(cutSetDaughterCommon);
// function axes
Double_t ybins[] = {-0.8, -0.7, -0.6, -0.5, 0.5, 0.6, 0.7, 0.8};
// add functions to TH1-like output
pairPMhist->AddFunction(fcnPt);
+ //pairPMhist->SetOnlyTrue();
// add values to TNtuple-like output
pairPMntp->AddValue(axisIM);
//gROOT->LoadMacro("AddTaskAnalysisPhi7TeV.C");
//AddTaskAnalysisPhi7TeV(dataLabel);
- gROOT->LoadMacro("AddTaskAnalysisMonitor.C");
- AddTaskAnalysisMonitor(dataLabel);
+ //gROOT->LoadMacro("AddTaskAnalysisMonitor.C");
+ //AddTaskAnalysisMonitor(dataLabel);
// add task macro
- //gROOT->ProcessLine(Form(".x %s(\"%s\")", addTaskName, dataLabel));
+ gROOT->ProcessLine(Form(".x %s(\"%s\")", addTaskName, dataLabel));
// create TChain of input events
TChain *analysisChain = 0x0;