FairRoot/PandaRoot
RhoSimpleKaonSelector.cxx
Go to the documentation of this file.
1 // //
3 // RhoSimpleKaonSelector //
4 // //
5 // Selector classes for particle selection //
6 // //
7 // Author List: //
8 // Marcel Kunze, RUB, Feb. 99 //
9 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
10 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
11 // //
13 
14 #include <math.h>
15 #include "TDatabasePDG.h"
16 
18 #include "RhoBase/RhoCandidate.h"
19 #include "PndPidCandidate.h"
20 
21 
22 
24 
25 TBuffer& operator>> ( TBuffer& buf,RhoSimpleKaonSelector *&obj )
26 {
27  obj = ( RhoSimpleKaonSelector* ) buf.ReadObject ( RhoSimpleKaonSelector::Class() );
28  return buf;
29 }
30 
31 RhoSimpleKaonSelector::RhoSimpleKaonSelector ( const char* name, const char* type ) :
32  RhoParticleSelectorBase ( name,type )
33 {}
34 
36 {
37  if ( b == 0 ) { return kFALSE; }
38 
39  SetTypeAndMass ( b );
40 
41  double Le = b->GetPidInfo ( 0 );
42  double Lmu = b->GetPidInfo ( 1 );
43  double Lpi = b->GetPidInfo ( 2 );
44  double Lk = b->GetPidInfo ( 3 );
45  double Lp = b->GetPidInfo ( 4 );
46 
47  if ( fCriterion == loose ) {
48  if ( Lk<0.2 ) { return kFALSE; }
49  } else if ( fCriterion == veryLoose || fCriterion == variable || fCriterion == all ) {
50  return kTRUE;
51  } else if ( fCriterion == best ) {
52  if ( Lk<Le || Lk<Lmu || Lk<Lpi || Lk<Lp ) { return kFALSE; }
53  } else if ( fCriterion == tight ) {
54  if ( Lk<0.5 ) { return kFALSE; }
55  } else {
56  if ( Lk<0.9 ) { return kFALSE; }
57  }
58 
59  return kTRUE;
60 }
61 
63 {
64  return kFALSE;
65 }
66 
TTree * b
criterion fCriterion
Particle type to accept.
virtual Bool_t Accept(RhoCandidate *b)
RhoSimpleKaonSelector(const char *name="RhoSimpleKaonSelector", const char *type="K+")
void SetTypeAndMass(RhoCandidate *b)
TString name
ClassImp(PndAnaContFact)
double GetPidInfo(int hypo)