]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/RESONANCES/AliRsnMiniOutput.cxx
Fix for broken compilation
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniOutput.cxx
index d6bfe5cbafe2cb3ec2d8c831bbd1b0dc494973f1..c5bdf3c63c8161c5e1eee974de19a73af6266b13 100644 (file)
@@ -137,6 +137,7 @@ AliRsnMiniOutput::AliRsnMiniOutput(const char *name, const char *outType, const
 //    -- "ROTATE2" --> rotated background (rotate second track)
 //    -- "TRUE"    --> true pairs (like track pair, but checking that come from same mother)
 //    -- "MOTHER"  --> mother (loop on MC directly for mothers --> denominator of efficiency)
+//    -- "MOTHER_IN_ACC"  --> mother (loop on MC directly for mothers (in a defined acceptance interval)--> needed for efficiency calcutation using  an enriched sample)
 //
 
    TString input;
@@ -168,6 +169,8 @@ AliRsnMiniOutput::AliRsnMiniOutput(const char *name, const char *outType, const
       fComputation = kTruePair;
    else if (!input.CompareTo("MOTHER"))
       fComputation = kMother;
+    else if (!input.CompareTo("MOTHER_IN_ACC"))
+      fComputation = kMotherInAcc;   
    else
       AliWarning(Form("String '%s' does not define a meaningful computation type", compType));
 
@@ -445,6 +448,31 @@ Bool_t AliRsnMiniOutput::FillMother(const AliRsnMiniPair *pair, AliRsnMiniEvent
    return kTRUE;
 }
 
+//________________________________________________________________________________________
+Bool_t AliRsnMiniOutput::FillMotherInAcceptance(const AliRsnMiniPair *pair, AliRsnMiniEvent *event, TClonesArray *valueList)
+{
+//
+// Compute values for mother-based computations
+//
+
+   // check computation type
+   if (fComputation != kMotherInAcc) {
+      AliError("This method can be called only for mother-based computations");
+      return kFALSE;
+   }
+
+   // copy passed pair info
+   fPair = (*pair);
+
+   // check pair against cuts
+   if (fPairCuts) if (!fPairCuts->IsSelected(&fPair)) return kFALSE;
+
+   // compute & fill
+   ComputeValues(event, valueList);
+   FillHistogram();
+   return kTRUE;
+}
+
 //________________________________________________________________________________________
 Int_t AliRsnMiniOutput::FillPair(AliRsnMiniEvent *event1, AliRsnMiniEvent *event2, TClonesArray *valueList, Bool_t refFirst)
 {