]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.h
including an old fix for EMCal matrices not applied to this code
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / AliAnalysisTaskEMCALIsoPhoton.h
index 8e13312fc5122498e4bac3057c0a89847d5a648a..9d5e604216351a50c330d377d599ce0c1d010838 100644 (file)
@@ -5,13 +5,23 @@
 
 class TH1F;
 class TH2F;
+class TH3F;
+class THnSparse;
+class TList;
 class TObjArray;
 class AliEMCALGeometry;
+class AliOADBContainer;
 class AliESDCaloCells;
 class AliESDEvent;
 class AliESDtrack;
 class AliESDtrackCuts;
+class AliAODEvent;
+class AliAODCaloCells;
 class AliVCluster;
+class AliMCEvent;
+class AliStack;
+class TParticle;
+class TGeoHMatrix;
 
 #include "AliAnalysisTaskSE.h"
 
@@ -25,11 +35,16 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   void                   UserExec(Option_t *option);
   void                   Terminate(Option_t *);
 
-  void                   GetCeIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core);
+  void                   GetCeIso(TVector3 vec, Int_t maxid, Float_t &iso, Float_t &phiband, Float_t &core);
   Double_t               GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax);
   Double_t               GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const; 
   void                   GetTrIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core);
   void                   FillClusHists();
+  void                   FillMcHists();
+  Float_t                GetClusSource(const AliVCluster *cluster);
+  void                   FollowGamma();
+  void                   GetDaughtersInfo(int firstd, int lastd, int selfid, const char *indputindent);
+  Float_t                GetMcPtSumInCone(Float_t etaclus, Float_t phiclus, Float_t R);
   void                   SetExotCut(Double_t c)                 { fExoticCut          = c;       }
   void                   SetGeoName(const char *n)              { fGeoName            = n;       }
   void                   SetIsoConeR(Double_t r)                { fIsoConeR           = r;       }
@@ -37,56 +52,74 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   void                   SetTriggerBit(const char *tb)          { fTrigBit            = tb;      }
   void                   SetPrimTrackCuts(AliESDtrackCuts *c)   { fPrTrCuts           = c;       }
   void                   SetTrainMode(Bool_t t)                 { fIsTrain            = t;       }
+  void                   SetMcMode(Bool_t mc)                   { fIsMc               = mc;      }
+  void                   SetDebugOn(Bool_t d)                   { fDebug              = d;       }
+  void                   SetPathStringSelect(char *p)           { fPathStrOpt         = p;       }
+  void                   SetEtCut(Double_t ec)                  { fECut               = ec;      }
+  void                   SetImportGeometryFromFile(Bool_t  im, 
+                                           TString pa = "")     { fImportGeometryFromFile = im ; 
+                                                                  fImportGeometryFilePath = pa ; }    
   
  protected:
-  TRefArray             *fCaloClusters;          //!pointer to EMCal clusters
+  TObjArray             *fESDClusters;           //!pointer to EMCal clusters
+  TObjArray             *fAODClusters;           //!pointer to EMCal clusters
   TObjArray             *fSelPrimTracks;         //!pointer to ESD primary tracks
-  AliESDCaloCells       *fEMCalCells;            //!pointer to EMCal cells
-  AliESDtrackCuts       *fPrTrCuts;              //!pointer to hold the prim track cuts
+  TClonesArray          *fTracks;                //!track input array
+  AliESDCaloCells       *fESDCells;              //!pointer to EMCal cells, esd
+  AliAODCaloCells       *fAODCells;              //!pointer to EMCal cells, aod  
+  AliESDtrackCuts       *fPrTrCuts;              //pointer to hold the prim track cuts
   AliEMCALGeometry      *fGeom;                  // geometry utils
   TString                fGeoName;               // geometry name (def = EMCAL_FIRSTYEARV1)
+  AliOADBContainer      *fOADBContainer;         //!OADB container used to load misalignment matrices
   TString                fPeriod;                // string to the LHC period
   TString                fTrigBit;               // string to the trigger bit name
   Bool_t                 fIsTrain;               // variable to set train mode
+  Bool_t                 fIsMc;                  // variable to set mc mode
+  Bool_t                 fDebug;                 // variable to set on/off debugging printouts
+  TString                fPathStrOpt;            // variable to set the name of files to be analyzed (MC only)
   Double_t               fExoticCut;             // variable to set the cut on exotic clusters
   Double_t               fIsoConeR;              // variable to set the isolation cone radius
+  Int_t                  fNDimensions;           // variable to set the number of dimensions of n-sparse
+  Double_t               fECut;                  // variable to set the minimum E of a cluster
+  Int_t                  fTrackMult;             // global variable with the event multiplicity        
+  TString                fMcIdFamily;            // string that holds the ids of all particles originated from the prompt photon
+  Int_t                  fNClusForDirPho;        // number of clusters from prompt photon per event
+  Float_t                fDirPhoPt;              // prompt photon pt (assumes only one per event)
+  Float_t                fHigherPtCone;          // higher pt inside the cone around the candidate
+  Bool_t                 fImportGeometryFromFile;  // Import geometry settings in geometry.root file
+  TString                fImportGeometryFilePath;  // path fo geometry.root file
+
   
  private:
   AliESDEvent *fESD;      //! ESD object
+  AliAODEvent *fAOD;      //! AOD object
+  AliMCEvent  *fMCEvent;  //! MC event object
+  AliStack    *fStack;    //!MC particles stack object
+  TGeoHMatrix *fGeomMatrix[12];//! Geometry misalignment matrices for EMCal
   TList       *fOutputList; //! Output list
   //histograms for events with 1+ track pt>1
-  TH1F        *fEvtSel;                  //!evt selection counter: 0=all trg, 1=pv cut 
-  TH1F        *fPVtxZ;                   //!primary vertex Z before cut
-  TH2F        *fCellAbsIdVsAmpl;         //!cell abs id vs cell amplitude (energy)
-  TH2F        *fNClusHighClusE;          //!total number of clusters vs. highest clus energy in the event
-  TH2F        *fM02Et;                   //!M02 vs Et for all clusters
-  TH2F        *fM02EtTM;                 //!M02 vs Et for clusters with track-match (dEta=0.01 && dPhi=0.025)
-  TH2F        *fM02EtCeIso1;             //!M02 vs Et for clusters with isolation neutral Et<1GeV
-  TH2F        *fM02EtCeIso2;             //!M02 vs Et for clusters with isolation neutral Et<2GeV
-  TH2F        *fM02EtCeIso5;             //!M02 vs Et for clusters with isolation neutral Et<5GeV
-  TH2F        *fM02EtTrIso1;             //!M02 vs Et for clusters with isolation charged Et<1GeV
-  TH2F        *fM02EtTrIso2;             //!M02 vs Et for clusters with isolation charged Et<2GeV
-  TH2F        *fM02EtTrIso5;             //!M02 vs Et for clusters with isolation charged Et<5GeV
-  TH2F        *fM02EtAllIso1;            //!M02 vs Et for clusters with isolation total Et<1GeV
-  TH2F        *fM02EtAllIso2;            //!M02 vs Et for clusters with isolation total Et<2GeV
-  TH2F        *fM02EtAllIso5;            //!M02 vs Et for clusters with isolation total Et<5GeV
-  TH2F        *fCeIsoVsEtPho;            //!Neutral isolation Et vs. cluster Et, 0.05<M02<0.30
-  TH2F        *fTrIsoVsEtPho;            //!Charged isolation Et vs. cluster Et, 0.05<M02<0.30
-  TH2F        *fAllIsoVsEtPho;           //!Total isolation Et vs. cluster Et, 0.05<M02<0.30
-  //track matched stuff
-  TH2F        *fM02EtCeIso1TM;           //!Track-matched M02 vs Et for clusters with isolation neutral Et<1GeV
-  TH2F        *fM02EtCeIso2TM;           //!Track-matched M02 vs Et for clusters with isolation neutral Et<2GeV
-  TH2F        *fM02EtCeIso5TM;           //!Track-matched M02 vs Et for clusters with isolation neutral Et<5GeV
-  TH2F        *fM02EtTrIso1TM;           //!Track-matched M02 vs Et for clusters with isolation charged Et<1GeV
-  TH2F        *fM02EtTrIso2TM;           //!Track-matched M02 vs Et for clusters with isolation charged Et<2GeV
-  TH2F        *fM02EtTrIso5TM;           //!Track-matched M02 vs Et for clusters with isolation charged Et<5GeV
-  TH2F        *fM02EtAllIso1TM;          //!Track-matched M02 vs Et for clusters with isolation total Et<1GeV
-  TH2F        *fM02EtAllIso2TM;          //!Track-matched M02 vs Et for clusters with isolation total Et<2GeV
-  TH2F        *fM02EtAllIso5TM;          //!Track-matched M02 vs Et for clusters with isolation total Et<5GeV
-  TH2F        *fCeIsoVsEtPhoTM;          //!Track-matched Neutral isolation Et vs. cluster Et, 0.05<M02<0.30
-  TH2F        *fTrIsoVsEtPhoTM;          //!Track-matched Charged isolation Et vs. cluster Et, 0.05<M02<0.30
-  TH2F        *fAllIsoVsEtPhoTM;         //!Track-matched Total isolation Et vs. cluster Et, 0.05<M02<0.30
-   
+  TH1F        *fEvtSel;                    //!evt selection counter: 0=all trg, 1=pv cut 
+  TH1F        *fNClusEt10;                 //!number of clusters w/ Et>10 in the event
+  TH1F        *fRecoPV;                    //!histogram to record if an event has a prim. vert.
+  TH1F        *fPVtxZ;                     //!primary vertex Z before cut
+  TH1F        *fTrMultDist;                //!track multiplicity distribution
+  TH3F        *fMCDirPhotonPtEtaPhi;       //!direct produced photon pt
+  TH1F        *fDecayPhotonPtMC;           //!decay photon pt
+  TH2F        *fCellAbsIdVsAmpl;           //!cell abs id vs cell amplitude (energy)
+  TH2F        *fNClusHighClusE;            //!total number of clusters vs. highest clus energy in the event
+  TH2F        *fHigherPtConeM02;           //!M02 vs. the higher pt of a track inside the cone
+  TH2F        *fClusEtMcPt;                //!cluster et x mc-pt
+  TH2F        *fClusMcDetaDphi;            //!delta-eta x delta-phi(reco-mc)
+  TH2F        *fNClusPerPho;               //!delta-eta x delta-phi(reco-mc)
+  TH2F        *fMcPtInConeBG;              //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in BG template
+  TH2F        *fMcPtInConeSBG;             //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in SBG range
+  TH2F        *fMcPtInConeBGnoUE;          //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in BG template no UE sub
+  TH2F        *fMcPtInConeSBGnoUE;         //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in SBG range no UE sub
+  TH2F        *fAllIsoEtMcGamma;           //!all iso distribution vs. Et clus for clusters comming from a MC prompt photon
+  TH2F        *fAllIsoNoUeEtMcGamma;       //!all iso distribution (without UE subtraction) vs. Et clus for clusters comming from a MC prompt photon
+  TH3F        *fMCDirPhotonPtEtaPhiNoClus; //!pt x eta x phi for prompt photons that didn't produce clusters
+  THnSparse   *fHnOutput;                  //!Output matrix with 7 dimensions
+
   AliAnalysisTaskEMCALIsoPhoton(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented
   AliAnalysisTaskEMCALIsoPhoton& operator=(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented