]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG/EMCAL/AliAnalysisTaskEmcalDev.h
From Salvatore and Marta:
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliAnalysisTaskEmcalDev.h
index 57472b13cf671bf766162b2bcb6b842268e4037e..0abd1dd443d0a1c523527114be5e2c2918acc8b4 100644 (file)
@@ -12,10 +12,13 @@ class AliVCluster;
 class AliVTrack;
 class AliVParticle;
 class AliVCaloCells;
-class TH1F;
+class TH1;
+class TProfile;
 class AliEMCALGeometry;
 class AliParticleContainer;
 class AliClusterContainer;
+class AliGenPythiaEventHeader;
+class AliVCaloTrigger;
 
 #include "Rtypes.h"
 
@@ -23,12 +26,6 @@ class AliClusterContainer;
 
 class AliAnalysisTaskEmcalDev : public AliAnalysisTaskSE {
  public:
-  
-  enum EmcalAnaType {
-    kTPC       = 0,     // TPC acceptance
-    kEMCAL     = 1,     // EMCal acceptance
-    kUser      = 2,     // User defined acceptance
-  };
 
   enum BeamType {
     kNA       = -1,
@@ -43,12 +40,13 @@ class AliAnalysisTaskEmcalDev : public AliAnalysisTaskSE {
 
   void                        UserExec(Option_t *option);
   void                        UserCreateOutputObjects();
+  Bool_t                      UserNotify();
 
-  void                        SetAnaType(EmcalAnaType type)                         { fAnaType           = type                           ; }
   void                        SetNCentBins(Int_t n)                                 { fNcentBins         = n                              ; }  
   void                        SetCentRange(Double_t min, Double_t max)              { fMinCent           = min  ; fMaxCent = max          ; }
-  void                        SetClusName(const char *n)                            { fCaloName          = n    ; AddClusterContainer(n);   }
+  void                        SetClusName(const char *n)                            { AddClusterContainer(n)                              ; }
   void                        SetCaloCellsName(const char *n)                       { fCaloCellsName     = n                              ; }
+  void                        SetCaloTriggersName(const char *n)                    { fCaloTriggersName  = n                              ; }
   void                        SetClusPtCut(Double_t cut)                            { fClusPtCut         = cut                            ; }
   void                        SetClusTimeCut(Double_t min, Double_t max)            { fClusTimeCutLow    = min  ; fClusTimeCutUp = max    ; }
   void                        SetHistoBins(Int_t nbins, Double_t min, Double_t max) { fNbins = nbins; fMinBinPt = min; fMaxBinPt = max    ; }
@@ -57,7 +55,7 @@ class AliAnalysisTaskEmcalDev : public AliAnalysisTaskSE {
   void                        SetTrackPtCut(Double_t cut)                           { fTrackPtCut        = cut                            ; }
   void                        SetTrackEtaLimits(Double_t min, Double_t max)         { fTrackMaxEta       = max  ; fTrackMinEta      = min ; }
   void                        SetTrackPhiLimits(Double_t min, Double_t max)         { fTrackMaxPhi       = max  ; fTrackMinPhi      = min ; }
-  void                        SetTracksName(const char *n)                          { fTracksName        = n    ; AddParticleContainer(n);  }
+  void                        SetTracksName(const char *n)                          { AddParticleContainer(n)                             ; }
   void                        SetTrigClass(const char *n)                           { fTrigClass         = n                              ; }  
   void                        SetVzRange(Double_t min, Double_t max)                { fMinVz             = min  ; fMaxVz   = max          ; }
   void                        SetForceBeamType(BeamType f)                          { fForceBeamType     = f                              ; }
@@ -72,16 +70,19 @@ class AliAnalysisTaskEmcalDev : public AliAnalysisTaskSE {
   void                        SetMCClusterBitMap(UInt_t m)                          { fMCClusterBitMap   = m                              ; }
   void                        SetMCParticleBitMap(UInt_t m)                         { fMCClusterBitMap   = m    ; fMCTrackBitMap     = m  ; }
   void                        SetMinMCLabel(Int_t s)                                { fMinMCLabel        = s                              ; }
+  void                        SetIsEmbedded(Bool_t i)                               { fIsEmbedded        = i                              ; }
+  void                        SetIsPythia(Bool_t i)                                 { fIsPythia          = i                              ; }
+  void                        SetMCLabelShift(Int_t s)                              { fMCLabelShift      = s                              ; }
 
-  void                        AddParticleContainer(const char *n);
-  void                        AddClusterContainer(const char *n);
-
-
-  AliParticleContainer       *GetParticleContainer(const Int_t i=0)   const;
-  AliClusterContainer        *GetClusterContainer(const Int_t i=0)    const;
+  AliParticleContainer       *AddParticleContainer(const char *n);
+  AliClusterContainer        *AddClusterContainer(const char *n);
   void                        RemoveParticleContainer(Int_t i=0)                      { fParticleCollArray.RemoveAt(i);} 
   void                        RemoveClusterContainer(Int_t i=0)                       { fClusterCollArray.RemoveAt(i);} 
 
+  AliParticleContainer       *GetParticleContainer(const Int_t i=0)   const;
+  AliClusterContainer        *GetClusterContainer(const Int_t i=0)    const;
+  AliParticleContainer       *GetParticleContainer(const char* name)  const;
+  AliClusterContainer        *GetClusterContainer(const char* name)   const;
 
   TClonesArray               *GetParticleArray(const Int_t i=0)       const;
   TClonesArray               *GetClusterArray(const Int_t i=0)        const;
@@ -104,15 +105,14 @@ class AliAnalysisTaskEmcalDev : public AliAnalysisTaskSE {
   virtual Bool_t              IsEventSelected();
   virtual Bool_t              RetrieveEventObjects();
   virtual Bool_t              Run()                                                { return kTRUE                 ; }
+  Bool_t                      PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard);
 
-  EmcalAnaType                fAnaType;                    // analysis type
   BeamType                    fForceBeamType;              // forced beam type
   Bool_t                      fGeneralHistograms;          // whether or not it should fill some general histograms
   Bool_t                      fInitialized;                // whether or not the task has been already initialized
   Bool_t                      fCreateHisto;                // whether or not create histograms
-  TString                     fTracksName;                 // name of track collection
-  TString                     fCaloName;                   // name of calo cluster collection
   TString                     fCaloCellsName;              // name of calo cell collection
+  TString                     fCaloTriggersName;           // name of calo triggers collection
   Double_t                    fMinCent;                    // min centrality for event selection
   Double_t                    fMaxCent;                    // max centrality for event selection
   Double_t                    fMinVz;                      // min vertex for event selection
@@ -139,12 +139,17 @@ class AliAnalysisTaskEmcalDev : public AliAnalysisTaskSE {
   UInt_t                      fClusterBitMap;              // bit map of accepted clusters (non MC)
   UInt_t                      fMCTrackBitMap;              // bit map of accepted MC tracks
   UInt_t                      fMCClusterBitMap;            // bit map of accepted MC clusters
+  Bool_t                      fIsEmbedded;                 // trigger, embedded signal
+  Bool_t                      fIsPythia;                   // trigger, if it is a PYTHIA production
+  Int_t                       fSelectPtHardBin;            // select one pt hard bin for analysis
   Int_t                       fMinMCLabel;                 // minimum MC label value for the tracks/clusters being considered MC particles
+  Int_t                       fMCLabelShift;               // if MC label > fMCLabelShift, MC label -= fMCLabelShift
   Int_t                       fNcentBins;                  //!how many centrality bins
   AliEMCALGeometry           *fGeom;                       //!emcal geometry
   TClonesArray               *fTracks;                     //!tracks
   TClonesArray               *fCaloClusters;               //!clusters
   AliVCaloCells              *fCaloCells;                  //!cells
+  AliVCaloTrigger            *fCaloTriggers;               //!calo triggers
   Double_t                    fCent;                       //!event centrality
   Int_t                       fCentBin;                    //!event centrality bin
   Double_t                    fEPV0;                       //!event plane V0
@@ -154,19 +159,35 @@ class AliAnalysisTaskEmcalDev : public AliAnalysisTaskSE {
   Int_t                       fNVertCont;                  //!event vertex number of contributors
   BeamType                    fBeamType;                   //!event beam type
 
+  // PYTHIA
+  AliGenPythiaEventHeader    *fPythiaHeader;               //!event Pythia header
+  Double_t                    fPtHard;                     //!event pt hard
+  Int_t                       fPtHardBin;                  //!event pt hard bin
+  Int_t                       fNTrials;                    //!event trials
+
   TObjArray                   fParticleCollArray;          // particle/track collection array
   TObjArray                   fClusterCollArray;           // cluster collection array
 
+  // Histograms
   TList                      *fOutput;                     //!output list
 
-  TH1F                       *fHistCentrality;             //!Event centrality distribution
-  TH1F                       *fHistZVertex;                //!Z vertex position
-  TH1F                       *fHistEventPlane;             //!Event plane distribution
+  // PYTHIA
+  TH1                        *fHistTrialsAfterSel;         //!total number of trials per pt hard bin after selection
+  TH1                        *fHistEventsAfterSel;         //!total number of events per pt hard bin after selection
+  TH1                        *fHistTrials;                 //!trials from pyxsec.root
+  TProfile                   *fHistXsection;               //!x section from pyxsec.root
+  TH1                        *fHistEvents;                 //!total number of events per pt hard bin
+  TH1                        *fHistPtHard;                 //!pt hard distribution
+
+  // General histograms
+  TH1                        *fHistCentrality;             //!Event centrality distribution
+  TH1                        *fHistZVertex;                //!Z vertex position
+  TH1                        *fHistEventPlane;             //!Event plane distribution
 
  private:
   AliAnalysisTaskEmcalDev(const AliAnalysisTaskEmcalDev&);            // not implemented
   AliAnalysisTaskEmcalDev &operator=(const AliAnalysisTaskEmcalDev&); // not implemented
 
-  ClassDef(AliAnalysisTaskEmcalDev, 1) // EMCAL base analysis task
+  ClassDef(AliAnalysisTaskEmcalDev, 2) // EMCAL base analysis task
 };
 #endif