bugfixes + extended track matching histograms
authordmuhlhei <d.muehlheim@cern.ch>
Tue, 21 Oct 2014 14:44:16 +0000 (16:44 +0200)
committerdmuhlhei <d.muehlheim@cern.ch>
Tue, 21 Oct 2014 15:41:17 +0000 (17:41 +0200)
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.h
PWGGA/GammaConv/AliCaloPhotonCuts.cxx
PWGGA/GammaConv/AliCaloPhotonCuts.h
PWGGA/GammaConv/macros/AddTask_GammaConvCalo_PbPb.C
PWGGA/GammaConv/macros/AddTask_GammaConvCalo_pPb.C
PWGGA/GammaConv/macros/AddTask_GammaConvCalo_pp.C

index 7302ef9..e24b9ce 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];
@@ -822,6 +828,10 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                                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]);
                        }
                }    
        }
@@ -2436,12 +2446,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()){
index d83bc84..4d90344 100644 (file)
@@ -164,6 +164,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                                **fHistoMotherPi0ConvPhotonEtaPhi;  //! array of histograms with invariant mass cut of 0.05 && pi0cand->M() < 0.17 ,eta/phi of conversion photon
+        TH2F                                **fHistoMotherEtaConvPhotonEtaPhi;  //! array of histograms with invariant mass cut of 0.45 && pi0cand->M() < 0.65 ,eta/phi of conversion photon
                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
index ab2f76f..15ea534 100644 (file)
@@ -90,6 +90,7 @@ AliCaloPhotonCuts::AliCaloPhotonCuts(const char *name,const char *title) :
        fUseTimeDiff(0),
        fMinDistTrackToCluster(0),
        fUseDistTrackToCluster(0),
+    fExtendedMatching(kFALSE),
        fExoticCell(0),
        fUseExoticCell(0),
        fMinEnergy(0),
@@ -135,11 +136,18 @@ AliCaloPhotonCuts::AliCaloPhotonCuts(const char *name,const char *title) :
     //fHistNLMAfterQA(NULL),
     fHistClusterRBeforeQA(NULL),
     fHistClusterRAfterQA(NULL),
-    fHistClusterdEtadPhiPosTracksBeforeQA(NULL),
-    fHistClusterdEtadPhiNegTracksBeforeQA(NULL),
+    fHistClusterdEtadPhiBeforeQA(NULL),
     fHistClusterdEtadPhiAfterQA(NULL),
     fHistDistanceTrackToClusterBeforeQA(NULL),
-    fHistDistanceTrackToClusterAfterQA(NULL)
+    fHistDistanceTrackToClusterAfterQA(NULL),
+    fHistClusterdEtadPhiPosTracksBeforeQA(NULL),
+    fHistClusterdEtadPhiNegTracksBeforeQA(NULL),
+    fHistClusterdEtadPtBeforeQA(NULL),
+    fHistClusterdPhidPtBeforeQA(NULL),
+    fHistClusterM20Pt_dPhiBeforeQA(NULL),
+    fHistClusterM02Pt_dPhiBeforeQA(NULL),
+    fHistClusterM20M02BeforeQA(NULL),
+    fHistClusterM20M02AfterQA(NULL)
 {
    for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;}
    fCutString=new TObjString((GetCutNumber()).Data());
@@ -162,6 +170,7 @@ AliCaloPhotonCuts::AliCaloPhotonCuts(const AliCaloPhotonCuts &ref) :
        fUseTimeDiff(ref.fUseTimeDiff),
        fMinDistTrackToCluster(ref.fMinDistTrackToCluster),
        fUseDistTrackToCluster(ref.fUseDistTrackToCluster),
+    fExtendedMatching(ref.fExtendedMatching),
        fExoticCell(ref.fExoticCell),
        fUseExoticCell(ref.fUseExoticCell),
        fMinEnergy(ref.fMinEnergy),
@@ -207,11 +216,18 @@ AliCaloPhotonCuts::AliCaloPhotonCuts(const AliCaloPhotonCuts &ref) :
     //fHistNLMAfterQA(NULL),
     fHistClusterRBeforeQA(NULL),
     fHistClusterRAfterQA(NULL),
-    fHistClusterdEtadPhiPosTracksBeforeQA(NULL),
-    fHistClusterdEtadPhiNegTracksBeforeQA(NULL),
+    fHistClusterdEtadPhiBeforeQA(NULL),
     fHistClusterdEtadPhiAfterQA(NULL),
     fHistDistanceTrackToClusterBeforeQA(NULL),
-    fHistDistanceTrackToClusterAfterQA(NULL)
+    fHistDistanceTrackToClusterAfterQA(NULL),
+    fHistClusterdEtadPhiPosTracksBeforeQA(NULL),
+    fHistClusterdEtadPhiNegTracksBeforeQA(NULL),
+    fHistClusterdEtadPtBeforeQA(NULL),
+    fHistClusterdPhidPtBeforeQA(NULL),
+    fHistClusterM20Pt_dPhiBeforeQA(NULL),
+    fHistClusterM02Pt_dPhiBeforeQA(NULL),
+    fHistClusterM20M02BeforeQA(NULL),
+    fHistClusterM20M02AfterQA(NULL)
 {
    // Copy Constructor
    for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=ref.fCuts[jj];}
@@ -284,11 +300,11 @@ void AliCaloPhotonCuts::InitCutHistograms(TString name){
        fHistograms->Add(fHistClusterIdentificationCuts);
 
        // Acceptance related histogramms
-       fHistClusterEtavsPhiBeforeAcc=new TH2F(Form("EtaPhi_beforeAcceptance %s",GetCutNumber().Data()),"EtaPhi_beforeAcceptance",462,-TMath::Pi(),TMath::Pi(),110,-0.7,0.7);
+    fHistClusterEtavsPhiBeforeAcc=new TH2F(Form("EtaPhi_beforeAcceptance %s",GetCutNumber().Data()),"EtaPhi_beforeAcceptance",430,-TMath::Pi(),TMath::Pi(),96,-0.7,0.7); // 462->430, 110->96
        fHistograms->Add(fHistClusterEtavsPhiBeforeAcc);
-       fHistClusterEtavsPhiAfterAcc=new TH2F(Form("EtaPhi_afterAcceptance %s",GetCutNumber().Data()),"EtaPhi_afterAcceptance",462,-TMath::Pi(),TMath::Pi(),110,-0.7,0.7);
+    fHistClusterEtavsPhiAfterAcc=new TH2F(Form("EtaPhi_afterAcceptance %s",GetCutNumber().Data()),"EtaPhi_afterAcceptance",430,-TMath::Pi(),TMath::Pi(),96,-0.7,0.7); // 462->430, 110->96
        fHistograms->Add(fHistClusterEtavsPhiAfterAcc);
-       fHistClusterEtavsPhiAfterQA=new TH2F(Form("EtaPhi_afterClusterQA %s",GetCutNumber().Data()),"EtaPhi_afterClusterQA",462,-TMath::Pi(),TMath::Pi(),110,-0.7,0.7);
+    fHistClusterEtavsPhiAfterQA=new TH2F(Form("EtaPhi_afterClusterQA %s",GetCutNumber().Data()),"EtaPhi_afterClusterQA",430,-TMath::Pi(),TMath::Pi(),96,-0.7,0.7); // 462->430, 110->96
        fHistograms->Add(fHistClusterEtavsPhiAfterQA);
     //fHistDistanceToBadChannelBeforeAcc = new TH1F(Form("DistanceToBadChannel_beforeAcceptance %s",GetCutNumber().Data()),"DistanceToBadChannel_beforeAcceptance",200,0,40);
     //fHistograms->Add(fHistDistanceToBadChannelBeforeAcc);
@@ -339,18 +355,34 @@ void AliCaloPhotonCuts::InitCutHistograms(TString name){
         fHistograms->Add(fHistClusterRBeforeQA);
         fHistClusterRAfterQA = new TH1F(Form("R_Cluster_afterClusterQA %s",GetCutNumber().Data()),"R of cluster_matched",200,400,500);
         fHistograms->Add(fHistClusterRAfterQA);
-        fHistClusterdEtadPhiPosTracksBeforeQA=new TH2F(Form("dEtaVsdPhi_posTracks_beforeClusterQA %s",GetCutNumber().Data()),"dEtaVsdPhi_posTracks_beforeClusterQA",240,-0.3,0.3,240,-0.3,0.3);
-        fHistograms->Add(fHistClusterdEtadPhiPosTracksBeforeQA);
-               fHistClusterdEtadPhiNegTracksBeforeQA=new TH2F(Form("dEtaVsdPhi_negTracks_beforeClusterQA %s",GetCutNumber().Data()),"dEtaVsdPhi_negTracks_beforeClusterQA",240,-0.3,0.3,240,-0.3,0.3);
-        fHistograms->Add(fHistClusterdEtadPhiNegTracksBeforeQA);
+        fHistClusterdEtadPhiBeforeQA=new TH2F(Form("dEtaVsdPhi_beforeClusterQA %s",GetCutNumber().Data()),"dEtaVsdPhi_beforeClusterQA",240,-0.3,0.3,240,-0.3,0.3);
+        fHistograms->Add(fHistClusterdEtadPhiBeforeQA);
         fHistClusterdEtadPhiAfterQA=new TH2F(Form("dEtaVsdPhi_afterClusterQA %s",GetCutNumber().Data()),"dEtaVsdPhi_afterClusterQA",240,-0.3,0.3,240,-0.3,0.3);
         fHistograms->Add(fHistClusterdEtadPhiAfterQA);
         fHistDistanceTrackToClusterBeforeQA = new TH1F(Form("DistanceToTrack_beforeClusterQA %s",GetCutNumber().Data()),"DistanceToTrack_beforeClusterQA",200,0,2);
         fHistograms->Add(fHistDistanceTrackToClusterBeforeQA);
         fHistDistanceTrackToClusterAfterQA = new TH1F(Form("DistanceToTrack_afterClusterQA %s",GetCutNumber().Data()),"DistanceToTrack_afterClusterQA",200,0,2);
         fHistograms->Add(fHistDistanceTrackToClusterAfterQA);
-    }
        
+        if(fExtendedMatching){
+            fHistClusterdEtadPhiPosTracksBeforeQA = new TH2F(Form("dEtaVsdPhi_posTracks_beforeClusterQA %s",GetCutNumber().Data()),"dEtaVsdPhi_posTracks_beforeClusterQA",240,-0.3,0.3,240,-0.3,0.3);
+            fHistograms->Add(fHistClusterdEtadPhiPosTracksBeforeQA);
+            fHistClusterdEtadPhiNegTracksBeforeQA = new TH2F(Form("dEtaVsdPhi_negTracks_beforeClusterQA %s",GetCutNumber().Data()),"dEtaVsdPhi_negTracks_beforeClusterQA",240,-0.3,0.3,240,-0.3,0.3);
+            fHistograms->Add(fHistClusterdEtadPhiNegTracksBeforeQA);
+            fHistClusterdEtadPtBeforeQA = new TH2F(Form("dEtaVsPt_beforeClusterQA %s",GetCutNumber().Data()),"dEtaVsPt_beforeClusterQA",240,-0.3,0.3,250,0,25);
+            fHistograms->Add(fHistClusterdEtadPtBeforeQA);
+            fHistClusterdPhidPtBeforeQA = new TH2F(Form("dPhiVsPt_beforeClusterQA %s",GetCutNumber().Data()),"dPhiVsPt_beforeClusterQA",480,-0.6,0.6,250,0,25);
+            fHistograms->Add(fHistClusterdPhidPtBeforeQA);
+            fHistClusterM20Pt_dPhiBeforeQA = new TH2F(Form("M20VsPt_dPhi_beforeClusterQA %s",GetCutNumber().Data()),"M20VsPt_dPhi_beforeClusterQA",200,0,2.5,250,0,25);
+            fHistograms->Add(fHistClusterM20Pt_dPhiBeforeQA);
+            fHistClusterM02Pt_dPhiBeforeQA = new TH2F(Form("M02VsPt_dPhi_beforeClusterQA %s",GetCutNumber().Data()),"M20VsPt_dPhi_beforeClusterQA",400,0,5,250,0,25);
+            fHistograms->Add(fHistClusterM02Pt_dPhiBeforeQA);
+            fHistClusterM20M02BeforeQA = new TH2F(Form("M20VsM02_beforeClusterQA %s",GetCutNumber().Data()),"M20VsM02_beforeClusterQA",200,0,2.5,400,0,5);
+            fHistograms->Add(fHistClusterM20M02BeforeQA);
+            fHistClusterM20M02AfterQA = new TH2F(Form("M20VsM02_afterClusterQA %s",GetCutNumber().Data()),"M20VsM02_afterClusterQA",200,0,2.5,400,0,5);
+            fHistograms->Add(fHistClusterM20M02AfterQA);
+        }
+    }
        TH1::AddDirectory(kTRUE);
 }
 
@@ -565,8 +597,8 @@ Bool_t AliCaloPhotonCuts::ClusterQualityCuts(AliVCluster* cluster, AliVEvent *ev
        if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //10
 
        // Histos after Cuts
-       Double_t vertex[3] = {0};
-       event->GetPrimaryVertex()->GetXYZ(vertex);
+    Double_t vertex[3] = {0,0,0};
+//     event->GetPrimaryVertex()->GetXYZ(vertex);
        // TLorentzvector with cluster
        TLorentzVector clusterVector;
        cluster->GetMomentum(clusterVector,vertex);
@@ -596,8 +628,8 @@ Bool_t AliCaloPhotonCuts::ClusterIsSelected(AliVCluster *cluster, AliVEvent * ev
 
        FillClusterCutIndex(kPhotonIn);
 
-       Double_t vertex[3] = {0};
-       event->GetPrimaryVertex()->GetXYZ(vertex);
+    Double_t vertex[3] = {0,0,0};
+//     event->GetPrimaryVertex()->GetXYZ(vertex);
        // TLorentzvector with cluster
        TLorentzVector clusterVector;
        cluster->GetMomentum(clusterVector,vertex);
@@ -667,7 +699,7 @@ Bool_t AliCaloPhotonCuts::AcceptanceCuts(AliVCluster *cluster, AliVEvent* event)
        
        // check phi range
        if (fUsePhiCut ){
-               if (phiCluster < fMinPhiCut || phiCluster > fMaxEtaCut){
+        if (phiCluster < fMinPhiCut || phiCluster > fMaxPhiCut){
                        if(fHistAcceptanceCuts)fHistAcceptanceCuts->Fill(cutIndex);
                        return kFALSE;
                }
@@ -704,8 +736,8 @@ Bool_t AliCaloPhotonCuts::MatchConvPhotonToCluster(AliAODConversionPhoton* convP
                }
        }
 
-    Double_t vertex[3] = {0,0,0};
-       event->GetPrimaryVertex()->GetXYZ(vertex);
+//    Double_t vertex[3] = {0,0,0};
+//     event->GetPrimaryVertex()->GetXYZ(vertex);
 
     if(!cluster->IsEMCAL() && !cluster->IsPHOS()){AliError("Cluster is neither EMCAL nor PHOS, returning"); return kFALSE;}
 
@@ -737,7 +769,6 @@ Bool_t AliCaloPhotonCuts::MatchConvPhotonToCluster(AliAODConversionPhoton* convP
                                }
                        }
                }
-               //      if( inTrack->Pt() < 0.005 ) continue;
 
                AliESDtrack *esdt = dynamic_cast<AliESDtrack*>(inTrack);
                AliAODTrack *aodt = 0;
@@ -786,15 +817,31 @@ Bool_t AliCaloPhotonCuts::MatchConvPhotonToCluster(AliAODConversionPhoton* convP
 
                if (propagated){
                        Float_t dR2 = dPhi*dPhi + dEta*dEta;
-                       if (fHistDistanceTrackToClusterBeforeQA)fHistDistanceTrackToClusterBeforeQA->Fill(TMath::Sqrt(dR2));
-                       if (fHistClusterdEtadPhiPosTracksBeforeQA && inTrack->Charge()< 0) fHistClusterdEtadPhiPosTracksBeforeQA->Fill(dEta, dPhi);
-                       if (fHistClusterdEtadPhiNegTracksBeforeQA && inTrack->Charge()> 0) fHistClusterdEtadPhiNegTracksBeforeQA->Fill(dEta, dPhi);
+            if(fHistDistanceTrackToClusterBeforeQA)fHistDistanceTrackToClusterBeforeQA->Fill(TMath::Sqrt(dR2));
+            if(fHistDistanceTrackToClusterBeforeQA)fHistDistanceTrackToClusterBeforeQA->Fill(TMath::Sqrt(dR2));
+            if(fHistClusterdEtadPhiBeforeQA) fHistClusterdEtadPhiBeforeQA->Fill(dEta, dPhi);
+
+            Float_t clusM02 = (Float_t)cluster->GetM02();
+            Float_t clusM20 = (Float_t)cluster->GetM20();
+            if(fExtendedMatching){
+                if(fHistClusterdEtadPhiPosTracksBeforeQA && inTrack->Charge() > 0) fHistClusterdEtadPhiPosTracksBeforeQA->Fill(dEta, dPhi);
+                if(fHistClusterdEtadPhiNegTracksBeforeQA && inTrack->Charge() < 0) fHistClusterdEtadPhiNegTracksBeforeQA->Fill(dEta, dPhi);
+                fHistClusterdEtadPtBeforeQA->Fill(dEta, inTrack->Pt());
+                fHistClusterdPhidPtBeforeQA->Fill(dPhi, inTrack->Pt());
+                if(abs(dPhi) > 0.05) fHistClusterM20Pt_dPhiBeforeQA->Fill(clusM20, inTrack->Pt());
+                if(abs(dPhi) > 0.05) fHistClusterM02Pt_dPhiBeforeQA->Fill(clusM02, inTrack->Pt());
+                fHistClusterM20M02BeforeQA->Fill(clusM20, clusM02);
+            }
+
                        if(dR2 < fMinDistTrackToCluster*fMinDistTrackToCluster){
                                matched = kTRUE;
                        } else {
-                               if (fHistDistanceTrackToClusterAfterQA)fHistDistanceTrackToClusterAfterQA->Fill(TMath::Sqrt(dR2));
-                               if (fHistClusterdEtadPhiAfterQA) fHistClusterdEtadPhiAfterQA->Fill(dEta, dPhi);
-                               if (fHistClusterRAfterQA) fHistClusterRAfterQA->Fill(clusterR);                         
+                if(fHistDistanceTrackToClusterAfterQA)fHistDistanceTrackToClusterAfterQA->Fill(TMath::Sqrt(dR2));
+                if(fHistClusterdEtadPhiAfterQA) fHistClusterdEtadPhiAfterQA->Fill(dEta, dPhi);
+                if(fHistClusterRAfterQA) fHistClusterRAfterQA->Fill(clusterR);
+                if(fExtendedMatching){
+                    fHistClusterM20M02AfterQA->Fill(clusM20, clusM02);
+                }
                        }       
                }
                delete trackParam;
index ddb3c04..fa785ce 100644 (file)
@@ -93,9 +93,11 @@ class AliCaloPhotonCuts : public AliAnalysisCuts {
                Bool_t ClusterIsSelectedAODMC(AliAODMCParticle *particle,TClonesArray *aodmcArray);
                        
                void InitCutHistograms(TString name="");
-               void SetFillCutHistograms(TString name=""){if(!fHistograms){InitCutHistograms(name);};}
+        void SetFillCutHistograms(TString name=""){if(!fHistograms){InitCutHistograms(name);}}
                TList *GetCutHistograms(){return fHistograms;}
                void FillClusterCutIndex(Int_t photoncut){if(fHistCutIndex)fHistCutIndex->Fill(photoncut);}
+
+        void SetExtendedMatching(Bool_t extendedMatching){fExtendedMatching = extendedMatching;}
                        
                ///Cut functions
                Bool_t AcceptanceCuts(AliVCluster* cluster, AliVEvent *event);
@@ -139,6 +141,7 @@ class AliCaloPhotonCuts : public AliAnalysisCuts {
                Bool_t fUseTimeDiff;                                            // flag for switching on time difference cut
                Double_t fMinDistTrackToCluster;                        // minimum distance between track and cluster
                Bool_t fUseDistTrackToCluster;                          // flag for switching on distance between track and cluster cut
+        Bool_t fExtendedMatching;                   // flag for switching on extended matching histograms
                Double_t fExoticCell;                                           // exotic cell cut
                Bool_t fUseExoticCell;                                          // flag for switching on exotic cell cut
                Double_t fMinEnergy;                                            // minium energy per cluster
@@ -191,12 +194,21 @@ class AliCaloPhotonCuts : public AliAnalysisCuts {
         //Track matching histograms
                TH1F* fHistClusterRBeforeQA;                            // cluster position in R=SQRT(x^2+y^2) (before QA)
                TH1F* fHistClusterRAfterQA;                                     // cluster position in R=SQRT(x^2+y^2) for matched tracks (After QA)
-               TH2F* fHistClusterdEtadPhiPosTracksBeforeQA;                    // 2-dim plot dEta vs. dPhi
-               TH2F* fHistClusterdEtadPhiNegTracksBeforeQA;                    // 2-dim plot dEta vs. dPhi
+        TH2F* fHistClusterdEtadPhiBeforeQA;                    // 2-dim plot dEta vs. dPhi
                TH2F* fHistClusterdEtadPhiAfterQA;                      // 2-dim plot dEta vs. dPhi for matched tracks (after QA)
                TH1F* fHistDistanceTrackToClusterBeforeQA;      // distance cluster to track before acceptance cuts
         TH1F* fHistDistanceTrackToClusterAfterQA;      // distance cluster to track after cluster quality cuts
 
+        //Extended track matching histograms
+        TH2F* fHistClusterdEtadPhiPosTracksBeforeQA;// 2-dim plot dEta vs. dPhi
+        TH2F* fHistClusterdEtadPhiNegTracksBeforeQA;// 2-dim plot dEta vs. dPhi
+        TH2F* fHistClusterdEtadPtBeforeQA;          // 2-dim plot dEta vs. Pt
+        TH2F* fHistClusterdPhidPtBeforeQA;          // 2-dim plot dEta vs. Pt
+        TH2F* fHistClusterM20Pt_dPhiBeforeQA;       // 2-dim plot M20 vs. Pt for given dPhi>0.05
+        TH2F* fHistClusterM02Pt_dPhiBeforeQA;       // 2-dim plot M02 vs. Pt for given dPhi>0.05
+        TH2F* fHistClusterM20M02BeforeQA;           // 2-dim plot M20 vs. M02
+        TH2F* fHistClusterM20M02AfterQA;            // 2-dim plot M20 vs. M20
+
        private:
 
                ClassDef(AliCaloPhotonCuts,2)
index 819b555..67555d8 100644 (file)
@@ -6,7 +6,8 @@ void AddTask_GammaConvCalo_PbPb(        Int_t trainConfig = 1,  //change different s
                                                                        Int_t headerSelectionInt = 0,  // 1 pi0 header, 2 eta header, 3 both (only for "named" boxes)
                                                                        TString cutnumberAODBranch = "1000000060084000001500000",
                                                                        TString periodName = "LHC13d2",  //name of the period for added signals and weighting
-                                                                       Bool_t doWeighting = kFALSE  //enable Weighting
+                                    Bool_t doWeighting = kFALSE,  //enable Weighting
+                                    Bool_t enableExtendedMatching = kFALSE //enable or disable extended matching histograms for conversion electrons <-> cluster
                                                                ) {
 
        // ================= Load Librariers =================================
@@ -208,6 +209,7 @@ void AddTask_GammaConvCalo_PbPb(    Int_t trainConfig = 1,  //change different s
                analysisClusterCuts[i] = new AliCaloPhotonCuts();
                analysisClusterCuts[i]->InitializeCutsFromCutString(clusterCutArray[i].Data());
                ClusterCutList->Add(analysisClusterCuts[i]);
+        analysisClusterCuts[i]->SetExtendedMatching(enableExtendedMatching);
                analysisClusterCuts[i]->SetFillCutHistograms("");
 
                analysisMesonCuts[i] = new AliConversionMesonCuts();
index d58ded6..b7f8ffe 100644 (file)
@@ -5,7 +5,8 @@ void AddTask_GammaConvCalo_pPb(  Int_t trainConfig = 1,  //change different set
                               TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input
                               Int_t doWeightingPart = 0,  //enable Weighting
                               TString generatorName = "DPMJET",
-                              TString cutnumberAODBranch = "8000000060084000001500000" // cutnumber for AOD branch
+                              TString cutnumberAODBranch = "8000000060084000001500000", // cutnumber for AOD branch
+                              Bool_t enableExtendedMatching = kFALSE //enable or disable extended matching histograms for conversion electrons <-> cluster
                                                        ) {
 
        // ================= Load Librariers =================================
@@ -208,6 +209,7 @@ void AddTask_GammaConvCalo_pPb(  Int_t trainConfig = 1,  //change different set
                analysisClusterCuts[i] = new AliCaloPhotonCuts();
                analysisClusterCuts[i]->InitializeCutsFromCutString(clusterCutArray[i].Data());
                ClusterCutList->Add(analysisClusterCuts[i]);
+        analysisClusterCuts[i]->SetExtendedMatching(enableExtendedMatching);
                analysisClusterCuts[i]->SetFillCutHistograms("");
                
                analysisMesonCuts[i] = new AliConversionMesonCuts();
index 971f05e..44eec1f 100644 (file)
@@ -3,7 +3,8 @@ void AddTask_GammaConvCalo_pp(  Int_t trainConfig = 1,  //change different set o
                                                                Int_t enableQAMesonTask = 1, //enable QA in AliAnalysisTaskGammaConvV1
                                                                Int_t enableQAPhotonTask = 1, // enable additional QA task
                                                                TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input
-                                                               TString cutnumberAODBranch = "0000000060084001001500000" 
+                                TString cutnumberAODBranch = "0000000060084001001500000",
+                                Bool_t enableExtendedMatching = kFALSE //enable or disable extended matching histograms for conversion electrons <-> cluster
                                                        ) {
 
        // ================= Load Librariers =================================
@@ -244,6 +245,7 @@ void AddTask_GammaConvCalo_pp(  Int_t trainConfig = 1,  //change different set o
                analysisClusterCuts[i] = new AliCaloPhotonCuts();
                analysisClusterCuts[i]->InitializeCutsFromCutString(clusterCutArray[i].Data());
                ClusterCutList->Add(analysisClusterCuts[i]);
+        analysisClusterCuts[i]->SetExtendedMatching(enableExtendedMatching);
                analysisClusterCuts[i]->SetFillCutHistograms("");
                
                analysisMesonCuts[i] = new AliConversionMesonCuts();