FairRoot/PandaRoot
RhoEnergyParticleSelector.cxx
Go to the documentation of this file.
1 // //
3 // Selector classes for energy selection //
4 // //
5 // Author List: //
6 // Marcel Kunze, RUB, Feb. 99 //
7 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
8 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
9 // //
11 
12 #include <math.h>
13 #include "TDatabasePDG.h"
14 
16 #include "RhoBase/RhoCandidate.h"
17 #include "PndPidCandidate.h"
18 
19 
20 
21 
23 
24 TBuffer& operator>> ( TBuffer& buf, RhoEnergyParticleSelector *&obj )
25 {
26  obj = ( RhoEnergyParticleSelector* ) buf.ReadObject ( RhoEnergyParticleSelector::Class() );
27  return buf;
28 }
29 
31  RhoParticleSelectorBase ( name,type ), fCentralValue ( cv ), fWindow ( 0.5*w )
32 {}
33 
35 {
36  if ( b == 0 ) { return kFALSE; }
37  SetTypeAndMass ( b );
38  return ( fabs ( b->E()-fCentralValue ) <fWindow );
39 }
40 
42 {
43  if ( b == 0 ) { return kFALSE; }
44  return ( fabs ( b->GetEnergy()-fCentralValue ) <fWindow );
45 }
46 
RhoEnergyParticleSelector(const char *name="RhoEnergyParticleSelector", Double_t cv=0, Double_t w=DBL_MAX, const char *type=0)
TTree * b
ClassImp(RhoEnergyParticleSelector) TBuffer &operator>>(TBuffer &buf
Double_t GetEnergy() const
RhoEnergyParticleSelector *& obj
Double_t
virtual Bool_t Accept(RhoCandidate *b)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
void SetTypeAndMass(RhoCandidate *b)
TString name
Double_t E() const
Definition: RhoCandidate.h:202