fixes in GammaConvCalo and CaloPhotonCuts
authordmuhlhei <d.muehlheim@cern.ch>
Fri, 10 Oct 2014 08:58:55 +0000 (10:58 +0200)
committerdmuhlhei <d.muehlheim@cern.ch>
Fri, 10 Oct 2014 08:58:55 +0000 (10:58 +0200)
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx
PWGGA/GammaConv/AliCaloPhotonCuts.cxx
PWGGA/GammaConv/AliCaloPhotonCuts.h

index 598ce62..1899830 100644 (file)
@@ -795,7 +795,7 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                                
                        }
                        if(fDoMesonQA == 1){
-                               fHistoMotherInvMassECalib[iCut] = new TH2F("ESD_Mother_InvMass_Pt_Calib","ESD_Mother_InvMass_Pt_Calib",800,0,0.8,250,0,25);
+                fHistoMotherInvMassECalib[iCut] = new TH2F("ESD_Mother_InvMass_vs_E_Calib","ESD_Mother_InvMass_vs_E_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]);
@@ -1056,7 +1056,7 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                        fHistoTrueConvGammaPt[iCut] = new TH1F("ESD_TrueConvGamma_Pt","ESD_TrueConvGamma_Pt",250,0,25);
                        fTrueList[iCut]->Add(fHistoTrueConvGammaPt[iCut]);
       
-                       fHistoTrueConvPi0GammaPt[iCut] = new TH1F("ESD_TrueConvGamma_Pt","ESD_TrueConvGamma_Pt",250,0,25);
+            fHistoTrueConvPi0GammaPt[iCut] = new TH1F("ESD_TrueConvPi0Gamma_Pt","ESD_TrueConvPi0Gamma_Pt",250,0,25);
                        fTrueList[iCut]->Add(fHistoTrueConvPi0GammaPt[iCut]);
       
                        fHistoCombinatorialPt[iCut] = new TH2F("ESD_TrueCombinatorial_Pt","ESD_TrueCombinatorial_Pt",250,0,25,16,-0.5,15.5);
@@ -1925,7 +1925,12 @@ void AliAnalysisTaskGammaConvCalo::ProcessTruePhotonCandidatesAOD(AliAODConversi
                        }
                }
        }
-  
+
+    if( ((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetPdgCode() == 111)
+    {
+        fHistoTrueConvPi0GammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
+    }
+
 }
 //________________________________________________________________________
 void AliAnalysisTaskGammaConvCalo::ProcessTruePhotonCandidates(AliAODConversionPhoton *TruePhotonCandidate)
index d62a943..74227f5 100644 (file)
@@ -114,19 +114,13 @@ AliCaloPhotonCuts::AliCaloPhotonCuts(const char *name,const char *title) :
        fHistClusterEtavsPhiBeforeAcc(NULL),
        fHistClusterEtavsPhiAfterAcc(NULL),
        fHistClusterEtavsPhiAfterQA(NULL),
-       fHistDistanceToBadChannelBeforeAcc(NULL),
-       fHistDistanceToBadChannelAfterAcc(NULL),
-    fHistClusterRBeforeQA(NULL),
-    fHistClusterRAfterQA(NULL),
-    fHistClusterdEtadPhiBeforeQA(NULL),
-    fHistClusterdEtadPhiAfterQA(NULL),
+    //fHistDistanceToBadChannelBeforeAcc(NULL),
+    //fHistDistanceToBadChannelAfterAcc(NULL),
        fHistClusterTimevsEBeforeQA(NULL),
        fHistClusterTimevsEAfterQA(NULL),
-       fHistExoticCellBeforeQA(NULL),
-       fHistExoticCellAfterQA(NULL),
-       fHistNMatchedTracks(NULL),
-       fHistDistanceTrackToClusterBeforeQA(NULL),
-       fHistDistanceTrackToClusterAfterQA(NULL),
+    //fHistExoticCellBeforeQA(NULL),
+    //fHistExoticCellAfterQA(NULL),
+    //fHistNMatchedTracks(NULL),
        fHistEnergyOfClusterBeforeQA(NULL),
        fHistEnergyOfClusterAfterQA(NULL),
        fHistNCellsBeforeQA(NULL),
@@ -136,9 +130,15 @@ AliCaloPhotonCuts::AliCaloPhotonCuts(const char *name,const char *title) :
        fHistM20BeforeQA(NULL),
        fHistM20AfterQA(NULL),
        fHistDispersionBeforeQA(NULL),
-       fHistDispersionAfterQA(NULL),
-       fHistNLMBeforeQA(NULL),
-       fHistNLMAfterQA(NULL)
+    fHistDispersionAfterQA(NULL),
+    //fHistNLMBeforeQA(NULL),
+    //fHistNLMAfterQA(NULL),
+    fHistClusterRBeforeQA(NULL),
+    fHistClusterRAfterQA(NULL),
+    fHistClusterdEtadPhiBeforeQA(NULL),
+    fHistClusterdEtadPhiAfterQA(NULL),
+    fHistDistanceTrackToClusterBeforeQA(NULL),
+    fHistDistanceTrackToClusterAfterQA(NULL)
 {
    for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;}
    fCutString=new TObjString((GetCutNumber()).Data());
@@ -185,19 +185,13 @@ AliCaloPhotonCuts::AliCaloPhotonCuts(const AliCaloPhotonCuts &ref) :
        fHistClusterEtavsPhiBeforeAcc(NULL),
        fHistClusterEtavsPhiAfterAcc(NULL),
        fHistClusterEtavsPhiAfterQA(NULL),
-       fHistDistanceToBadChannelBeforeAcc(NULL),
-       fHistDistanceToBadChannelAfterAcc(NULL),
-       fHistClusterRBeforeQA(NULL),
-       fHistClusterRAfterQA(NULL),
-       fHistClusterdEtadPhiBeforeQA(NULL),
-       fHistClusterdEtadPhiAfterQA(NULL),
+    //fHistDistanceToBadChannelBeforeAcc(NULL),
+    //fHistDistanceToBadChannelAfterAcc(NULL),
        fHistClusterTimevsEBeforeQA(NULL),
        fHistClusterTimevsEAfterQA(NULL),
-       fHistExoticCellBeforeQA(NULL),
-       fHistExoticCellAfterQA(NULL),
-       fHistNMatchedTracks(NULL),
-       fHistDistanceTrackToClusterBeforeQA(NULL),
-       fHistDistanceTrackToClusterAfterQA(NULL),
+    //fHistExoticCellBeforeQA(NULL),
+    //fHistExoticCellAfterQA(NULL),
+    //fHistNMatchedTracks(NULL),
        fHistEnergyOfClusterBeforeQA(NULL),
        fHistEnergyOfClusterAfterQA(NULL),
        fHistNCellsBeforeQA(NULL),
@@ -207,9 +201,15 @@ AliCaloPhotonCuts::AliCaloPhotonCuts(const AliCaloPhotonCuts &ref) :
        fHistM20BeforeQA(NULL),
        fHistM20AfterQA(NULL),
        fHistDispersionBeforeQA(NULL),
-       fHistDispersionAfterQA(NULL),
-       fHistNLMBeforeQA(NULL),
-       fHistNLMAfterQA(NULL)
+    fHistDispersionAfterQA(NULL),
+    //fHistNLMBeforeQA(NULL),
+    //fHistNLMAfterQA(NULL),
+    fHistClusterRBeforeQA(NULL),
+    fHistClusterRAfterQA(NULL),
+    fHistClusterdEtadPhiBeforeQA(NULL),
+    fHistClusterdEtadPhiAfterQA(NULL),
+    fHistDistanceTrackToClusterBeforeQA(NULL),
+    fHistDistanceTrackToClusterAfterQA(NULL)
 {
    // Copy Constructor
    for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=ref.fCuts[jj];}
@@ -288,34 +288,22 @@ void AliCaloPhotonCuts::InitCutHistograms(TString name){
        fHistograms->Add(fHistClusterEtavsPhiAfterAcc);
        fHistClusterEtavsPhiAfterQA=new TH2F(Form("EtaPhi_afterClusterQA %s",GetCutNumber().Data()),"EtaPhi_afterClusterQA",462,-TMath::Pi(),TMath::Pi(),110,-0.7,0.7);
        fHistograms->Add(fHistClusterEtavsPhiAfterQA);
-       fHistDistanceToBadChannelBeforeAcc = new TH1F(Form("DistanceToBadChannel_beforeAcceptance %s",GetCutNumber().Data()),"DistanceToBadChannel_beforeAcceptance",200,0,40);
-       fHistograms->Add(fHistDistanceToBadChannelBeforeAcc);
-       fHistDistanceToBadChannelAfterAcc = new TH1F(Form("DistanceToBadChannel_afterAcceptance %s",GetCutNumber().Data()),"DistanceToBadChannel_afterAcceptance",200,0,40);
-       fHistograms->Add(fHistDistanceToBadChannelAfterAcc);
+    //fHistDistanceToBadChannelBeforeAcc = new TH1F(Form("DistanceToBadChannel_beforeAcceptance %s",GetCutNumber().Data()),"DistanceToBadChannel_beforeAcceptance",200,0,40);
+    //fHistograms->Add(fHistDistanceToBadChannelBeforeAcc);
+    //fHistDistanceToBadChannelAfterAcc = new TH1F(Form("DistanceToBadChannel_afterAcceptance %s",GetCutNumber().Data()),"DistanceToBadChannel_afterAcceptance",200,0,40);
+    //fHistograms->Add(fHistDistanceToBadChannelAfterAcc);
        
        // Cluster quality related histograms
-       fHistClusterRBeforeQA = new TH1F(Form("R_Cluster_beforeClusterQA %s",GetCutNumber().Data()),"R of cluster",200,400,500);
-       fHistograms->Add(fHistClusterRBeforeQA);
-       fHistClusterRAfterQA = new TH1F(Form("R_Cluster_afterClusterQA %s",GetCutNumber().Data()),"R of cluster_matched",200,400,500);
-       fHistograms->Add(fHistClusterRAfterQA);
-       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);
        fHistClusterTimevsEBeforeQA=new TH2F(Form("ClusterTimeVsE_beforeClusterQA %s",GetCutNumber().Data()),"ClusterTimeVsE_beforeClusterQA",400,-10e-6,10e-6,100,0.,40);
        fHistograms->Add(fHistClusterTimevsEBeforeQA);
        fHistClusterTimevsEAfterQA=new TH2F(Form("ClusterTimeVsE_afterClusterQA %s",GetCutNumber().Data()),"ClusterTimeVsE_afterClusterQA",400,-10e-6,10e-6,100,0.,40);
        fHistograms->Add(fHistClusterTimevsEAfterQA);
-       fHistExoticCellBeforeQA=new TH2F(Form("ExoticCell_beforeClusterQA %s",GetCutNumber().Data()),"ExoticCell_beforeClusterQA",400,0,40,50,0.75,1);
-       fHistograms->Add(fHistExoticCellBeforeQA);
-       fHistExoticCellAfterQA=new TH2F(Form("ExoticCell_afterClusterQA %s",GetCutNumber().Data()),"ExoticCell_afterClusterQA",400,0,40,50,0.75,1);
-       fHistograms->Add(fHistExoticCellAfterQA);
-       fHistNMatchedTracks = new TH1F(Form("NMatchedTracks_%s",GetCutNumber().Data()),"NMatchedTracks",22,-1.5,20.5);
-       fHistograms->Add(fHistNMatchedTracks);
-       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);
+    //fHistExoticCellBeforeQA=new TH2F(Form("ExoticCell_beforeClusterQA %s",GetCutNumber().Data()),"ExoticCell_beforeClusterQA",400,0,40,50,0.75,1);
+    //fHistograms->Add(fHistExoticCellBeforeQA);
+    //fHistExoticCellAfterQA=new TH2F(Form("ExoticCell_afterClusterQA %s",GetCutNumber().Data()),"ExoticCell_afterClusterQA",400,0,40,50,0.75,1);
+    //fHistograms->Add(fHistExoticCellAfterQA);
+    //fHistNMatchedTracks = new TH1F(Form("NMatchedTracks_%s",GetCutNumber().Data()),"NMatchedTracks",22,-1.5,20.5);
+    //fHistograms->Add(fHistNMatchedTracks);
        fHistEnergyOfClusterBeforeQA = new TH1F(Form("EnergyOfCluster_beforeClusterQA %s",GetCutNumber().Data()),"EnergyOfCluster_beforeClusterQA",300,0,30);
        fHistograms->Add(fHistEnergyOfClusterBeforeQA);
        fHistEnergyOfClusterAfterQA = new TH1F(Form("EnergyOfCluster_afterClusterQA %s",GetCutNumber().Data()),"EnergyOfCluster_afterClusterQA",300,0,30);
@@ -336,10 +324,27 @@ void AliCaloPhotonCuts::InitCutHistograms(TString name){
        fHistograms->Add(fHistDispersionBeforeQA);
        fHistDispersionAfterQA = new TH1F(Form("Dispersion_afterClusterQA %s",GetCutNumber().Data()),"Dispersion_afterClusterQA",100,0,4);
        fHistograms->Add(fHistDispersionAfterQA);
-       fHistNLMBeforeQA = new TH1F(Form("NLM_beforeClusterQA %s",GetCutNumber().Data()),"NLM_beforeClusterQA",10,0,10);
-       fHistograms->Add(fHistNLMBeforeQA);
-       fHistNLMAfterQA = new TH1F(Form("NLM_afterClusterQA %s",GetCutNumber().Data()),"NLM_afterClusterQA",10,0,10);
-       fHistograms->Add(fHistNLMAfterQA);
+    //fHistNLMBeforeQA = new TH1F(Form("NLM_beforeClusterQA %s",GetCutNumber().Data()),"NLM_beforeClusterQA",10,0,10);
+    //fHistograms->Add(fHistNLMBeforeQA);
+    //fHistNLMAfterQA = new TH1F(Form("NLM_afterClusterQA %s",GetCutNumber().Data()),"NLM_afterClusterQA",10,0,10);
+    //fHistograms->Add(fHistNLMAfterQA);
+
+    //TrackMatching histograms
+    if(fUseDistTrackToCluster)
+    {
+        fHistClusterRBeforeQA = new TH1F(Form("R_Cluster_beforeClusterQA %s",GetCutNumber().Data()),"R of cluster",200,400,500);
+        fHistograms->Add(fHistClusterRBeforeQA);
+        fHistClusterRAfterQA = new TH1F(Form("R_Cluster_afterClusterQA %s",GetCutNumber().Data()),"R of cluster_matched",200,400,500);
+        fHistograms->Add(fHistClusterRAfterQA);
+        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);
+    }
        
        TH1::AddDirectory(kTRUE);
 }
index 414f677..73b7085 100644 (file)
@@ -160,7 +160,7 @@ class AliCaloPhotonCuts : public AliAnalysisCuts {
                // CutString
                TObjString *fCutString;                                         // cut number used for analysis
                
-               // Histograms
+        // Cluster quality related histograms
                TH1F *fHistCutIndex;                                            // bookkeeping for cuts
                TH1F *fHistAcceptanceCuts;                                      // bookkeeping for acceptance cuts
                TH1F *fHistClusterIdentificationCuts;           // bookkeeping for cluster identification cuts
@@ -168,31 +168,33 @@ class AliCaloPhotonCuts : public AliAnalysisCuts {
                TH2F* fHistClusterEtavsPhiBeforeAcc;            // eta-phi-distribution before acceptance cuts
                TH2F* fHistClusterEtavsPhiAfterAcc;             // eta-phi-distribution of all after acceptance cuts
                TH2F* fHistClusterEtavsPhiAfterQA;                      // eta-phi-distribution of all after cluster quality cuts
-               TH1F* fHistDistanceToBadChannelBeforeAcc;   // distance to bad channel before acceptance cuts
-               TH1F* fHistDistanceToBadChannelAfterAcc;        // distance to bad channel after acceptance cuts
-               TH1F* fHistClusterRBeforeQA;                            // cluster position in R=SQRT(x^2+y^2) (before QA)
+        //TH1F* fHistDistanceToBadChannelBeforeAcc;   // distance to bad channel before acceptance cuts
+        //TH1F* fHistDistanceToBadChannelAfterAcc;     // distance to bad channel after acceptance cuts
+        TH2F* fHistClusterTimevsEBeforeQA;                     // Cluster time vs E before cluster quality cuts
+        TH2F* fHistClusterTimevsEAfterQA;                      // Cluster time vs E after cluster quality cuts
+        //TH2F* fHistExoticCellBeforeQA;                               // Exotic cell: 1-Ecross/E cell vs Ecluster before acceptance cuts
+        //TH2F* fHistExoticCellAfterQA;                                // Exotic cell: 1-Ecross/E cell vs Ecluster after cluster quality cuts
+        //TH1F* fHistNMatchedTracks;                                   // number of matched tracks
+        TH1F* fHistEnergyOfClusterBeforeQA;                    // enery per cluster before acceptance cuts
+        TH1F* fHistEnergyOfClusterAfterQA;                     // enery per cluster after cluster quality cuts
+        TH1F* fHistNCellsBeforeQA;                                     // number of cells per cluster before acceptance cuts
+        TH1F* fHistNCellsAfterQA;                                      // number of cells per cluster after cluster quality cuts
+        TH1F* fHistM02BeforeQA;                                                // M02 before acceptance cuts
+        TH1F* fHistM02AfterQA;                                         // M02 after cluster quality cuts
+        TH1F* fHistM20BeforeQA;                                                // M20 before acceptance cuts
+        TH1F* fHistM20AfterQA;                                         // M20 after cluster quality cuts
+        TH1F* fHistDispersionBeforeQA;                         // dispersion before acceptance cuts
+        TH1F* fHistDispersionAfterQA;                          // dispersion after cluster quality cuts
+        //TH1F* fHistNLMBeforeQA;                                              // number of local maxima in cluster before acceptance cuts
+        //TH1F* fHistNLMAfterQA;                                               // number of local maxima in cluster after cluster quality cuts
+
+        //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* fHistClusterdEtadPhiBeforeQA;                     // 2-dim plot dEta vs. dPhi
                TH2F* fHistClusterdEtadPhiAfterQA;                      // 2-dim plot dEta vs. dPhi for matched tracks (after QA)
-               TH2F* fHistClusterTimevsEBeforeQA;                      // Cluster time vs E before cluster quality cuts
-               TH2F* fHistClusterTimevsEAfterQA;                       // Cluster time vs E after cluster quality cuts
-               TH2F* fHistExoticCellBeforeQA;                          // Exotic cell: 1-Ecross/E cell vs Ecluster before acceptance cuts
-               TH2F* fHistExoticCellAfterQA;                           // Exotic cell: 1-Ecross/E cell vs Ecluster after cluster quality cuts
-               TH1F* fHistNMatchedTracks;                                      // number of matched tracks
-               TH1F* fHistDistanceTrackToClusterBeforeQA;      // distance cluster to track before acceptance cuts
-               TH1F* fHistDistanceTrackToClusterAfterQA;       // distance cluster to track after cluster quality cuts
-               TH1F* fHistEnergyOfClusterBeforeQA;                     // enery per cluster before acceptance cuts
-               TH1F* fHistEnergyOfClusterAfterQA;                      // enery per cluster after cluster quality cuts
-               TH1F* fHistNCellsBeforeQA;                                      // number of cells per cluster before acceptance cuts
-               TH1F* fHistNCellsAfterQA;                                       // number of cells per cluster after cluster quality cuts
-               TH1F* fHistM02BeforeQA;                                         // M02 before acceptance cuts
-               TH1F* fHistM02AfterQA;                                          // M02 after cluster quality cuts
-               TH1F* fHistM20BeforeQA;                                         // M20 before acceptance cuts
-               TH1F* fHistM20AfterQA;                                          // M20 after cluster quality cuts
-               TH1F* fHistDispersionBeforeQA;                          // dispersion before acceptance cuts
-               TH1F* fHistDispersionAfterQA;                           // dispersion after cluster quality cuts
-               TH1F* fHistNLMBeforeQA;                                         // number of local maxima in cluster before acceptance cuts
-               TH1F* fHistNLMAfterQA;                                          // number of local maxima in cluster after cluster quality cuts
+        TH1F* fHistDistanceTrackToClusterBeforeQA;     // distance cluster to track before acceptance cuts
+        TH1F* fHistDistanceTrackToClusterAfterQA;      // distance cluster to track after cluster quality cuts
                                
        private: