]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- changes in AliAnalysisTaskGammaConvCalo for debugging
authorfbock <friederike.bock@cern.ch>
Fri, 1 Aug 2014 13:39:56 +0000 (15:39 +0200)
committerfbock <friederike.bock@cern.ch>
Fri, 1 Aug 2014 13:39:56 +0000 (15:39 +0200)
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.h
PWGGA/GammaConv/AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.cxx
PWGGA/GammaConv/AliCaloPhotonCuts.cxx

index f8604d9c15591ceeab5fb03812917e1470aa3f80..95ac3ce142dbc0d95d41f9750c7d25d9199aab7e 100644 (file)
@@ -112,6 +112,8 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(): AliAnalysisTaskSE(
        fHistoMotherEtaPtAlpha(NULL),
        fHistoMotherPi0PtOpenAngle(NULL),
        fHistoMotherEtaPtOpenAngle(NULL),
+       fHistoMotherInvMassECalib(NULL),
+       fHistoMotherInvMassECalibalpha(NULL),
        fTreeMesonsInvMassPtDcazMinDcazMaxFlag(NULL),
        fInvMass(0),
        fPt(0),
@@ -128,6 +130,7 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(): AliAnalysisTaskSE(
        fHistoClusGammaPt(NULL),
        fHistoMCHeaders(NULL),
        fHistoMCAllGammaPt(NULL),
+       fHistoMCAllGammaEMCALAccPt(NULL),
        fHistoMCDecayGammaPi0Pt(NULL),
        fHistoMCDecayGammaRhoPt(NULL),
        fHistoMCDecayGammaEtaPt(NULL),
@@ -156,6 +159,10 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(): AliAnalysisTaskSE(
        fHistoTrueMotherInvMassPt(NULL),
        fHistoTrueMotherCaloPhotonInvMassPt(NULL),
        fHistoTrueMotherCaloConvertedPhotonInvMassPt(NULL),
+       fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
+       fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL),
+       fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
+       fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL),
        fHistoTrueMotherCaloElectronInvMassPt(NULL),
        fHistoTrueMotherCaloMergedClusterInvMassPt(NULL),
        fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL),
@@ -191,8 +198,10 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(): AliAnalysisTaskSE(
        fHistoTrueSecondaryConvGammaFromXFromLambdaPt(NULL),
        fHistoTrueClusGammaPt(NULL),
        fHistoTrueClusUnConvGammaPt(NULL),
+       fHistoTrueClusUnConvGammaMCPt(NULL),
        fHistoTrueClusElectronPt(NULL),
        fHistoTrueClusConvGammaPt(NULL),
+       fHistoTrueClusConvGammaMCPt(NULL),
        fHistoTrueClusConvGammaFullyPt(NULL),
        fHistoTrueClusMergedGammaPt(NULL),
        fHistoTrueClusMergedPartConvGammaPt(NULL),
@@ -294,6 +303,8 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(const char *name):
        fHistoMotherEtaPtAlpha(NULL),
        fHistoMotherPi0PtOpenAngle(NULL),
        fHistoMotherEtaPtOpenAngle(NULL),
+       fHistoMotherInvMassECalib(NULL),
+       fHistoMotherInvMassECalibalpha(NULL),
        fTreeMesonsInvMassPtDcazMinDcazMaxFlag(NULL),
        fInvMass(0),
        fPt(0),
@@ -310,6 +321,7 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(const char *name):
        fHistoClusGammaPt(NULL),
        fHistoMCHeaders(NULL),
        fHistoMCAllGammaPt(NULL),
+       fHistoMCAllGammaEMCALAccPt(NULL),
        fHistoMCDecayGammaPi0Pt(NULL),
        fHistoMCDecayGammaRhoPt(NULL),
        fHistoMCDecayGammaEtaPt(NULL),
@@ -338,6 +350,10 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(const char *name):
        fHistoTrueMotherInvMassPt(NULL),
        fHistoTrueMotherCaloPhotonInvMassPt(NULL),
        fHistoTrueMotherCaloConvertedPhotonInvMassPt(NULL),
+       fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
+       fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL),
+       fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
+       fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL),
        fHistoTrueMotherCaloElectronInvMassPt(NULL),
        fHistoTrueMotherCaloMergedClusterInvMassPt(NULL),
        fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL),
@@ -373,8 +389,10 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(const char *name):
        fHistoTrueSecondaryConvGammaFromXFromLambdaPt(NULL),
        fHistoTrueClusGammaPt(NULL),
        fHistoTrueClusUnConvGammaPt(NULL),
+       fHistoTrueClusUnConvGammaMCPt(NULL),
        fHistoTrueClusElectronPt(NULL),
        fHistoTrueClusConvGammaPt(NULL),
+       fHistoTrueClusConvGammaMCPt(NULL),
        fHistoTrueClusConvGammaFullyPt(NULL),
        fHistoTrueClusMergedGammaPt(NULL),
        fHistoTrueClusMergedPartConvGammaPt(NULL),
@@ -586,6 +604,10 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                        fHistoMotherPi0PtOpenAngle =  new TH2F*[fnCuts];
                        fHistoMotherEtaPtOpenAngle =  new TH2F*[fnCuts];
                }
+               if(fDoMesonQA == 1){
+                       fHistoMotherInvMassECalib = new TH2F*[fnCuts];
+                       fHistoMotherInvMassECalibalpha = new TH2F*[fnCuts];
+               }
        }
        fTagOutputList = new TList*[fnCuts];
        
@@ -753,6 +775,13 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                                fMesonDCAList[iCut]->Add(fTreeMesonsInvMassPtDcazMinDcazMaxFlag[iCut]);
                                
                        }
+                       if(fDoMesonQA == 1){
+                               fHistoMotherInvMassECalib[iCut] = new TH2F("ESD_Mother_InvMass_Pt_Calib","ESD_Mother_InvMass_Pt_Calib",800,0,0.8,250,0,25);
+                               fESDList[iCut]->Add(fHistoMotherInvMassECalib[iCut]);
+                               fHistoMotherInvMassECalibalpha[iCut] = new TH2F("ESD_Mother_InvMass_vs_E_Calib_alpha","ESD_Mother_InvMass_vs_E_Calib_alpha",800,0,0.8,250,0,25);
+                               fESDList[iCut]->Add(fHistoMotherInvMassECalibalpha[iCut]);
+                       }
+
                        if (fDoMesonQA > 0 ){
                                fHistoMotherPi0PtY[iCut] = new TH2F("ESD_MotherPi0_Pt_Y","ESD_MotherPi0_Pt_Y",150,0.03,15.,150,-1.5,1.5);
                                SetLogBinningXTH2(fHistoMotherPi0PtY[iCut]);
@@ -788,6 +817,7 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                fHeaderNameList                                         = new TList*[fnCuts];
                fHistoMCHeaders                                         = new TH1I*[fnCuts];
                fHistoMCAllGammaPt                                      = new TH1F*[fnCuts];
+               fHistoMCAllGammaEMCALAccPt                      = new TH1F*[fnCuts];
                fHistoMCDecayGammaPi0Pt                         = new TH1F*[fnCuts];
                fHistoMCDecayGammaRhoPt                         = new TH1F*[fnCuts];
                fHistoMCDecayGammaEtaPt                         = new TH1F*[fnCuts];
@@ -817,8 +847,10 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                }
                if (fDoClusterQA > 0){  
                        fHistoTrueClusUnConvGammaPt             = new TH1F*[fnCuts];
+                       fHistoTrueClusUnConvGammaMCPt           = new TH1F*[fnCuts];
                        fHistoTrueClusElectronPt                        = new TH1F*[fnCuts];
                        fHistoTrueClusConvGammaPt                       = new TH1F*[fnCuts];
+                       fHistoTrueClusConvGammaMCPt                     = new TH1F*[fnCuts];
                        fHistoTrueClusConvGammaFullyPt          = new TH1F*[fnCuts];
                        fHistoTrueClusMergedGammaPt             = new TH1F*[fnCuts];
                        fHistoTrueClusMergedPartConvGammaPt = new TH1F*[fnCuts];
@@ -860,6 +892,10 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                                fHistoMCSecEtaSource                                            = new TH1F*[fnCuts];
                                fHistoTrueMotherCaloPhotonInvMassPt                     = new TH2F*[fnCuts];
                                fHistoTrueMotherCaloConvertedPhotonInvMassPt= new TH2F*[fnCuts];
+                               fHistoTruePi0CaloConvertedPhotonInvMassPt       = new TH2F*[fnCuts];
+                               fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt = new TH2F*[fnCuts];
+                               fHistoTrueEtaCaloConvertedPhotonInvMassPt       = new TH2F*[fnCuts];
+                               fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt = new TH2F*[fnCuts];
                                fHistoTrueMotherCaloElectronInvMassPt           = new TH2F*[fnCuts];
                                fHistoTrueMotherCaloMergedClusterInvMassPt      = new TH2F*[fnCuts];
                                fHistoTrueMotherCaloMergedClusterPartConvInvMassPt      = new TH2F*[fnCuts];
@@ -897,6 +933,8 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                        fMCList[iCut]->Add(fHistoMCHeaders[iCut]);
                        fHistoMCAllGammaPt[iCut] = new TH1F("MC_AllGamma_Pt","MC_AllGamma_Pt",250,0,25);
                        fMCList[iCut]->Add(fHistoMCAllGammaPt[iCut]);
+                       fHistoMCAllGammaEMCALAccPt[iCut] = new TH1F("MC_AllGammaEMCALAcc_Pt","MC_AllGamma_Pt",250,0,25);
+                       fMCList[iCut]->Add(fHistoMCAllGammaEMCALAccPt[iCut]);
                        fHistoMCDecayGammaPi0Pt[iCut] = new TH1F("MC_DecayGammaPi0_Pt","MC_DecayGammaPi0_Pt",250,0,25);
                        fMCList[iCut]->Add(fHistoMCDecayGammaPi0Pt[iCut]);
                        fHistoMCDecayGammaRhoPt[iCut] = new TH1F("MC_DecayGammaRho_Pt","MC_DecayGammaRho_Pt",250,0,25);
@@ -1030,11 +1068,14 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                        if (fDoClusterQA > 0){  
                                fHistoTrueClusUnConvGammaPt[iCut] = new TH1F("TrueClusUnConvGamma_Pt","TrueClusUnConvGamma_Pt",250,0,25);
                                fTagOutputList[iCut]->Add(fHistoTrueClusUnConvGammaPt[iCut]);
+                               fHistoTrueClusUnConvGammaMCPt[iCut] = new TH1F("TrueClusUnConvGamma_MCPt","TrueClusUnConvGamma_MCPt",250,0,25);
+                               fTagOutputList[iCut]->Add(fHistoTrueClusUnConvGammaMCPt[iCut]);
                                fHistoTrueClusElectronPt[iCut] = new TH1F("TrueClusElectron_Pt","TrueElectronGamma_Pt",250,0,25);
                                fTagOutputList[iCut]->Add(fHistoTrueClusElectronPt[iCut]);
-
                                fHistoTrueClusConvGammaPt[iCut] = new TH1F("TrueClusConvGamma_Pt","TrueClusConvGamma_Pt",250,0,25);
                                fTagOutputList[iCut]->Add(fHistoTrueClusConvGammaPt[iCut]);
+                               fHistoTrueClusConvGammaMCPt[iCut] = new TH1F("TrueClusConvGamma_MCPt","TrueClusConvGamma_MCPt",250,0,25);
+                               fTagOutputList[iCut]->Add(fHistoTrueClusConvGammaMCPt[iCut]);
                                fHistoTrueClusConvGammaFullyPt[iCut] = new TH1F("TrueClusConvGammaFullyContained_Pt","TrueClusConvGammaFullyContained_Pt",250,0,25);
                                fTagOutputList[iCut]->Add(fHistoTrueClusConvGammaFullyPt[iCut]);
                                fHistoTrueClusMergedGammaPt[iCut] = new TH1F("TrueClusMergedGamma_Pt","TrueClusMergedGamma_Pt",250,0,25);
@@ -1086,6 +1127,17 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                                        fTrueList[iCut]->Add(fHistoTrueMotherCaloPhotonInvMassPt[iCut]);
                                        fHistoTrueMotherCaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloConvertedPhoton_InvMass_Pt","ESD_TrueMotherCaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25);
                                        fTrueList[iCut]->Add(fHistoTrueMotherCaloConvertedPhotonInvMassPt[iCut]);
+
+                                       fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloConvertedPhoton_InvMass_Pt","ESD_TruePi0CaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fTrueList[iCut]->Add(fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut]);
+                                       fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloConvertedPhotonMatched_InvMass_Pt","ESD_TruePi0CaloConvertedPhotonMatched_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fTrueList[iCut]->Add(fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[iCut]);
+
+                                       fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloConvertedPhoton_InvMass_Pt","ESD_TrueEtaCaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fTrueList[iCut]->Add(fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut]);
+                                       fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloConvertedPhotonMatched_InvMass_Pt","ESD_TrueEtaCaloConvertedPhotonMatched_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fTrueList[iCut]->Add(fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[iCut]);
+
                                        fHistoTrueMotherCaloElectronInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloElectron_InvMass_Pt","ESD_TrueMotherCaloElectron_InvMass_Pt",800,0,0.8,250,0,25);
                                        fTrueList[iCut]->Add(fHistoTrueMotherCaloElectronInvMassPt[iCut]);
                                        fHistoTrueMotherCaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloMergedCluster_InvMass_Pt","ESD_TrueMotherCaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25);
@@ -1371,7 +1423,8 @@ void AliAnalysisTaskGammaConvCalo::ProcessClusters()
        // Loop over EMCal clusters
        for(Int_t i = 0; i < nclus; i++){
                
-               AliVCluster* clus = fInputEvent->GetCaloCluster(i);             
+               AliVCluster* clus = NULL;
+               clus = fInputEvent->GetCaloCluster(i);          
                if (!clus) continue;
                if(!((AliCaloPhotonCuts*)fClusterCutArray->At(fiCut))->ClusterIsSelected(clus,fInputEvent,fIsMC)) continue;
                // TLorentzvector with cluster
@@ -1444,12 +1497,16 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueClusterCandidates(AliAODConversion
                if (TruePhotonCandidate->IsLargestComponentPhoton() || TruePhotonCandidate->IsLargestComponentElectron() )fHistoTrueClusGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
                        else fHistoTrueClusEMNonLeadingPt[fiCut]->Fill(TruePhotonCandidate->Pt());
                if (fDoClusterQA > 0){
-                       if (TruePhotonCandidate->IsLargestComponentPhoton()) 
+                       if (TruePhotonCandidate->IsLargestComponentPhoton()){ 
                                fHistoTrueClusUnConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
+                               fHistoTrueClusUnConvGammaMCPt[fiCut]->Fill(Photon->Pt());
+                       }       
                        if (TruePhotonCandidate->IsLargestComponentElectron()) 
                                fHistoTrueClusElectronPt[fiCut]->Fill(TruePhotonCandidate->Pt());
-                       if (TruePhotonCandidate->IsLargestComponentElectron() && TruePhotonCandidate->IsConversion()) 
+                       if (TruePhotonCandidate->IsLargestComponentElectron() && TruePhotonCandidate->IsConversion()){
                                fHistoTrueClusConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
+                               fHistoTrueClusConvGammaMCPt[fiCut]->Fill(((TParticle*)fMCStack->Particle(Photon->GetMother(0)))->Pt());
+                       }       
                        if (TruePhotonCandidate->IsLargestComponentElectron() && TruePhotonCandidate->IsConversion() && TruePhotonCandidate->IsConversionFullyContained()) 
                                fHistoTrueClusConvGammaFullyPt[fiCut]->Fill(TruePhotonCandidate->Pt());
                        if (TruePhotonCandidate->IsMerged() || TruePhotonCandidate->IsMergedPartConv() || TruePhotonCandidate->IsDalitzMerged())
@@ -1506,12 +1563,17 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueClusterCandidatesAOD(AliAODConvers
                if (TruePhotonCandidate->IsLargestComponentPhoton() || TruePhotonCandidate->IsLargestComponentElectron() )fHistoTrueClusGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
                        else fHistoTrueClusEMNonLeadingPt[fiCut]->Fill(TruePhotonCandidate->Pt());
                if (fDoClusterQA > 0){
-                       if (TruePhotonCandidate->IsLargestComponentPhoton()) 
+                       if (TruePhotonCandidate->IsLargestComponentPhoton()) {
                                fHistoTrueClusUnConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
+                               fHistoTrueClusUnConvGammaMCPt[fiCut]->Fill(Photon->Pt());
+                       }       
                        if (TruePhotonCandidate->IsLargestComponentElectron()) 
                                fHistoTrueClusElectronPt[fiCut]->Fill(TruePhotonCandidate->Pt());
-                       if (TruePhotonCandidate->IsLargestComponentElectron() && TruePhotonCandidate->IsConversion()) 
+                       if (TruePhotonCandidate->IsLargestComponentElectron() && TruePhotonCandidate->IsConversion()) {
                                fHistoTrueClusConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
+                               AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
+                               fHistoTrueClusConvGammaMCPt[fiCut]->Fill(Mother->Pt());
+                       }       
                        if (TruePhotonCandidate->IsLargestComponentElectron() && TruePhotonCandidate->IsConversion() && TruePhotonCandidate->IsConversionFullyContained()) 
                                fHistoTrueClusConvGammaFullyPt[fiCut]->Fill(TruePhotonCandidate->Pt());
                        if (TruePhotonCandidate->IsMerged() || TruePhotonCandidate->IsMergedPartConv() || TruePhotonCandidate->IsDalitzMerged())
@@ -2033,6 +2095,10 @@ void AliAnalysisTaskGammaConvCalo::ProcessMCParticles()
                if(!((AliConversionPhotonCuts*)fCutArray->At(fiCut))->InPlaneOutOfPlaneCut(particle->Phi(),fEventPlaneAngle,kFALSE)) continue;
                if(((AliConversionPhotonCuts*)fCutArray->At(fiCut))->PhotonIsSelectedMC(particle,fMCStack,kFALSE)){
                        fHistoMCAllGammaPt[fiCut]->Fill(particle->Pt()); // All MC Gamma
+                       if (abs(particle->Eta()) < 0.66 ){
+                               if (particle->Phi() > 1.39626 && particle->Phi() < 3.125) fHistoMCAllGammaEMCALAccPt[fiCut]->Fill(particle->Pt());
+                       }       
+                       
                        if(particle->GetMother(0) >-1){ // Meson Decay Gamma
                                switch(fMCStack->Particle(particle->GetMother(0))->GetPdgCode()){
                                case 111: // Pi0
@@ -2322,6 +2388,12 @@ void AliAnalysisTaskGammaConvCalo::CalculatePi0Candidates(){
                                                        if ( (fInvMass > 0.08 && fInvMass < 0.2) || (fInvMass > 0.45 && fInvMass < 0.6)) fTreeMesonsInvMassPtDcazMinDcazMaxFlag[fiCut]->Fill();
                                                }
                                        }
+                                       if (fDoMesonQA == 1){
+                                               fHistoMotherInvMassECalib[fiCut]->Fill(pi0cand->M(),gamma1->E());
+                                               if(pi0cand->GetAlpha()<0.1)
+                                               fHistoMotherInvMassECalibalpha[fiCut]->Fill(pi0cand->M(),gamma1->E());            
+                                       }
+
                                }
                                delete pi0cand;
                                pi0cand=0x0;
@@ -2391,8 +2463,15 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo
                                        fHistoTrueMotherCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
                                if (TrueGammaCandidate1->IsLargestComponentElectron()) 
                                        fHistoTrueMotherCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
-                               if (TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion())
+                               if (TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion()){
                                        fHistoTrueMotherCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                                       if (isTruePi0)fHistoTruePi0CaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                                       if (isTrueEta)fHistoTrueEtaCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                                       if ((TrueGammaCandidate0->GetMCLabelPositive() == gamma1MCLabel || TrueGammaCandidate0->GetMCLabelNegative() == gamma1MCLabel) && isTruePi0)
+                                               fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                                       if ((TrueGammaCandidate0->GetMCLabelPositive() == gamma1MCLabel || TrueGammaCandidate0->GetMCLabelNegative() == gamma1MCLabel) && isTrueEta)
+                                               fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                               }       
                                if (TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged() )
                                        fHistoTrueMotherCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
                                if (TrueGammaCandidate1->IsMergedPartConv()) 
@@ -2545,8 +2624,15 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio
                                fHistoTrueMotherCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
                        if (TrueGammaCandidate1->IsLargestComponentElectron()) 
                                fHistoTrueMotherCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
-                       if (TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion())
+                       if (TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion()){
                                fHistoTrueMotherCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                               if (isTruePi0)fHistoTruePi0CaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                               if (isTrueEta)fHistoTrueEtaCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                               if ((TrueGammaCandidate0->GetMCLabelPositive() == gamma1MCLabel || TrueGammaCandidate0->GetMCLabelNegative() == gamma1MCLabel) && isTruePi0)
+                                       fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                               if ((TrueGammaCandidate0->GetMCLabelPositive() == gamma1MCLabel || TrueGammaCandidate0->GetMCLabelNegative() == gamma1MCLabel) && isTrueEta)
+                                       fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
+                       }       
                        if (TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged() )
                                fHistoTrueMotherCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
                        if (TrueGammaCandidate1->IsMergedPartConv()) 
index 3eeb2d8172fd1cb9acab8f62c9b93769a25d2c24..61c62213f5d09207219479a8a6ce4c2d819702b5 100644 (file)
@@ -167,6 +167,8 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                TH2F                                                            **fHistoMotherEtaPtAlpha;                       //! array of histograms with invariant mass cut of 0.45 && pi0cand->M() < 0.65, pt, alpha
                TH2F                                                            **fHistoMotherPi0PtOpenAngle;           //! array of histograms with invariant mass cut of 0.05 && pi0cand->M() < 0.17, pt, openAngle
                TH2F                                                            **fHistoMotherEtaPtOpenAngle;           //! array of histograms with invariant mass cut of 0.45 && pi0cand->M() < 0.65, pt, openAngle
+               TH2F                                                            **fHistoMotherInvMassECalib;            //! array of histogram with signal + BG for same event photon pairs, inv Mass, energy of cluster
+               TH2F                                                            **fHistoMotherInvMassECalibalpha;       //! array of histogram with signal + BG for same event photon pairs, inv Mass, energy of cluster, alpha cut 0.1
                TTree                                                           **fTreeMesonsInvMassPtDcazMinDcazMaxFlag; //! array of trees with dca information for mesons
                Float_t                                                         fInvMass;                                                       // inv mass for meson tree
                Float_t                                                         fPt;                                                            // pt for meson tree 
@@ -195,6 +197,7 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                //histograms for pure MC quantities
                TH1I                                                            **fHistoMCHeaders;                                      //! array of histos for header names
                TH1F                                                            **fHistoMCAllGammaPt;                           //! array of histos with all gamma, pT
+               TH1F                                                            **fHistoMCAllGammaEMCALAccPt;           //! array of histos with all gamma in EMCAL acceptance, pT
                TH1F                                                            **fHistoMCDecayGammaPi0Pt;                      //! array of histos with decay gamma from pi0, pT
                TH1F                                                            **fHistoMCDecayGammaRhoPt;                      //! array of histos with decay gamma from rho, pT
                TH1F                                                            **fHistoMCDecayGammaEtaPt;                      //! array of histos with decay gamma from eta, pT
@@ -224,6 +227,10 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                TH2F                                                            **fHistoTrueMotherInvMassPt;                                    //! array of histos with validated mothers, invMass, pt
                TH2F                                                            **fHistoTrueMotherCaloPhotonInvMassPt;                  //! array of histos with validated mothers, photon leading, invMass, pt
                TH2F                                                            **fHistoTrueMotherCaloConvertedPhotonInvMassPt; //! array of histos with validated mothers, converted photon leading, invMass, pt
+               TH2F                                                            **fHistoTruePi0CaloConvertedPhotonInvMassPt;    //! array of histos with validated pi0, converted photon leading, invMass, pt
+               TH2F                                                            **fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt;     //! array of histos with validated pi0 matched with conv photon, converted photon leading, invMass, pt
+               TH2F                                                            **fHistoTrueEtaCaloConvertedPhotonInvMassPt;    //! array of histos with validated eta, converted photon leading, invMass, pt
+               TH2F                                                            **fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt;     //! array of histos with validated eta matched with conv photon, converted photon leading, invMass, pt
                TH2F                                                            **fHistoTrueMotherCaloElectronInvMassPt;                //! array of histos with validated mothers, electron leading, invMass, pt
                TH2F                                                            **fHistoTrueMotherCaloMergedClusterInvMassPt;   //! array of histos with validated mothers, merged cluster invMass, pt
                TH2F                                                            **fHistoTrueMotherCaloEMNonLeadingInvMassPt;    //! array of histos with validated mothers, EM non leading, invMass, pt
@@ -260,8 +267,10 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                TH1F                                                            **fHistoTrueSecondaryConvGammaFromXFromLambdaPt;//! array of histos with validated secondary conversion photon from Lambda, pt  
                TH1F                                                            **fHistoTrueClusGammaPt;                                                //! array of histos with validated cluster (electron or photon), pt
                TH1F                                                            **fHistoTrueClusUnConvGammaPt;                                  //! array of histos with validated unconverted photon, pt
+               TH1F                                                            **fHistoTrueClusUnConvGammaMCPt;                                        //! array of histos with validated unconverted photon, pt
                TH1F                                                            **fHistoTrueClusElectronPt;                                             //! array of histos with validated electron, pt
                TH1F                                                            **fHistoTrueClusConvGammaPt;                                    //! array of histos with validated converted photon, pt
+               TH1F                                                            **fHistoTrueClusConvGammaMCPt;                                  //! array of histos with validated converted photon, pt
                TH1F                                                            **fHistoTrueClusConvGammaFullyPt;                               //! array of histos with validated converted photon, fully contained, pt
                TH1F                                                            **fHistoTrueClusMergedGammaPt;                                  //! array of histos with validated merged photons, electrons, dalitz, pt
                TH1F                                                            **fHistoTrueClusMergedPartConvGammaPt;                  //! array of histos with validated merged partially converted photons, pt
index a6c1695b435d7b2f7ba34cc793acc364fd37331a..0c93e34c13644acdae8222e61b693d7f2db38abc 100644 (file)
@@ -713,7 +713,7 @@ void AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero::UserExec(Option_t *){
 //             UpdateEventByEventData();
                                
                fGoodGammas->Clear(); // delete this cuts good gammas
-               fNeutralPionCandidates->Clear();
+               if(fNeutralPionCandidates->GetEntries()>0) fNeutralPionCandidates->Clear();
                fGoodVirtualParticles->Clear(); // delete this cuts good gammas
        }
 
index 84b6dbf868225bb539d976060aeada8ebbe17701..52ea0620f6e0557dd263078dbcc51830313905a8 100644 (file)
@@ -570,40 +570,44 @@ Bool_t AliCaloPhotonCuts::ClusterQualityCuts(AliVCluster* cluster, AliVEvent *ev
 
        // Minimum distance to track
        if (fUseDistTrackToCluster){
-//             Float_t pos[3];
-//             cluster->GetPosition(pos);  // Get cluster position
-//             TVector3 cp(pos);
-//             int NtrMatched = 0;
-//             NtrMatched = cluster->GetNTracksMatched();
-//             
-//             //loop over tracks for Jet QA
-//             TList *l = event->GetList();
-//             TClonesArray *tracks = dynamic_cast<TClonesArray*>(l->FindObject("Tracks"));
-// 
-//             for(int itrack = 0; itrack < NtrMatched; itrack++){
-//                     AliVTrack *trackcluster = static_cast<AliVTrack*>(tracks->At(itrack));
-//                     if (! trackcluster) {
-//                             AliError(Form("Couldn't get ESD track %d\n", itrack));
-//                             continue;
-//                     }
-//                     Double_t dphi = -999.0;
-//                     Double_t deta = -999.0;
-//                     AliPicoTrack::GetEtaPhiDiff(trackcluster, cluster, dphi, deta);
-//                     cout << "here 2" << endl;
-//                     Double_t dr = sqrt(dphi*dphi + deta+deta);
-//                     if(dr < fMinDistTrackToCluster){
-//                             if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
-//                             return kFALSE;
-//                     }
-//                     
-//             }//loop over tracks
-
-       
-               if(cluster->GetEmcCpvDistance() < fMinDistTrackToCluster){
-                       if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
-                       return kFALSE;
+               Float_t pos[3];
+               cluster->GetPosition(pos);  // Get cluster position
+               TVector3 cp(pos);
+               int NtrMatched = 0;
+               NtrMatched = cluster->GetNTracksMatched();
+               fHistNMatchedTracks->Fill(NtrMatched);
+               if(NtrMatched > 0){
+                       //loop over tracks for QA
+                       TList *l = event->GetList();
+                       TClonesArray *tracks = dynamic_cast<TClonesArray*>(l->FindObject("Tracks"));
+                       
+                       Double_t dphi = 999.0;
+                       Double_t deta = 999.0;
+                       Double_t dr2 = 999.0;
+
+                       for(int itrack = 0; itrack < NtrMatched; itrack++){
+                               AliVTrack *trackcluster = NULL;
+                               trackcluster = static_cast<AliVTrack*>(tracks->At(itrack));
+                               if (! trackcluster) {
+                               AliError(Form("Couldn't get ESD track %d\n", itrack));
+                               continue;
+                               }
+                               AliPicoTrack::GetEtaPhiDiff(trackcluster, cluster, dphi, deta);
+                               dr2 = dphi*dphi + deta+deta;
+                               //cout << dr << endl;
+                               if(dr2 < fMinDistTrackToCluster*fMinDistTrackToCluster){
+               //        if(dphi < fMinDistTrackToCluster || deta < fMinDistTrackToCluster){
+                               if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
+                               return kFALSE;
+                               }
+                               
+                       }//loop over tracks
                }
-       }       
+//             if(cluster->GetEmcCpvDistance() < fMinDistTrackToCluster){
+//                     if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
+//                     return kFALSE;
+//             }
+       }
        cutIndex++;//3, next cut
 
        // exotic cell cut --IMPLEMENT LATER---