]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add trig class for event sel
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Mar 2013 22:06:42 +0000 (22:06 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Mar 2013 22:06:42 +0000 (22:06 +0000)
PWGCF/Correlations/DPhi/FourierDecomposition/AliDhcTask.cxx
PWGCF/Correlations/DPhi/FourierDecomposition/AliDhcTask.h

index 5ead689e1ea77265c1c43b542da82f56cf94cccc..d24b9fc0292123f157be0a73cfb1082c66e99cd4 100644 (file)
@@ -37,6 +37,7 @@ AliDhcTask::AliDhcTask()
   fTrackDepth(1000), fPoolSize(200), fTracksName(), fDoWeights(kFALSE), fFillMuons(kFALSE),
   fPtTACrit(kTRUE), fAllTAHists(kFALSE), fMixInEtaT(kFALSE),
   fEtaTLo(-1.0), fEtaTHi(1.0), fEtaALo(-1.0), fEtaAHi(1.0),
+  fClassName(),
   fESD(0x0), fAOD(0x0), fOutputList(0x0), fHEvt(0x0), fHTrk(0x0),
   fHPtAss(0x0), fHPtTrg(0x0), fHPtTrgEvt(0x0),
   fHPtTrgNorm1S(0x0), fHPtTrgNorm1M(0x0), fHPtTrgNorm2S(0x0), fHPtTrgNorm2M(0x0),
@@ -58,6 +59,7 @@ AliDhcTask::AliDhcTask(const char *name)
   fTrackDepth(1000), fPoolSize(200), fTracksName(), fDoWeights(kFALSE), fFillMuons(kFALSE),
   fPtTACrit(kTRUE), fAllTAHists(kFALSE), fMixInEtaT(kFALSE),
   fEtaTLo(-1.0), fEtaTHi(1.0), fEtaALo(-1.0), fEtaAHi(1.0),
+  fClassName(),
   fESD(0x0), fAOD(0x0), fOutputList(0x0), fHEvt(0x0), fHTrk(0x0),
   fHPtAss(0x0), fHPtTrg(0x0), fHPtTrgEvt(0x0),
   fHPtTrgNorm1S(0x0), fHPtTrgNorm1M(0x0), fHPtTrgNorm2S(0x0), fHPtTrgNorm2M(0x0),
@@ -353,7 +355,7 @@ void AliDhcTask::UserExec(Option_t *)
   static int iEvent = -1; ++iEvent;
 
   if (fVerbosity>2) {
-    if (iEvent % 10 == 0) 
+    if (iEvent % 100 == 0) 
       cout << iEvent << endl;
   }
 
@@ -374,6 +376,16 @@ void AliDhcTask::UserExec(Option_t *)
     return;
   }
 
+  if (fClassName.Length()>0) {
+    TString cls;
+    if (fESD)
+      cls = fESD->GetFiredTriggerClasses();
+    else
+      cls = fAOD->GetFiredTriggerClasses();
+    if (!cls.Contains(fClassName))
+      return;
+  }
+
   Bool_t mcgen = 0;
   if (fTracksName.Contains("Gen"))
     mcgen = 1;
index 276b428ae1b76ae5db4ef0f4c855680e3d45afc8..c9ad953c7780609473c7f5290bdca61b09fb578a 100644 (file)
@@ -31,20 +31,24 @@ class AliDhcTask : public AliAnalysisTaskSE {
   AliDhcTask(const char *name);
   virtual ~AliDhcTask();
   
+  void         SetAllTAHists(Bool_t b)                { fAllTAHists = b;          }
+  void         SetAnaMode(Int_t iAna);
   void         SetCentBins(TAxis *bins)               { fBCent=bins;              }
   void         SetCentMethod(const char *name)        { fCentMethod = name;       }
   void         SetCentMixBins(TAxis *bins)            { fMixBCent=bins;           }
+  void         SetClassName(const char *n)            { fClassName = n;           }
   void         SetDEtaDPhiBins(Int_t nbe, Int_t nbp)  { fNBdeta=nbe; fNBdphi=nbp; }
   void         SetDoWeights(Bool_t b)                 { fDoWeights = b;           }
-  void         SetFillMuons(Bool_t b)                 { fFillMuons = b;           }
-  void         SetPtTACrit(Bool_t b)                  { fPtTACrit = b;            }
-  void         SetAllTAHists(Bool_t b)                { fAllTAHists = b;          }
-  void         SetMixInEtaT(Bool_t b)                 { fMixInEtaT = b;           }
   void         SetEtaMax(Double_t eta)                { fEtaMax = eta;            }
   void         SetEtaTRange(Double_t eL, Double_t eH) { fEtaTLo=eL; fEtaTHi=eH;   }
+  void         SetFillMuons(Bool_t b)                 { fFillMuons = b;           }
+  void         SetHEffA(THnF *h)                      { fHEffA=h;                 }
+  void         SetHEffT(THnF *h)                      { fHEffT=h;                 }
+  void         SetMixInEtaT(Bool_t b)                 { fMixInEtaT = b;           }
   void         SetPoolSize(Int_t p)                   { fPoolSize = p;            }
   void         SetPtABins(TAxis *bins)                { fBPtA=bins;               }
   void         SetPtRange(Double_t min, Double_t max) { fPtMin=min; fPtMax=max;   }
+  void         SetPtTACrit(Bool_t b)                  { fPtTACrit = b;            }
   void         SetPtTBins(TAxis *bins)                { fBPtT=bins;               }
   void         SetTrackDepth(Int_t t)                 { fTrackDepth = t;          }
   void         SetTracksName(const char *n)           { fTracksName = n;          }
@@ -52,9 +56,6 @@ class AliDhcTask : public AliAnalysisTaskSE {
   void         SetZVtxBins(TAxis *bins)               { fBZvtx=bins;              }
   void         SetZVtxMixBins(TAxis *bins)            { fMixBZvtx=bins;           }
   void         SetZvtx(Double_t zvtx)                 { fZVtxMax = zvtx;          }
-  void         SetHEffT(THnF *h)                      { fHEffT=h;                 }
-  void         SetHEffA(THnF *h)                      { fHEffA=h;                 }
-  void         SetAnaMode(Int_t iAna);
   void         PrintDhcSettings();
   enum eAnaMode       {kHH, kMuH, kHMu, kMuMu, kPSide, kASide};
 
@@ -95,6 +96,7 @@ class AliDhcTask : public AliAnalysisTaskSE {
   Double_t           fEtaTHi;          //  Max eta for triggers
   Double_t           fEtaALo;          //  Min eta for associated
   Double_t           fEtaAHi;          //  Max eta for associated
+  TString            fClassName;       //  If not null only process events with given class
   AliESDEvent       *fESD;             //! ESD object
   AliAODEvent       *fAOD;             //! AOD object
   TList             *fOutputList;      //! Output list
@@ -137,7 +139,7 @@ class AliDhcTask : public AliAnalysisTaskSE {
   AliDhcTask(const AliDhcTask&);            // not implemented
   AliDhcTask &operator=(const AliDhcTask&); // not implemented
 
-  ClassDef(AliDhcTask, 4);
+  ClassDef(AliDhcTask, 5);
 };
 
 #endif