]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/RESONANCES/AliRsnMiniAnalysisTask.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniAnalysisTask.h
index 8b38cb8feb5cb30419e26b420b482e26ba8a0066..9181d798e4a2a8fffec15a9ac553c787abe7b9d6 100644 (file)
@@ -36,8 +36,10 @@ public:
    virtual ~AliRsnMiniAnalysisTask();
 
    void                UseMC(Bool_t yn = kTRUE)           {fUseMC = yn;}
+   void                UseESDTriggerMask(UInt_t trgMask)     {fTriggerMask = trgMask;}
    void                UseCentrality(const char *type)    {fUseCentrality = kTRUE; fCentralityType = type; fCentralityType.ToUpper();}
    void                SetUseCentralityPatch(Bool_t isAOD049) {fUseAOD049CentralityPatch = isAOD049;}
+   void                SetUseCentralityPatchPbPb2011(Int_t centralityPatchPbPb2011) {fUseCentralityPatchPbPb2011 = centralityPatchPbPb2011;}
    void                UseMultiplicity(const char *type)  {fUseCentrality = kFALSE; fCentralityType = type; fCentralityType.ToUpper();}
    void                UseContinuousMix()                 {fContinuousMix = kTRUE;}
    void                UseBinnedMix()                     {fContinuousMix = kFALSE;}
@@ -47,10 +49,20 @@ public:
    void                SetMaxDiffAngle(Double_t val)      {fMaxDiffAngle = val;}
    void                SetEventCuts(AliRsnCutSet *cuts)   {fEventCuts    = cuts;}
    void                SetMixPrintRefresh(Int_t n)        {fMixPrintRefresh = n;}
+   void                SetMaxNDaughters(Short_t n)        {fMaxNDaughters = n;}
+   void                SetCheckMomentumConservation(Bool_t checkP) {fCheckP = checkP;}
+   void                SetCheckFeedDown(Bool_t checkFeedDown)      {fCheckFeedDown = checkFeedDown;}
+   void                SetDselection(UShort_t originDselection);
+   void               SetRejectCandidateIfNotFromQuark(Bool_t opt){fRejectIfNoQuark=opt;}
+   void                SetMotherAcceptanceCutMinPt(Float_t minPt)  {fMotherAcceptanceCutMinPt = minPt;}
+   void                SetMotherAcceptanceCutMaxEta(Float_t maxEta){fMotherAcceptanceCutMaxEta = maxEta;}
+   void                KeepMotherInAcceptance(Bool_t keepMotherInAcceptance) {fKeepMotherInAcceptance = keepMotherInAcceptance;}
    Int_t               AddTrackCuts(AliRsnCutSet *cuts);
    TClonesArray       *Outputs()                          {return &fHistograms;}
    TClonesArray       *Values()                           {return &fValues;}
-   void                SetEventQAHist(TString type,TH2F* histo); 
+   Short_t             GetMaxNDaughters()                 {return fMaxNDaughters;}
+   void                SetEventQAHist(TString type,TH2F *histo);
+   void                UseBigOutput(Bool_t b=kTRUE) { fBigOutput = b; }
 
    virtual void        UserCreateOutputObjects();
    virtual void        UserExec(Option_t *);
@@ -69,7 +81,9 @@ private:
    Double_t ComputeAngle();
    Double_t ComputeCentrality(Bool_t isESD);
    Double_t ComputeMultiplicity(Bool_t isESD,TString type);
+   Double_t ComputeTracklets();
    Double_t ApplyCentralityPatchAOD049();
+   Double_t ApplyCentralityPatchPbPb2011();
    void     FillTrueMotherESD(AliRsnMiniEvent *event);
    void     FillTrueMotherAOD(AliRsnMiniEvent *event);
    void     StoreTrueMother(AliRsnMiniPair *pair, AliRsnMiniEvent *event);
@@ -77,9 +91,11 @@ private:
 
    Bool_t               fUseMC;           //  use or not MC info
    Int_t                fEvNum;           //! absolute event counter
+   UInt_t               fTriggerMask;   //trigger mask
    Bool_t               fUseCentrality;   //  if true, use centrality for event, otherwise use multiplicity
    TString              fCentralityType;  //  definition used to choose what centrality or multiplicity to use
    Bool_t               fUseAOD049CentralityPatch; //flag to enable AOD049 centrality patch
+   Int_t                fUseCentralityPatchPbPb2011; //for PbPb 2011 centrality flattening
 
    Bool_t               fContinuousMix;   //  mixing --> technique chosen (continuous or binned)
    Int_t                fNMix;            //  mixing --> required number of mixes
@@ -92,6 +108,7 @@ private:
    TClonesArray         fValues;          //  list of values to be computed
    TH1F                *fHEventStat;      //  histogram of event statistics
    TH1F                *fHAEventsVsMulti; //  histogram of event statistics
+   TH1F                *fHAEventsVsTracklets; //  histogram of event statistics
    TH2F                *fHAEventVz;       //  histogram of vertex-z vs. multiplicity/centrality
    TH2F                *fHAEventMultiCent;//  histogram of multiplicity vs. centrality
    TH2F                *fHAEventPlane;    //  histogram of event plane vs. multiplicity/centrality
@@ -105,69 +122,20 @@ private:
    AliRsnMiniEvent     *fMiniEvent;       //! mini-event cursor
    Bool_t               fBigOutput;       // flag if open file for output list
    Int_t                fMixPrintRefresh; // how often info in mixing part is printed
-
-   ClassDef(AliRsnMiniAnalysisTask, 5);   // AliRsnMiniAnalysisTask
+   Short_t              fMaxNDaughters;   // maximum number of allowed mother's daughter
+   Bool_t               fCheckP;          // flag to set in order to check the momentum conservation for mothers
+   
+   Bool_t               fCheckFeedDown;      // flag to set in order to check the particle feed down (specific for D meson analysis)
+   UShort_t            fOriginDselection;   // flag to select D0 origins. 0 Only from charm 1 only from beauty 2 both from charm and beauty (specific for D meson analysis)
+   Bool_t              fKeepDfromB;         // flag for the feed down from b quark decay (specific for D meson analysis)                       
+   Bool_t              fKeepDfromBOnly;     // flag to keep only the charm particles that comes from beauty decays (specific for D meson analysis)
+   Bool_t              fRejectIfNoQuark;    // flag to remove events not generated with PYTHIA
+   Float_t              fMotherAcceptanceCutMinPt;              // cut value to apply when selecting the mothers inside a defined acceptance
+   Float_t              fMotherAcceptanceCutMaxEta;             // cut value to apply when selecting the mothers inside a defined acceptance
+   Bool_t               fKeepMotherInAcceptance;                // flag to keep also mothers in acceptance
+
+   ClassDef(AliRsnMiniAnalysisTask, 11);   // AliRsnMiniAnalysisTask
 };
 
-inline Int_t AliRsnMiniAnalysisTask::CreateValue(AliRsnMiniValue::EType type, Bool_t useMC)
-{
-//
-// Create a new value in the task,
-// and returns its ID, which is needed for setting up histograms.
-// If that value was already initialized, returns its ID and does not recreate it.
-//
-
-   Int_t valID = ValueID(type, useMC);
-   if (valID >= 0 && valID < fValues.GetEntries()) {
-      AliInfo(Form("Value '%s' is already created in slot #%d", AliRsnMiniValue::ValueName(type, useMC), valID));
-   } else {
-      valID = fValues.GetEntries();
-      AliInfo(Form("Creating value '%s' in slot #%d", AliRsnMiniValue::ValueName(type, useMC), valID));
-      new (fValues[valID]) AliRsnMiniValue(type, useMC);
-   }
-
-   return valID;
-}
-
-inline Int_t AliRsnMiniAnalysisTask::ValueID(AliRsnMiniValue::EType type, Bool_t useMC)
-{
-//
-// Searches if a value computation is initialized
-//
-
-   const char *name = AliRsnMiniValue::ValueName(type, useMC);
-   TObject *obj = fValues.FindObject(name);
-   if (obj)
-      return fValues.IndexOf(obj);
-   else
-      return -1;
-}
-
-inline AliRsnMiniOutput *AliRsnMiniAnalysisTask::CreateOutput
-(const char *name, AliRsnMiniOutput::EOutputType type, AliRsnMiniOutput::EComputation src)
-{
-//
-// Create a new histogram definition in the task,
-// which is then returned to the user for its configuration
-//
-
-   Int_t n = fHistograms.GetEntries();
-   AliRsnMiniOutput *newDef = new (fHistograms[n]) AliRsnMiniOutput(name, type, src);
-
-   return newDef;
-}
-
-inline AliRsnMiniOutput *AliRsnMiniAnalysisTask::CreateOutput
-(const char *name, const char *outType, const char *compType)
-{
-//
-// Create a new histogram definition in the task,
-// which is then returned to the user for its configuration
-//
-
-   Int_t n = fHistograms.GetEntries();
-   AliRsnMiniOutput *newDef = new (fHistograms[n]) AliRsnMiniOutput(name, outType, compType);
 
-   return newDef;
-}
 #endif