14 #include "TDatabasePDG.h" 
   22 #include "FairRuntimeDb.h" 
   47   FairRun* ana = FairRun::Instance();
 
   48   FairRuntimeDb* 
rtdb=ana->GetRuntimeDb();
 
   52     Fatal ( 
"PndAnaPidSelector",
"No ANAPidSelections* parameter found: %s",
"ANAPidSelections" );
 
   60   Int_t runID = ana->GetRunId();
 
   65   rtdb->initContainers ( runID );
 
   76   if ( crit.Contains ( 
"VeryLoose" ) ) {
 
   78     critcopy.ReplaceAll(
"VeryLoose",
"");
 
   79   } 
else if ( crit.Contains ( 
"Loose" ) ) {
 
   81     critcopy.ReplaceAll(
"Loose",
"");
 
   82   } 
else if ( crit.Contains ( 
"VeryTight" ) ) {
 
   84     critcopy.ReplaceAll(
"VeryTight",
"");
 
   85   } 
else if ( crit.Contains ( 
"Tight" ) ) {
 
   87     critcopy.ReplaceAll(
"Tight",
"");
 
   88   } 
else if ( crit.Contains ( 
"Variable" ) ) {
 
   90     critcopy.ReplaceAll(
"Variable",
"");
 
   91   } 
else if ( crit.Contains ( 
"Best" ) ) {
 
   93     critcopy.ReplaceAll(
"Best",
"");
 
   94   } 
else if ( crit.Contains ( 
"All" ) ) {
 
   96     critcopy.ReplaceAll(
"All",
"");
 
  108   if ( crit.Contains ( 
"Proton" ) ) {
 
  109     fTypePlus=TDatabasePDG::Instance()->GetParticle ( 
"p+" );
 
  111       fTypePlus=TDatabasePDG::Instance()->GetParticle ( 
"proton" );
 
  114       fTypePlus=TDatabasePDG::Instance()->GetParticle (2212);
 
  117     critcopy.ReplaceAll(
"Proton",
"");
 
  118   } 
else if ( crit.Contains ( 
"Kaon" ) ) {
 
  119     fTypePlus=TDatabasePDG::Instance()->GetParticle ( 
"K+" );
 
  121       fTypePlus=TDatabasePDG::Instance()->GetParticle (321);
 
  124     critcopy.ReplaceAll(
"Kaon",
"");
 
  125   } 
else if ( crit.Contains ( 
"Pion" ) ) {
 
  126     fTypePlus=TDatabasePDG::Instance()->GetParticle ( 
"pi+" );
 
  128       fTypePlus=TDatabasePDG::Instance()->GetParticle (211);
 
  131     critcopy.ReplaceAll(
"Pion",
"");
 
  132   } 
else if ( crit.Contains ( 
"Muon" ) ) {
 
  133     fTypePlus=TDatabasePDG::Instance()->GetParticle ( 
"mu+" );
 
  135       fTypePlus=TDatabasePDG::Instance()->GetParticle (-13);
 
  138     critcopy.ReplaceAll(
"Muon",
"");
 
  139   } 
else if ( crit.Contains ( 
"Electron" ) ) {
 
  140     fTypePlus=TDatabasePDG::Instance()->GetParticle ( 
"e+" );
 
  142       fTypePlus=TDatabasePDG::Instance()->GetParticle (-11);
 
  145     critcopy.ReplaceAll(
"Electron",
"");
 
  154   if ( crit.Contains ( 
"Plus" ) ) {
 
  156     critcopy.ReplaceAll(
"Plus",
"");
 
  157   } 
else if ( crit.Contains ( 
"Minus" ) ) {
 
  159     critcopy.ReplaceAll(
"Minus",
"");
 
  164   if(critcopy.Length()>0){
 
  165     std::cout<<
"Analysis PID selection criteria setting failed. "<<std::endl;
 
  166     std::cout<<
"Selection String: \""<<crit.Data()<<
"\""<<std::endl;
 
  167     std::cout<<
"Invalid piece:    \""<<critcopy.Data()<<
"\""<<std::endl;
 
  168     std::cout<<
"Viable optios are:"<<std::endl;
 
  169     std::cout<<
"\tProton,Kaon,Pion,Muon,Electron"<<std::endl;
 
  170     std::cout<<
"\tVeryLoose,Loose,Tight,VeryTight,Variable,Best,All"<<std::endl;
 
  171     std::cout<<
"\tPlus,Minus,Charged,Neutral,(All)"<<std::endl;
 
  172     Error(
"SetSelection()",
"Invalid selection string.");
 
  188     Error ( 
"PndAnaPidSelector::Accept",
"Candiate missing." ); 
return kFALSE;
 
  212     if ( Lcheck<fSelectPar->GetVeryLooseCrit ( 
fPidSelect ) ) {
 
  216     if ( Lcheck<fSelectPar->GetLooseCrit ( 
fPidSelect ) ) {
 
  220     if ( Lcheck<fSelectPar->GetTightCrit ( 
fPidSelect ) ) {
 
  224     if ( Lcheck<fSelectPar->GetVeryTightCrit ( 
fPidSelect ) ) {
 
  228     if ( Lcheck<fSelectPar->GetVariableCrit ( 
fPidSelect ) ) {
 
  240     if ( Lcheck<Le || Lcheck<Lmu || Lcheck<Lpi || Lcheck<Lk || Lcheck<Lp ) {
 
  250   Warning ( 
"PndAnaPidSelector::Accept(VAbsMicroCandidate&)",
"No implementation for this. Please use PndAnaPidSelector::Accept(RhoCandidate&)" );
 
Double_t fChargeCrit
Pointer to the current parameter object. 
Bool_t SetSelection(TString &crit)
PndAnaSelectorPar * fSelectPar
Double_t GetCharge() const 
PndAnaPidSelector(const char *name="PndAnaPidSelector", const char *type="", const char *paramid="Default")
criterion fCriterion
Particle type to accept. 
TParticlePDG * fTypeMinus
Particle type to accept. 
TParticlePDG * CPConjugate(TParticlePDG *aPart)
friend F32vec4 fabs(const F32vec4 &a)
void SetTypeAndMass(RhoCandidate *b)
virtual Bool_t Accept(RhoCandidate *b)
virtual void SetCriterion(const char *crit)
ClassImp(PndAnaPidSelector) TBuffer &operator>>(TBuffer &buf
double GetPidInfo(int hypo)