41 , fSelectedCutsMask(0)
42 , fCutType(ECutType::kAll)
51 fCutExclude[i] = kFALSE;
64 , fSelectedCutsMask(0)
118 else if (
fCutVar[iCut] &&
fCutVar[iCut]->IsA() == TFormula::Class()) {
120 TFormula* form =
static_cast<TFormula*
>(
fCutVar[iCut]);
147 if (!track)
return kFALSE;
197 TFormula* form =
new TFormula(
"varFormula", formula);
199 if (form->Compile())
return;
201 for (Int_t i = 0; i < form->GetNpar(); i++) {
203 fUsedVars->SetBitNumber((Int_t) form->GetParameter(i), kTRUE);
231 printf(
"------------------------------------------\n");
232 printf(
"cut ranges for '%s'\n", GetTitle());
235 printf(
"Any Cut has to be fulfilled\n");
241 Bool_t fcut = (
fCutVar[iCut] &&
fCutVar[iCut]->IsA() == TFormula::Class());
243 if (!bitcut && !fcut) {
267 TFormula* form =
static_cast<TFormula*
>(
fCutVar[iCut]);
268 TString tit(form->GetExpFormula());
270 for (Int_t j = 0; j < form->GetNpar(); j++)
271 tit.ReplaceAll(Form(
"[%d]", j), form->GetParName(j));
272 if (!inverse) printf(
"Cut %02d: %f < %s < %f\n", iCut,
fCutMin[iCut], tit.Data(),
fCutMax[iCut]);
274 printf(
"Cut %02d: !(%f < %s < %f)\n", iCut,
fCutMin[iCut], tit.Data(),
fCutMax[iCut]);
277 printf(
"cut class not found\n");
279 printf(
"------------------------------------------\n");
friend fscal max(fscal x, fscal y)
friend fscal min(fscal x, fscal y)
ClassImp(PairAnalysisVarCuts) PairAnalysisVarCuts
virtual void SetSelected(Bool_t dec)
void AddBitCut(PairAnalysisVarManager::ValueTypes type, UInt_t bit, Bool_t excludeRange=kFALSE)
UShort_t fActiveCuts[PairAnalysisVarManager::kNMaxValuesMC]
virtual Bool_t IsSelected(Double_t *const values)
Double_t fCutMin[PairAnalysisVarManager::kNMaxValuesMC]
Bool_t fBitCut[PairAnalysisVarManager::kNMaxValuesMC]
Double_t fCutMax[PairAnalysisVarManager::kNMaxValuesMC]
void AddCut(PairAnalysisVarManager::ValueTypes type, Double_t min, Double_t max, Bool_t excludeRange=kFALSE)
virtual void Print(const Option_t *option="") const
Bool_t fCutExclude[PairAnalysisVarManager::kNMaxValuesMC]
TObject * fCutVar[PairAnalysisVarManager::kNMaxValuesMC]
virtual ~PairAnalysisVarCuts()
static void SetFillMap(TBits *map)
static const char * GetValueName(Int_t i)
static void InitFormulas()
static Double_t * GetData()
static void Fill(const TObject *particle, Double_t *const values)
Double_t EvalFormula(TFormula *form, const Double_t *values)