FairRoot/PandaRoot
PndAnaSelectorPar.cxx
Go to the documentation of this file.
1 #include <iostream>
2 #include "PndAnaSelectorPar.h"
3 #include "TMath.h"
4 
5 PndAnaSelectorPar::PndAnaSelectorPar(const char* name, const char* title, const char* context)
6  : FairParGenericSet(name,title,context),
7  fVeryLoose(5),
8  fLoose(5),
9  fTight(5),
10  fVeryTight(5),
11  fVariable(5)
12 {
13  clear();
14 }
15 
17 {
18  fVeryLoose.Reset(0.0);
19  fLoose.Reset(0.2);
20  fTight.Reset(0.5);
21  fVeryTight.Reset(0.9);
22  fVariable.Reset(0.0);
23 }
24 
25 void PndAnaSelectorPar::putParams(FairParamList* list)
26 {
27  if(!list) { return; }
28 
29  list->add("VeryLoose", fVeryLoose);
30  list->add("Loose", fLoose);
31  list->add("Tight", fTight);
32  list->add("VeryTight", fVeryTight);
33  list->add("Variable", fVariable);
34 
35 }
36 
38 {
39  // RTDB fills the values
40  if (!list) { return kFALSE; }
41 
42  if (!list->fill("VeryLoose", &fVeryLoose)) { return kFALSE; }
43  if (!list->fill("Loose", &fLoose)) { return kFALSE; }
44  if (!list->fill("Tight", &fTight)) { return kFALSE; }
45  if (!list->fill("VeryTight", &fVeryTight)) { return kFALSE; }
46  if (!list->fill("Variable", &fVariable)) { return kFALSE; }
47 
48  return kTRUE;
49 }
50 
52 
54 {
55  std::cout<<"Analysis PID Selection Parameters:"<<std::endl;
56  std::cout<<" criterion \te\tmu\tpi\tK\tp"<<std::endl;
57  std::cout<<"VeryLoose: ";
58  for(int i=0; i<5; i++) { std::cout<<"\t"<<fVeryLoose.At(i); }
59  std::cout<<std::endl;
60  std::cout<<"Loose: ";
61  for(int i=0; i<5; i++) { std::cout<<"\t"<<fLoose.At(i); }
62  std::cout<<std::endl;
63  std::cout<<"Tight: ";
64  for(int i=0; i<5; i++) { std::cout<<"\t"<<fTight.At(i); }
65  std::cout<<std::endl;
66  std::cout<<"VeryTight: ";
67  for(int i=0; i<5; i++) { std::cout<<"\t"<<fVeryTight.At(i); }
68  std::cout<<std::endl;
69  std::cout<<"Variable: ";
70  for(int i=0; i<5; i++) { std::cout<<"\t"<<fVariable.At(i); }
71  std::cout<<std::endl;
72 
73  return;
74 }
Bool_t getParams(FairParamList *list)
Int_t i
Definition: run_full.C:25
PndAnaSelectorPar(const char *name="PndAnaSelectorParName", const char *title="Analysis pid Selectorr parameter", const char *context="TestDefaultContext")
ClassImp(PndAnaSelectorPar)
void putParams(FairParamList *list)
TString name