void AliAnalysisTaskGammaCalo::InitBack(){
const Int_t nDim = 4;
- Int_t nBins[nDim] = {800,250,7,4};
+ Int_t nBins[nDim] = {800,250,7,6};
Double_t xMin[nDim] = {0,0, 0,0};
- Double_t xMax[nDim] = {0.8,25,7,4};
+ Double_t xMax[nDim] = {0.8,25,7,6};
fSparseMotherInvMassPtZM = new THnSparseF*[fnCuts];
fSparseMotherBackInvMassPtZM = new THnSparseF*[fnCuts];
fBGHandler[iCut] = new AliGammaConversionAODBGHandler(
collisionSystem,centMin,centMax,
((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->GetNumberOfBGEvents(),
- ((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->UseTrackMultiplicity());
+ ((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->UseTrackMultiplicity(),
+ 4,8,7);
}
}
}
fESDList[iCut]->SetOwner(kTRUE);
fCutFolder[iCut]->Add(fESDList[iCut]);
- fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",9,-0.5,8.5);
+ fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",10,-0.5,9.5);
fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted");
fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality");
fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Missing MC");
- if (((AliConvEventCuts*)fEventCutArray->At(iCut))->IsSpecialTrigger() == 4 ){
+ if (((AliConvEventCuts*)fEventCutArray->At(iCut))->IsSpecialTrigger() > 1 ){
TString TriggerNames = "Not Trigger: ";
TriggerNames = TriggerNames+ ( (AliConvEventCuts*)fEventCutArray->At(iCut))->GetSpecialTriggerName();
fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up");
fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD");
fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND");
+ fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,"EMCAL problems");
fESDList[iCut]->Add(fHistoNEvents[iCut]);
if(fIsHeavyIon == 1) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",4000,0,4000);
fHistoMotherEtaPtAlpha[iCut] = new TH2F("ESD_MotherEta_Pt_Alpha","ESD_MotherEta_Pt_Alpha",150,0.03,15.,100,0,1);
SetLogBinningXTH2(fHistoMotherEtaPtAlpha[iCut]);
fESDList[iCut]->Add(fHistoMotherEtaPtAlpha[iCut]);
- fHistoMotherPi0PtOpenAngle[iCut] = new TH2F("ESD_MotherPi0_Pt_OpenAngle","ESD_MotherPi0_Pt_OpenAngle",150,0.03,15.,200,0,2*TMath::Pi());
+ fHistoMotherPi0PtOpenAngle[iCut] = new TH2F("ESD_MotherPi0_Pt_OpenAngle","ESD_MotherPi0_Pt_OpenAngle",150,0.03,15.,100,0,TMath::Pi());
SetLogBinningXTH2(fHistoMotherPi0PtOpenAngle[iCut]);
fESDList[iCut]->Add(fHistoMotherPi0PtOpenAngle[iCut]);
- fHistoMotherEtaPtOpenAngle[iCut] = new TH2F("ESD_MotherEta_Pt_OpenAngle","ESD_MotherEta_Pt_OpenAngle",150,0.03,15.,200,0,2*TMath::Pi());
+ fHistoMotherEtaPtOpenAngle[iCut] = new TH2F("ESD_MotherEta_Pt_OpenAngle","ESD_MotherEta_Pt_OpenAngle",150,0.03,15.,100,0,TMath::Pi());
SetLogBinningXTH2(fHistoMotherEtaPtOpenAngle[iCut]);
fESDList[iCut]->Add(fHistoMotherEtaPtOpenAngle[iCut]);
}
for(Int_t iCut = 0; iCut<fnCuts; iCut++){
fiCut = iCut;
- Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+
+ Bool_t isRunningEMCALrelAna = kFALSE;
+ if (((AliCaloPhotonCuts*)fClusterCutArray->At(fiCut))->GetClusterType() == 1) isRunningEMCALrelAna = kTRUE;
+
+ Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon, isRunningEMCALrelAna);
if(eventNotAccepted){
// cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
fHistoNGoodESDTracksVsNGammaCanditates[iCut]->Fill(fV0Reader->GetNumberOfPrimaryTracks(),fClusterCandidates->GetEntries());
if(fDoMesonAnalysis){ // Meson Analysis
+
CalculatePi0Candidates(); // Combine Gammas from conversion and from calo
if(((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->DoBGCalculation()){
if(((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->BackgroundHandlerType() == 0){
+
CalculateBackground(); // Combinatorial Background
UpdateEventByEventData(); // Store Event for mixed Events
}
AliAODConversionMother *pi0cand = new AliAODConversionMother(gamma0,gamma1);
pi0cand->SetLabels(firstGammaIndex,secondGammaIndex);
-
-
-
+
if((((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->MesonIsSelected(pi0cand,kTRUE,((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift()))){
fHistoMotherInvMassPt[fiCut]->Fill(pi0cand->M(),pi0cand->Pt());
// fill new histograms
if(((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->UseTrackMultiplicity()){
for(Int_t nEventsInBG=0;nEventsInBG<fBGHandler[fiCut]->GetNBGEvents();nEventsInBG++){
AliGammaConversionAODVector *previousEventV0s = fBGHandler[fiCut]->GetBGGoodV0s(zbin,mbin,nEventsInBG);
-
for(Int_t iCurrent=0;iCurrent<fClusterCandidates->GetEntries();iCurrent++){
AliAODConversionPhoton currentEventGoodV0 = *(AliAODConversionPhoton*)(fClusterCandidates->At(iCurrent));
for(UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
AliAODConversionPhoton previousGoodV0 = (AliAODConversionPhoton)(*(previousEventV0s->at(iPrevious)));
AliAODConversionMother *backgroundCandidate = new AliAODConversionMother(¤tEventGoodV0,&previousGoodV0);
backgroundCandidate->CalculateDistanceOfClossetApproachToPrimVtx(fInputEvent->GetPrimaryVertex());
+
if((((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))
->MesonIsSelected(backgroundCandidate,kFALSE,((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift()))){
fHistoMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt());
AliAODConversionPhoton previousGoodV0 = (AliAODConversionPhoton)(*(previousEventV0s->at(iPrevious)));
AliAODConversionMother *backgroundCandidate = new AliAODConversionMother(¤tEventGoodV0,&previousGoodV0);
backgroundCandidate->CalculateDistanceOfClossetApproachToPrimVtx(fInputEvent->GetPrimaryVertex());
+
if((((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->MesonIsSelected(backgroundCandidate,kFALSE,((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift()))){
fHistoMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt());
Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin};