]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.h
- added new task for pi0 reconstruction using purely calorimeter clusters
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnalysisTaskGammaConvCalo.h
index 5e4e01786cfbaf001790dadc5a14294fe3d0c868..c3c13d76d9217fa890976d53a145827333bd3ce9 100644 (file)
@@ -8,6 +8,8 @@
 #include "AliGammaConversionAODBGHandler.h"
 #include "AliConversionAODBGHandlerRP.h"
 #include "AliCaloPhotonCuts.h"
+#include "AliConvEventCuts.h"
+#include "AliConversionPhotonCuts.h"
 #include "AliConversionMesonCuts.h"
 #include "AliAnalysisManager.h"
 #include "TProfile2D.h"
@@ -44,16 +46,24 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                void RelabelAODPhotonCandidates(Bool_t mode);
                void ProcessTruePhotonCandidates( AliAODConversionPhoton* TruePhotonCandidate);
                void ProcessTrueClusterCandidates( AliAODConversionPhoton* TruePhotonCandidate);
+               void ProcessTrueClusterCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate);
                void ProcessTruePhotonCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate);
-               void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
-               void ProcessTrueMesonCandidatesAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
+               void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1, Bool_t matched);
+               void ProcessTrueMesonCandidatesAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1, Bool_t matched);
                
                // switches for additional analysis streams or outputs
                void SetDoMesonAnalysis(Bool_t flag){fDoMesonAnalysis = flag;}
                void SetDoMesonQA(Int_t flag){fDoMesonQA = flag;}
                void SetDoPhotonQA(Int_t flag){fDoPhotonQA = flag;}
+               void SetDoClusterQA(Int_t flag){fDoClusterQA = flag;}
                
            // Setting the cut lists for the conversion photons
+               void SetEventCutList(Int_t nCuts, TList *CutArray){
+                       fnCuts = nCuts;
+                       fEventCutArray = CutArray;
+               }
+
+               // Setting the cut lists for the conversion photons
                void SetConversionCutList(Int_t nCuts, TList *CutArray){
                        fnCuts = nCuts;
                        fCutArray = CutArray;
@@ -71,10 +81,6 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                        fMesonCutArray = CutArray;
                }
 
-               // emcal functions
-               Double_t GetMaxCellEnergy(const AliVCluster *c) const { Short_t id=-1; return GetMaxCellEnergy(c,id); }
-               Double_t GetMaxCellEnergy(const AliVCluster *c, Short_t &id) const;
-
                // BG HandlerSettings
                void CalculateBackground();
                void CalculateBackgroundRP();
@@ -118,8 +124,10 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                TClonesArray                                            *fReaderGammas;                                         // Array with conversion photons selected by V0Reader Cut
                TList                                                           *fGammaCandidates;                                      // current list of photon candidates
                TList                                                           *fClusterCandidates;                            //! current list of cluster candidates
+               TList                                                           *fEventCutArray;                                        // List with Event Cuts
+               AliConvEventCuts                                        *fEventCuts;                                            // EventCutObject
                TList                                                           *fCutArray;                                                     // List with Conversion Cuts
-               AliConversionCuts                                       *fConversionCuts;                                       // ConversionCutObject
+               AliConversionPhotonCuts                         *fConversionCuts;                                       // ConversionCutObject
                TList                                                           *fClusterCutArray;                                      // List with Cluster Cuts
                AliCaloPhotonCuts                                       *fCaloPhotonCuts;                                       // CaloPhotonCutObject
                TList                                                           *fMesonCutArray;                                        // List with Meson Cuts
@@ -145,6 +153,7 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                                                                                        // 6: primary gamma
                //histograms for mesons reconstructed quantities
                TH2F                                                            **fHistoMotherInvMassPt;                        //! array of histogram with signal + BG for same event photon pairs, inv Mass, pt
+               TH2F                                                            **fHistoMotherMatchedInvMassPt;         //! array of histogram with signal + BG for same event photon pairs, inv Mass, pt
                THnSparseF                                                      **fSparseMotherInvMassPtZM;                     //! array of THnSparseF with signal + BG for same event photon pairs, inv Mass, pt
                TH2F                                                            **fHistoMotherBackInvMassPt;            //! array of histogram with BG for mixed event photon pairs, inv Mass, pt
                THnSparseF                                                      **fSparseMotherBackInvMassPtZM;         //! array of THnSparseF with BG for same event photon pairs, inv Mass, pt
@@ -155,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                                                            **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 
@@ -183,6 +194,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
@@ -210,6 +222,16 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                TH1F                                                            **fHistoMCSecEtaSource;                         //! array of histos with secondary eta, source
                // MC validated reconstructed quantities mesons
                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
+               TH2F                                                            **fHistoTrueMotherCaloMergedClusterPartConvInvMassPt; //! array of histos with validated mothers, merged cluster part conv, invMass, pt
                TH2F                                                            **fHistoTruePrimaryMotherInvMassPt;                             //! array of histos with validated weighted primary mothers, invMass, pt
                TH2F                                                            **fHistoTruePrimaryMotherW0WeightingInvMassPt;  //! array of histos with validated unweighted primary mothers, invMass, pt
                TProfile2D                                                      **fProfileTruePrimaryMotherWeightsInvMassPt;    //! array of profiles with weights for validated primary mothers, invMass, pt   
@@ -223,14 +245,13 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                TH2F                                                            **fHistoTrueSecondaryMotherFromLambdaInvMassPt; //! array of histos with validated secondary mothers from Lambda, invMass, pt
                TH1F                                                            **fHistoTrueLambdaWithPi0DaughterMCPt;                  //! array of histos with lambda with reconstructed pi0 as daughter, pt
                TH2F                                                            **fHistoTrueBckGGInvMassPt;                                             //! array of histos with pure gamma gamma combinatorial BG, invMass, pt
-               TH2F                                                            **fHistoTrueBckContInvMassPt;                                   //! array of histos with        contamination BG, invMass, pt
-               TH2F                                                            **fHistoTruePi0PtY;                                                             //! array of histos with        validated pi0, pt, Y
+               TH2F                                                            **fHistoTrueBckContInvMassPt;                                   //! array of histos with contamination BG, invMass, pt
+               TH2F                                                            **fHistoTruePi0PtY;                                                             //! array of histos with validated pi0, pt, Y
                TH2F                                                            **fHistoTrueEtaPtY;                                                             //! array of histos with validated eta, pt, Y
                TH2F                                                            **fHistoTruePi0PtAlpha;                                                 //! array of histos with validated pi0, pt, alpha
                TH2F                                                            **fHistoTrueEtaPtAlpha;                                                 //! array of histos with validated eta, pt, alpha
                TH2F                                                            **fHistoTruePi0PtOpenAngle;                                             //! array of histos with validated pi0, pt, openAngle
                TH2F                                                            **fHistoTrueEtaPtOpenAngle;                                             //! array of histos with validated eta, pt, openAngle
-               TH2F                                                            **fHistoTrueMotherDalitzInvMassPt;                              //! array of histos with validated mother, but Dalitz decay, invMass, pt
                // MC validated reconstructed quantities photons
                TH1F                                                            **fHistoTrueConvGammaPt;                                                //! array of histos with validated conversion photon, pt
                TH1F                                                            **fHistoTrueConvPi0GammaPt;                                             //! array of histos with validated conversion photon from pi0, pt
@@ -241,11 +262,25 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                TH1F                                                            **fHistoTrueSecondaryConvGammaPt;                               //! array of histos with validated secondary conversion photon, pt  
                TH1F                                                            **fHistoTrueSecondaryConvGammaFromXFromK0sPt;   //! array of histos with validated secondary conversion photon from K0s, pt  
                TH1F                                                            **fHistoTrueSecondaryConvGammaFromXFromLambdaPt;//! array of histos with validated secondary conversion photon from Lambda, pt  
-               TH2F                                                            **fHistoTrueDalitzPsiPairDeltaPhi;                              //! array of histos with validated dalitz virtual photon, delta phi, psi pair  
-               TH2F                                                            **fHistoTrueGammaPsiPairDeltaPhi;                               //! array of histos with validated conversion photon, delta phi, psi pair
-               TH1F                                                            ** fHistoTrueClusGammaPt;                                               //! array of histos with validated cluster, pt
-               TH1F                                                            ** fHistoTruePrimaryClusGammaPt;                                //! array of histos with validated primary cluster, pt
-               TH2F                                                            ** fHistoTruePrimaryClusGammaESDPtMCPt;                 //! array of histos with validated primary cluster, rec Pt, MC 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
+               TH1F                                                            **fHistoTrueClusDalitzPt;                                               //! array of histos with validated Dalitz decay, pt
+               TH1F                                                            **fHistoTrueClusDalitzMergedPt;                                 //! array of histos with validated Dalitz decay, more than one decay product in cluster, pt
+               TH1F                                                            **fHistoTrueClusPhotonFromElecMotherPt;                 //! array of histos with validated photon from electron, pt
+               TH1F                                                            **fHistoTrueClusShowerPt;                                               //! array of histos with validated shower, pt
+        TH1F                                **fHistoTrueClusSubLeadingPt;                   //! array of histos with pi0/eta/eta_prime in subleading contribution
+        TH1I                                **fHistoTrueClusNParticles;                     //! array of histos with number of different particles (pi0/eta/eta_prime) contributing to cluster
+               TH1F                                                            **fHistoTrueClusEMNonLeadingPt;                                 //! array of histos with cluster with largest energy by hadron
+               TH1F                                                            **fHistoTrueNLabelsInClus;                                              //! array of histos with number of labels in cluster 
+               TH1F                                                            **fHistoTruePrimaryClusGammaPt;                                 //! array of histos with validated primary cluster, pt
+               TH2F                                                            **fHistoTruePrimaryClusGammaESDPtMCPt;                  //! array of histos with validated primary cluster, rec Pt, MC pt
 
                // event histograms
                TH1I                                                            **fHistoNEvents;                                                                //! array of histos with event information
@@ -274,27 +309,15 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                Bool_t                                                          fDoMesonAnalysis;                                       // flag for meson analysis
                Int_t                                                           fDoMesonQA;                                                     // flag for meson QA
                Int_t                                                           fDoPhotonQA;                                            // flag for photon QA
+               Int_t                                                           fDoClusterQA;                                           // flag for cluster QA
                Bool_t                                                          fIsFromMBHeader;                                        // flag for MC headers
                Bool_t                                                          fIsMC;                                                          // flag for MC information
 
-
-               // cluster cut variables
-               Double_t                                                        fMinE;
-               Int_t                                                           fNminCells;
-               Double_t                                                        fEMCm02cut;
-               //double                                                        fMinErat = 0;
-               //double                                                        fMinEcc = 0;
-
-               
-               //  TString                                                      fClusName;                                                     // cluster branch name (def="")
-               //  const TObjArray                                     *fRecPoints;                                            // pointer to rec points (AliAnalysisTaskEMCALClusterizeFast)
-               //  const TClonesArray                          *fDigits;                                                       // pointer to digits     (AliAnalysisTaskEMCALClusterizeFast)
-
        private:
                AliAnalysisTaskGammaConvCalo(const AliAnalysisTaskGammaConvCalo&); // Prevent copy-construction
                AliAnalysisTaskGammaConvCalo &operator=(const AliAnalysisTaskGammaConvCalo&); // Prevent assignment
 
-               ClassDef(AliAnalysisTaskGammaConvCalo, 1);
+               ClassDef(AliAnalysisTaskGammaConvCalo, 3);
 };
 
 #endif