FairRoot/PandaRoot
RhoPlusParticleSelector.cxx
Go to the documentation of this file.
1 // //
3 // RhoPlusParticleSelector //
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, RhoPlusParticleSelector *&obj )
26 {
27  obj = ( RhoPlusParticleSelector* ) buf.ReadObject ( RhoPlusParticleSelector::Class() );
28  return buf;
29 }
30 
31 RhoPlusParticleSelector::RhoPlusParticleSelector ( const char* name, const char* type ) :
32  RhoParticleSelectorBase ( name,type )
33 {}
34 
36 {
37  if ( b == 0 ) { return kFALSE; }
38  if ( b->GetCharge() <0 ) { return kFALSE; }
39  SetTypeAndMass ( b );
40 
41  return kTRUE;
42 }
43 
45 {
46  Bool_t decision = kFALSE;
47  if ( b == 0 ) { return kFALSE; }
48  if ( b->GetCharge() ==1 ) { decision = kTRUE; }
49  return decision;
50 }
51 
52 
Int_t GetCharge() const
Double_t GetCharge() const
Definition: RhoCandidate.h:183
TTree * b
RhoPlusParticleSelector(const char *name="RhoPlusParticleSelector", const char *type=0)
virtual Bool_t Accept(RhoCandidate *b)
void SetTypeAndMass(RhoCandidate *b)
TString name
ClassImp(PndAnaContFact)