FairRoot/PandaRoot
RhoSimpleMuonSelector.cxx
Go to the documentation of this file.
1 // //
3 // RhoSimpleMuonSelector //
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 
23 
24 TBuffer& operator>> ( TBuffer& buf, RhoSimpleMuonSelector *&obj )
25 {
26  obj = ( RhoSimpleMuonSelector* ) buf.ReadObject ( RhoSimpleMuonSelector::Class() );
27  return buf;
28 }
29 
30 RhoSimpleMuonSelector::RhoSimpleMuonSelector ( const char* name, const char* type ) :
31  RhoParticleSelectorBase ( name,type )
32 {}
33 
35 {
36  if ( b == 0 ) { return kFALSE; }
37 
38  SetTypeAndMass ( b );
39 
40  double Le = b->GetPidInfo ( 0 );
41  double Lmu = b->GetPidInfo ( 1 );
42  double Lpi = b->GetPidInfo ( 2 );
43  double Lk = b->GetPidInfo ( 3 );
44  double Lp = b->GetPidInfo ( 4 );
45 
46  if ( fCriterion == loose ) {
47  if ( Lmu<0.2 ) { return kFALSE; }
48  } else if ( fCriterion == veryLoose || fCriterion == variable || fCriterion == all ) {
49  return kTRUE;
50  } else if ( fCriterion == best ) {
51  if ( Lmu<Le || Lmu<Lpi || Lmu<Lk || Lmu<Lp ) { return kFALSE; }
52  } else if ( fCriterion == tight ) {
53  if ( Lmu<0.5 ) { return kFALSE; }
54  } else {
55  if ( Lmu<0.9 ) { return kFALSE; }
56  }
57 
58  return kTRUE;
59 }
60 
62 {
63  return kFALSE;
64 }
TTree * b
criterion fCriterion
Particle type to accept.
virtual Bool_t Accept(RhoCandidate *b)
void SetTypeAndMass(RhoCandidate *b)
TString name
RhoSimpleMuonSelector(const char *name="RhoSimpleMuonSelector", const char *type="mu-")
ClassImp(PndAnaContFact)
double GetPidInfo(int hypo)