]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx
fix coverity 24652
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnalysisTaskGammaConvCalo.cxx
index cf35b3669fe6045ff1b9812ddbd48bc52e00f2aa..3662683ffac8cc03e823ba67ed3317a416df93ec 100644 (file)
@@ -113,6 +113,8 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(): AliAnalysisTaskSE(
        fHistoMotherEtaPtAlpha(NULL),
        fHistoMotherPi0PtOpenAngle(NULL),
        fHistoMotherEtaPtOpenAngle(NULL),
+    fHistoMotherPi0ConvPhotonEtaPhi(NULL),
+    fHistoMotherEtaConvPhotonEtaPhi(NULL),
        fHistoMotherInvMassECalib(NULL),
        fHistoMotherInvMassECalibalpha(NULL),
        fTreeMesonsInvMassPtDcazMinDcazMaxFlag(NULL),
@@ -312,6 +314,8 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(const char *name):
        fHistoMotherEtaPtAlpha(NULL),
        fHistoMotherPi0PtOpenAngle(NULL),
        fHistoMotherEtaPtOpenAngle(NULL),
+    fHistoMotherPi0ConvPhotonEtaPhi(NULL),
+    fHistoMotherEtaConvPhotonEtaPhi(NULL),
        fHistoMotherInvMassECalib(NULL),
        fHistoMotherInvMassECalibalpha(NULL),
        fTreeMesonsInvMassPtDcazMinDcazMaxFlag(NULL),
@@ -622,6 +626,8 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                        fHistoMotherEtaPtAlpha =  new TH2F*[fnCuts];
                        fHistoMotherPi0PtOpenAngle =  new TH2F*[fnCuts];
                        fHistoMotherEtaPtOpenAngle =  new TH2F*[fnCuts];
+            fHistoMotherPi0ConvPhotonEtaPhi = new TH2F*[fnCuts];
+            fHistoMotherEtaConvPhotonEtaPhi = new TH2F*[fnCuts];
                }
                if(fDoMesonQA == 1){
                        fHistoMotherInvMassECalib = new TH2F*[fnCuts];
@@ -655,11 +661,11 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                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());
@@ -671,6 +677,7 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                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 problem");
                fESDList[iCut]->Add(fHistoNEvents[iCut]);
                
                if(fIsHeavyIon == 1) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",4000,0,4000);
@@ -816,12 +823,16 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                                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]);
+                fHistoMotherPi0ConvPhotonEtaPhi[iCut] = new TH2F("ESD_MotherPi0ConvPhoton_Eta_Phi","ESD_MotherPi0ConvPhoton_Eta_Phi",600,0,2*TMath::Pi(),400,-2,2);
+                fESDList[iCut]->Add(fHistoMotherPi0ConvPhotonEtaPhi[iCut]);
+                fHistoMotherEtaConvPhotonEtaPhi[iCut] = new TH2F("ESD_MotherEtaConvPhoton_Eta_Phi","ESD_MotherEtaConvPhoton_Eta_Phi",600,0,2*TMath::Pi(),400,-2,2);
+                fESDList[iCut]->Add(fHistoMotherEtaConvPhotonEtaPhi[iCut]);
                        }
                }    
        }
@@ -1357,7 +1368,11 @@ void AliAnalysisTaskGammaConvCalo::UserExec(Option_t *)
        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;
@@ -2436,12 +2451,14 @@ void AliAnalysisTaskGammaConvCalo::CalculatePi0Candidates(){
                                                        if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
                                                                fHistoMotherPi0PtY[fiCut]->Fill(pi0cand->Pt(),pi0cand->Rapidity()-((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift());
                                                                fHistoMotherPi0PtAlpha[fiCut]->Fill(pi0cand->Pt(),pi0cand->GetAlpha());
-                                                               fHistoMotherPi0PtOpenAngle[fiCut]->Fill(pi0cand->Pt(),pi0cand->GetOpeningAngle());      
+                                fHistoMotherPi0PtOpenAngle[fiCut]->Fill(pi0cand->Pt(),pi0cand->GetOpeningAngle());
+                                fHistoMotherPi0ConvPhotonEtaPhi[fiCut]->Fill(gamma0->GetPhotonPhi(), gamma0->GetPhotonEta());
                                                        }
                                                        if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
                                                                fHistoMotherEtaPtY[fiCut]->Fill(pi0cand->Pt(),pi0cand->Rapidity()-((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift());
                                                                fHistoMotherEtaPtAlpha[fiCut]->Fill(pi0cand->Pt(),pi0cand->GetAlpha());
                                                                fHistoMotherEtaPtOpenAngle[fiCut]->Fill(pi0cand->Pt(),pi0cand->GetOpeningAngle());
+                                fHistoMotherEtaConvPhotonEtaPhi[fiCut]->Fill(gamma0->GetPhotonPhi(), gamma0->GetPhotonEta());
                                                        }
                                                }
                                                if(((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->DoBGCalculation()){