]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGJE/EMCALJetTasks/AliEmcalJetTask.h
Add components for event counting and trigger patch analysis
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliEmcalJetTask.h
index 18f8cf691c60f71d064e0259bf393bb2a8b9e136..69b2a58de42fcb8e150a5413d1b793a2b35b218a 100644 (file)
@@ -13,6 +13,7 @@ namespace fastjet {
 #include "AliAnalysisTaskSE.h"
 #include "AliFJWrapper.h"
 #include "AliAODMCParticle.h"
+#include "AliEmcalJet.h"
 
 class AliEmcalJetTask : public AliAnalysisTaskSE {
  public:
@@ -32,7 +33,6 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
     kRX3Jet=1<<10
   };
 
-
   AliEmcalJetTask();
   AliEmcalJetTask(const char *name);
   virtual ~AliEmcalJetTask();
@@ -40,7 +40,7 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
   void                   UserCreateOutputObjects();
   void                   UserExec(Option_t *option);
   void                   Terminate(Option_t *option);
-
   Bool_t                 IsLocked()                       { if(fLocked) {AliFatal("Jet finder task is locked! Changing properties is not allowed."); return kTRUE;} else return kFALSE;};
   void                   SetLocked()                      { fLocked = kTRUE;}
   void                   SelectConstituents(UInt_t constSel, UInt_t MCconstSel)  { fConstSel = constSel; fMCConstSel = MCconstSel; };
@@ -48,6 +48,8 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
   void                   SetClusName(const char *n)       { if(IsLocked()) return; fCaloName      = n     ; }
   void                   SetJetsName(const char *n)       { if(IsLocked()) return; fJetsName      = n     ; }
   void                   SetJetsSubName(const char *n)    { fJetsSubName   = n     ; }
+  void                   SetTracksSubName(const char *n)  { fTracksSubName = n     ; }
+  void                   SetClusSubName(const char *n)    { fClusSubName   = n     ; }
   void                   SetJetType(UInt_t t)             { if(IsLocked()) return; fJetType       = t     ; }
   void                   SetMarkConstituents(UInt_t m)    { if(IsLocked()) return; fMarkConst     = m     ; }
   void                   SetMinJetArea(Double_t a)        { if(IsLocked()) return; fMinJetArea    = a     ; }
@@ -89,12 +91,16 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
                                                                 if (s) fMCFlag |=  AliAODMCParticle::kPhysicalPrim ; 
                                                                 else   fMCFlag &= ~AliAODMCParticle::kPhysicalPrim ; }
 
-  void                   SetCodeDebug(Bool_t val)         { fCodeDebug = val; }
+  void                   SetCodeDebug(Bool_t val)               { fCodeDebug    = val          ; }
+  void                   SetForceIsMcPart(Bool_t b)             { fIsMcPart     = b            ; }
+  void                   SetPionMassForClusters(Bool_t b)       { fPionMassClusters = b        ; }
 
   void                   SetRhoName(const char *n)              { fRhoName      = n            ; }
   void                   SetRhomName(const char *n)             { fRhomName     = n            ; }
-  void                   SetGenericSubtraction(Bool_t b)        { fDoGenericSubtraction     = b; }
+  void                   SetGenericSubtractionJetMass(Bool_t b) { fDoGenericSubtractionJetMass = b; }
+  void                   SetGenericSubtractionGR(Bool_t b, Double_t rmax = 2., Double_t dr = 0.04, Double_t ptmin = 0.) { fDoGenericSubtractionGR = b; fRMax=rmax; fDRStep=dr; fPtMinGR=ptmin;}
   void                   SetConstituentSubtraction(Bool_t b)    { fDoConstituentSubtraction = b; }
+  void                   SetGenericSubtractionExtraJetShapes(Bool_t b)            { fDoGenericSubtractionExtraJetShapes =b;}
   void                   SetUseExternalBkg(Bool_t b, Double_t rho, Double_t rhom) { fUseExternalBkg = b; fRho = rho; fRhom = rhom;}
 
   UInt_t                 GetJetType()                     { return fJetType; }
@@ -134,10 +140,15 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
   Bool_t                 DoInit();
   Bool_t                 GetSortedArray(Int_t indexes[], std::vector<fastjet::PseudoJet> array) const;
 
+   void                   FillJetConstituents(std::vector<fastjet::PseudoJet>& constituents,AliEmcalJet *jet,Double_t vertex[3],UInt_t jetCount,Int_t& nt,Int_t& nc,Double_t& maxCh,Double_t& maxNe,Int_t& ncharged,Int_t& nneutral,Double_t& neutralE,Double_t& mcpt,Int_t& cemc,Double_t& emcpt,Int_t& gall,Int_t& gemc,std::vector<fastjet::PseudoJet>& constituentsunsub,Int_t flag); 
+  Int_t                  GetIndexSub(Double_t phisub,std::vector<fastjet::PseudoJet>& constituentsunsub);
+
   TString                fTracksName;             // name of track collection
   TString                fCaloName;               // name of calo cluster collection
   TString                fJetsName;               // name of jet collection
   TString                fJetsSubName;            // name of subtracted jet collection
+  TString                fTracksSubName;          // name of subtracted track collection
+  TString                fClusSubName;            // name of subtracted clusters collection
   UInt_t                 fJetType;                // jet type (algorithm, radius, constituents)
   UInt_t                 fConstSel;               // select constituents from a previous jet finding
   UInt_t                 fMCConstSel;             // select MC constituents (label!=0) from a previous jet finding
@@ -166,19 +177,29 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
   Bool_t                 fIsPSelSet;              //!=true if physics selection was set
   Bool_t                 fIsMcPart;               //!=true if MC particles are given as input
   Bool_t                 fIsEmcPart;              //!=true if emcal particles are given as input (for clusters)
+  Bool_t                 fIsPicoTrack;            //!=true if pico tracks are given as input
+  Bool_t                 fIsEsdClus;              //!=true if AliESDCaloCluster is given as input
   Bool_t                 fLegacyMode;             //! if true, enable FJ 2.x behavior
   Bool_t                 fCodeDebug;              // use nontested code changes 
-
-  Bool_t                 fDoGenericSubtraction;   // calculate generic subtraction
-  Bool_t                 fDoConstituentSubtraction; // calculate constituent subtraction
-  Bool_t                 fUseExternalBkg;         // use external background for generic subtractor
-  TString                fRhoName;                // name of rho
-  TString                fRhomName;               // name of rhom
-  Double_t               fRho;                    // pT background density
-  Double_t               fRhom;                   // mT background density
+  Bool_t                 fPionMassClusters;       // assume pion mass for clusters
+  Bool_t                 fDoGenericSubtractionJetMass;        // calculate generic subtraction
+  Bool_t                 fDoGenericSubtractionGR;             // calculate generic subtraction for angular structure function GR
+  Bool_t                 fDoGenericSubtractionExtraJetShapes; // calculate generic subtraction for other jet shapes like radialmoment,pTD etc
+  Bool_t                 fDoConstituentSubtraction;           // calculate constituent subtraction
+  Bool_t                 fUseExternalBkg;                     // use external background for generic subtractor
+  TString                fRhoName;                            // name of rho
+  TString                fRhomName;                           // name of rhom
+  Double_t               fRho;                                // pT background density
+  Double_t               fRhom;                               // mT background density
+  Double_t               fRMax;                               // R max for GR calculation
+  Double_t               fDRStep;                             // step width for GR calculation
+  Double_t               fPtMinGR;                            // min pT for GR calculation
 
   TClonesArray          *fJets;                   //!jet collection
   TClonesArray          *fJetsSub;                //!subtracted jet collection
+  TClonesArray          *fTracksSub;              //!subtracted track collection
+  TClonesArray          *fClusSub;                //!subtracted cluster collection
   AliVEvent             *fEvent;                  //!current event
   TClonesArray          *fTracks;                 //!tracks collection
   TClonesArray          *fClus;                   //!cluster collection
@@ -189,6 +210,6 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
   AliEmcalJetTask(const AliEmcalJetTask&);            // not implemented
   AliEmcalJetTask &operator=(const AliEmcalJetTask&); // not implemented
 
-  ClassDef(AliEmcalJetTask, 14) // Jet producing task
+  ClassDef(AliEmcalJetTask, 17) // Jet producing task
 };
 #endif