]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Configurable when to add internally
authorcholm <Christian.Holm.Christensen@cern.ch>
Thu, 2 Oct 2014 11:06:15 +0000 (13:06 +0200)
committercholm <Christian.Holm.Christensen@cern.ch>
Thu, 2 Oct 2014 11:06:15 +0000 (13:06 +0200)
PWGLF/FORWARD/analysis2/AliForwardMultiplicityBase.cxx
PWGLF/FORWARD/analysis2/AliForwardMultiplicityBase.h
PWGLF/FORWARD/analysis2/AliForwardMultiplicityTask.cxx

index 12e3b42a81596eb3d7b73b19ce52b77f95c912bb..1f4f89d4586e67d7bb287ce31e93442d8dfaaeef 100644 (file)
@@ -57,7 +57,8 @@ AliForwardMultiplicityBase::AliForwardMultiplicityBase(const char* name)
     fRingSums(),
     fDoTiming(false),
   fHTiming(0),
-  fHStatus(0)
+  fHStatus(0),
+    fAddMask(AliAODForwardMult::kInel)
 {
   DGUARD(fDebug, 3,"Named CTOR of AliForwardMultiplicityBase %s",name);
 
@@ -581,6 +582,10 @@ AliForwardMultiplicityBase::MakeRingdNdeta(const TList* input,
     AliForwardUtil::PrintName(N);                                      \
     std::cout << std::boolalpha << (FLAG) << std::noboolalpha << std::endl; \
   } while(false)
+#define PFV(N,VALUE)                                   \
+  do {                                                 \
+    AliForwardUtil::PrintName(N);                      \
+    std::cout << (VALUE) << std::endl; } while(false)
 //____________________________________________________________________
 void
 AliForwardMultiplicityBase::Print(Option_t* option) const
@@ -596,6 +601,7 @@ AliForwardMultiplicityBase::Print(Option_t* option) const
   PFB("Enable low flux code", fEnableLowFlux);
   PFB("Store per-ring hists", fStorePerRing);
   PFB("Make timing histogram", fDoTiming);
+  PFV("Trigger mask for adding", AliAODForwardMult::GetTriggerString(fAddMask));
   // gROOT->IncreaseDirLevel();
   GetESDFixer()         .Print(option);        
   GetSharingFilter()    .Print(option);
index 2a312a27e9bd6f27d9646398daa700177d1d5c7d..2031765f38e7ff71d776ccbb0c737c003f4d191f 100644 (file)
@@ -236,6 +236,12 @@ public:
    * @param use If true, make separate branches for each ring. 
    */
   void SetStorePerRing(Bool_t use) { fStorePerRing = use; }
+  /** 
+   * For which triggers to add internally
+   * 
+   * @param mask Trigger mask as defined in AliAODForwardMult
+   */
+  void SetAddMask(UInt_t mask)  { fAddMask = mask; }
 protected: 
   /** 
    * Constructor 
@@ -257,7 +263,8 @@ protected:
       fRingSums(),
       fDoTiming(false), 
       fHTiming(0),
-      fHStatus(0)
+      fHStatus(0),
+      fAddMask(AliAODForwardMult::kInel)
   {}
   /** 
    * Copy constructor 
@@ -334,7 +341,7 @@ protected:
   Bool_t                 fDoTiming;     // Whether to do timing or not
   TProfile*              fHTiming;      // Timing histogram 
   TH1*                   fHStatus;      // Status histogram
-
+  UInt_t                 fAddMask;      // For which triggers to add internally
   ClassDef(AliForwardMultiplicityBase,6) // Forward multiplicity class
 };
 
index a6bbeafbfad6fc6a962d622532b96da4b947c9a0..7afb3ef3353256b6c2b6ad82ec3b994876a3028f 100644 (file)
@@ -254,8 +254,7 @@ AliForwardMultiplicityTask::Event(AliESDEvent& esd)
   FILL_SW(individual,kTimingCorrections);
 
   // Check if we should add to internal caches 
-  Bool_t add = (fAODFMD.IsTriggerBits(AliAODForwardMult::kInel) && 
-               !(triggers & AliAODForwardMult::kPileUp) && nSkip < 1);
+  Bool_t add = (fAODFMD.IsTriggerBits(fAddMask) && nSkip < 1);
 
   // Collect our `super' histogram 
   START_SW(individual);