X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWG2%2FRESONANCES%2FAliRsnCutSet.cxx;h=4bf61b2aeae81654329a791a7551d8189b816c61;hb=8b52fa41ee1668dea15b9022ae2be5625227ebca;hp=836a231acc80d1cfeece7f803c539c20ff38e751;hpb=aec0ec32a633e38b7d531ea77860e12c35039ec7;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWG2/RESONANCES/AliRsnCutSet.cxx b/PWG2/RESONANCES/AliRsnCutSet.cxx index 836a231acc8..4bf61b2aeae 100644 --- a/PWG2/RESONANCES/AliRsnCutSet.cxx +++ b/PWG2/RESONANCES/AliRsnCutSet.cxx @@ -1,3 +1,12 @@ +// +// Class AliRsnCutSet +// +// This is the front-end for cut management and checking. +// It must be prepared by adding all required single cuts, +// and then with a logical expression which combines all cuts +// with the "AND", "OR" and "NOT" operators. +// + #include "AliLog.h" #include "AliRsnCut.h" @@ -183,6 +192,28 @@ Bool_t AliRsnCutSet::IsSelected(AliRsnCut::ETarget type, AliRsnEvent * event) return boolReturn; } +//_____________________________________________________________________________ +Bool_t AliRsnCutSet::IsSelected(AliRsnCut::ETarget type, AliRsnEvent * ev1, AliRsnEvent *ev2) +{ +// +// Checks an object according to the cut expression defined here. +// + + Int_t i; + if (!fNumOfCuts) return kTRUE; + + Bool_t boolReturn = kTRUE; + AliRsnCut *cut; + for (i = 0; i < fNumOfCuts; i++) + { + cut = (AliRsnCut*) fCuts.At(i); + fBoolValues[i] = cut->IsSelected(type,ev1,ev2); + } + + if (fIsScheme) boolReturn = Passed(); + return boolReturn; +} + //_____________________________________________________________________________ void AliRsnCutSet::SetCutScheme(const TString & theValue) {