File indexing completed on 2024-09-28 07:02:52
0001 #include "eicsmear/smear/NumSigmaPid.h"
0002
0003 namespace Smear {
0004
0005
0006 NumSigmaPid::NumSigmaPid(){}
0007
0008
0009 void NumSigmaPid::Smear(const erhic::VirtualParticle& prt,
0010 ParticleMCS& prtOut) {
0011 auto p = prt.GetP();
0012 auto eta = prt.GetEta();
0013
0014 if ( ThePidObject->valid(eta,p) ){
0015
0016 prtOut.SetNumSigma ( ThePidObject->numSigma(eta, p, EnumType) );
0017
0018 }
0019 }
0020
0021
0022 NumSigmaPid* NumSigmaPid::Clone(const char*) const {
0023
0024 return new NumSigmaPid(*this);
0025 }
0026
0027
0028 void NumSigmaPid::SetNumSigmaType( const int i ){
0029 switch ( i ){
0030 case 0 :
0031 NumSigmaType = 0;
0032 EnumType = PID::pi_k;
0033 break;
0034 case 1 :
0035 NumSigmaType = 1;
0036 EnumType = PID::k_p;
0037 break;
0038 default :
0039 std::cerr << "Unrecognized NumSigmaType " << i << std::endl;
0040 throw;
0041 break;
0042 }
0043
0044 }
0045
0046
0047 int NumSigmaPid::GetNumSigmaType( ) const {
0048 return NumSigmaType;
0049 }
0050
0051
0052 bool NumSigmaPid::valid (double eta, double p ) const {
0053 return ThePidObject->valid( eta, p);
0054 }
0055
0056 double NumSigmaPid::maxP (double eta, double numSigma, PID::type PID) const{
0057 return ThePidObject->maxP (eta, numSigma, PID );
0058 }
0059
0060 double NumSigmaPid::minP (double eta, double numSigma, PID::type PID) const{
0061 return ThePidObject->minP (eta, numSigma, PID );
0062 }
0063
0064 std::string NumSigmaPid::name() const {
0065 return ThePidObject->name();
0066 }
0067
0068 void NumSigmaPid::description() const{
0069 ThePidObject->description();
0070 }
0071
0072
0073
0074 }