FairRoot/PandaRoot
RhoMomentumParticleSelector.cxx
Go to the documentation of this file.
1 // //
3 // RhoMomentumParticleSelector //
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, RhoMomentumParticleSelector *&obj )
26 {
27  obj = ( RhoMomentumParticleSelector* ) buf.ReadObject ( RhoMomentumParticleSelector::Class() );
28  return buf;
29 }
30 
32  RhoParticleSelectorBase ( name,type ), fCentralValue ( cv ), fWindow ( 0.5*w )
33 {}
34 
36 {
37  if ( b == 0 ) { return kFALSE; }
38  SetTypeAndMass ( b );
39  return ( fabs ( b->P()-fCentralValue ) <fWindow );
40 }
41 
43 {
44  if ( b == 0 ) { return kFALSE; }
45  return ( fabs ( b->GetMomentum().Mag()-fCentralValue ) <fWindow );
46 }
47 
48 
49 
virtual Bool_t Accept(RhoCandidate *b)
TTree * b
ClassImp(RhoMomentumParticleSelector) TBuffer &operator>>(TBuffer &buf
RhoMomentumParticleSelector(const char *name="RhoMomentumParticleSelector", Double_t cv=0, Double_t w=DBL_MAX, const char *type=0)
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
void SetTypeAndMass(RhoCandidate *b)
TString name
Double_t P() const
RhoMomentumParticleSelector *& obj
TVector3 GetMomentum() const