BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Tof2PID Class Reference

#include <Tof2PID.h>

Inheritance diagram for Tof2PID:

Public Member Functions

 ~Tof2PID ()
void init ()
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double sigma (int n) const
double offset (int n) const
double prob (int n) const
int ndof () const
double mass2 () const
double ph2 () const
double zhit2 () const
double path2 () const
double tof2 () const
int neuronPID () const
 ~Tof2PID ()
void init ()
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double sigma (int n) const
double offset (int n) const
double prob (int n) const
int ndof () const
double mass2 () const
double ph2 () const
double zhit2 () const
double path2 () const
double tof2 () const
int neuronPID () const
 ~Tof2PID ()
void init ()
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double sigma (int n) const
double offset (int n) const
double prob (int n) const
int ndof () const
double mass2 () const
double ph2 () const
double zhit2 () const
double path2 () const
double tof2 () const
int neuronPID () const
Public Member Functions inherited from ParticleIDBase
 ParticleIDBase ()
virtual ~ParticleIDBase ()
EvtRecTrackPidTrk () const
void setRecTrack (EvtRecTrack *trk)
double chiMinCut () const
void setChiMinCut (const double chi=4)
double chiMaxCut () const
void setChiMaxCut (const double chi=6)
double pdfMinSigmaCut () const
void setPdfMinSigmaCut (const double pdf=4)
double getRunNo () const
void setRunNo (const double runh=8093)
double p ()
double pt ()
double charge ()
double xmass (int n)
double velc ()
double probCalculate (double chi2, int n)
double pdfCalculate (double offset, double sigma)
double interpolation (double *x, double *y, double x1)
double pol2 (double x, double *par)
double pol3 (double x, double *par)
double pol4 (double x, double *par)
int useDedx () const
int useTof () const
int useTof1 () const
int useTof2 () const
int useTofE () const
int useTofQ () const
int useTofC () const
int useTofCorr () const
int useEmc () const
int useMuc () const
int onlyPionKaon () const
int onlyPionKaonProton () const
int onlyPionKaonElectron () const
int all () const
int onlyElectron () const
int onlyMuon () const
int onlyPion () const
int onlyKaon () const
int onlyProton () const
int methodLikelihood () const
int methodProbability () const
int methodNeuronNetwork () const
int dedxValid () const
int tofValid () const
int tofeValid () const
int tofqValid () const
int tofcValid () const
int tofcorrValid () const
int emcValid () const
int mucValid () const
void set_path (const char *s_path=0)
void set_path (std::string s_path)
 ParticleIDBase ()
virtual ~ParticleIDBase ()
EvtRecTrackPidTrk () const
void setRecTrack (EvtRecTrack *trk)
double chiMinCut () const
void setChiMinCut (const double chi=4)
double chiMaxCut () const
void setChiMaxCut (const double chi=6)
double pdfMinSigmaCut () const
void setPdfMinSigmaCut (const double pdf=4)
double getRunNo () const
void setRunNo (const double runh=8093)
double p ()
double pt ()
double charge ()
double xmass (int n)
double velc ()
double probCalculate (double chi2, int n)
double pdfCalculate (double offset, double sigma)
double interpolation (double *x, double *y, double x1)
double pol2 (double x, double *par)
double pol3 (double x, double *par)
double pol4 (double x, double *par)
int useDedx () const
int useTof () const
int useTof1 () const
int useTof2 () const
int useTofE () const
int useTofQ () const
int useTofC () const
int useTofCorr () const
int useEmc () const
int useMuc () const
int onlyPionKaon () const
int onlyPionKaonProton () const
int onlyPionKaonElectron () const
int all () const
int onlyElectron () const
int onlyMuon () const
int onlyPion () const
int onlyKaon () const
int onlyProton () const
int methodLikelihood () const
int methodProbability () const
int methodNeuronNetwork () const
int dedxValid () const
int tofValid () const
int tofeValid () const
int tofqValid () const
int tofcValid () const
int tofcorrValid () const
int emcValid () const
int mucValid () const
void set_path (const char *s_path=0)
void set_path (std::string s_path)
 ParticleIDBase ()
virtual ~ParticleIDBase ()
EvtRecTrackPidTrk () const
void setRecTrack (EvtRecTrack *trk)
double chiMinCut () const
void setChiMinCut (const double chi=4)
double chiMaxCut () const
void setChiMaxCut (const double chi=6)
double pdfMinSigmaCut () const
void setPdfMinSigmaCut (const double pdf=4)
double getRunNo () const
void setRunNo (const double runh=8093)
double p ()
double pt ()
double charge ()
double xmass (int n)
double velc ()
double probCalculate (double chi2, int n)
double pdfCalculate (double offset, double sigma)
double interpolation (double *x, double *y, double x1)
double pol2 (double x, double *par)
double pol3 (double x, double *par)
double pol4 (double x, double *par)
int useDedx () const
int useTof () const
int useTof1 () const
int useTof2 () const
int useTofE () const
int useTofQ () const
int useTofC () const
int useTofCorr () const
int useEmc () const
int useMuc () const
int onlyPionKaon () const
int onlyPionKaonProton () const
int onlyPionKaonElectron () const
int all () const
int onlyElectron () const
int onlyMuon () const
int onlyPion () const
int onlyKaon () const
int onlyProton () const
int methodLikelihood () const
int methodProbability () const
int methodNeuronNetwork () const
int dedxValid () const
int tofValid () const
int tofeValid () const
int tofqValid () const
int tofcValid () const
int tofcorrValid () const
int emcValid () const
int mucValid () const
void set_path (const char *s_path=0)
void set_path (std::string s_path)

Static Public Member Functions

static Tof2PIDinstance ()
static Tof2PIDinstance ()
static Tof2PIDinstance ()

Protected Member Functions

int particleIDCalculation ()
int neuronPIDCalculation ()
int LikelihoodCalculation ()
double offsetTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
double sigmaTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
double sampleQ0 (double betagamma, double beta)
int particleIDCalculation ()
int neuronPIDCalculation ()
int LikelihoodCalculation ()
double offsetTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
double sigmaTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
double sampleQ0 (double betagamma, double beta)
int particleIDCalculation ()
int neuronPIDCalculation ()
int LikelihoodCalculation ()
double offsetTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
double sigmaTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
double sampleQ0 (double betagamma, double beta)

Additional Inherited Members

Static Protected Attributes inherited from ParticleIDBase
static std::string path = ""

Detailed Description

Constructor & Destructor Documentation

◆ ~Tof2PID() [1/3]

Tof2PID::~Tof2PID ( )
inline

Definition at line 18 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

18{ ; }

◆ ~Tof2PID() [2/3]

Tof2PID::~Tof2PID ( )
inline

◆ ~Tof2PID() [3/3]

Tof2PID::~Tof2PID ( )
inline

Member Function Documentation

◆ calculate() [1/3]

void Tof2PID::calculate ( )
virtual

Implements ParticleIDBase.

Definition at line 57 of file Tof2PID.cxx.

57 {
58 if ( particleIDCalculation() == 0 ) m_ndof = 1;
59}
int particleIDCalculation()
Definition Tof2PID.cxx:61

◆ calculate() [2/3]

void Tof2PID::calculate ( )
virtual

Implements ParticleIDBase.

◆ calculate() [3/3]

void Tof2PID::calculate ( )
virtual

Implements ParticleIDBase.

◆ chi() [1/3]

double Tof2PID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 23 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

23{ return m_chi[n]; }
const Int_t n

◆ chi() [2/3]

double Tof2PID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 23 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

23{ return m_chi[n]; }

◆ chi() [3/3]

double Tof2PID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 23 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

23{ return m_chi[n]; }

◆ init() [1/3]

void Tof2PID::init ( )
virtual

Implements ParticleIDBase.

Definition at line 40 of file Tof2PID.cxx.

40 {
41
42 for ( int i = 0; i < 5; i++ )
43 {
44 m_chi[i] = 99.0;
45 m_prob[i] = -1.0;
46 m_sigma[i] = 1.0;
47 m_offset[i] = 99.0;
48 }
49 m_chimin = 99.;
50 m_pdfmin = 99.;
51 m_ndof = 0;
52 m_mass2 = -999;
53 m_ph2 = -99;
54 m_zhit2 = -99;
55}

◆ init() [2/3]

void Tof2PID::init ( )
virtual

Implements ParticleIDBase.

◆ init() [3/3]

void Tof2PID::init ( )
virtual

Implements ParticleIDBase.

◆ instance() [1/3]

Tof2PID * Tof2PID::instance ( )
static

Definition at line 17 of file Tof2PID.cxx.

17 {
18 if ( !m_pointer ) m_pointer = new Tof2PID();
19 return m_pointer;
20}

Referenced by TofPID::particleIDCalculation().

◆ instance() [2/3]

Tof2PID * Tof2PID::instance ( )
static

◆ instance() [3/3]

Tof2PID * Tof2PID::instance ( )
static

◆ IsPidInfoValid() [1/3]

bool Tof2PID::IsPidInfoValid ( ) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 22 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

22{ return ( m_ndof > 0 ); }

◆ IsPidInfoValid() [2/3]

bool Tof2PID::IsPidInfoValid ( ) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 22 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

22{ return ( m_ndof > 0 ); }

◆ IsPidInfoValid() [3/3]

bool Tof2PID::IsPidInfoValid ( ) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 22 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

22{ return ( m_ndof > 0 ); }

◆ LikelihoodCalculation() [1/3]

int Tof2PID::LikelihoodCalculation ( )
inlineprotectedvirtual

Implements ParticleIDBase.

Definition at line 38 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

38{ return -1; }

◆ LikelihoodCalculation() [2/3]

int Tof2PID::LikelihoodCalculation ( )
inlineprotectedvirtual

Implements ParticleIDBase.

Definition at line 38 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

38{ return -1; }

◆ LikelihoodCalculation() [3/3]

int Tof2PID::LikelihoodCalculation ( )
inlineprotectedvirtual

Implements ParticleIDBase.

Definition at line 38 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

38{ return -1; }

◆ mass2() [1/3]

double Tof2PID::mass2 ( ) const
inline

Definition at line 28 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

28{ return m_mass2; }

◆ mass2() [2/3]

double Tof2PID::mass2 ( ) const
inline

Definition at line 28 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

28{ return m_mass2; }

◆ mass2() [3/3]

double Tof2PID::mass2 ( ) const
inline

Definition at line 28 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

28{ return m_mass2; }

◆ ndof() [1/3]

int Tof2PID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 27 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

27{ return m_ndof; }

◆ ndof() [2/3]

int Tof2PID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 27 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

27{ return m_ndof; }

◆ ndof() [3/3]

int Tof2PID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 27 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

27{ return m_ndof; }

◆ neuronPID() [1/3]

int Tof2PID::neuronPID ( ) const
inline

Definition at line 33 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

33{ return -1; }

◆ neuronPID() [2/3]

int Tof2PID::neuronPID ( ) const
inline

Definition at line 33 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

33{ return -1; }

◆ neuronPID() [3/3]

int Tof2PID::neuronPID ( ) const
inline

Definition at line 33 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

33{ return -1; }

◆ neuronPIDCalculation() [1/3]

int Tof2PID::neuronPIDCalculation ( )
inlineprotected

Definition at line 37 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

37{ return -1; }

◆ neuronPIDCalculation() [2/3]

int Tof2PID::neuronPIDCalculation ( )
inlineprotected

Definition at line 37 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

37{ return -1; }

◆ neuronPIDCalculation() [3/3]

int Tof2PID::neuronPIDCalculation ( )
inlineprotected

Definition at line 37 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

37{ return -1; }

◆ offset() [1/3]

double Tof2PID::offset ( int n) const
inline

Definition at line 25 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

25{ return m_offset[n]; }

Referenced by offsetTof2().

◆ offset() [2/3]

double Tof2PID::offset ( int n) const
inline

Definition at line 25 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

25{ return m_offset[n]; }

◆ offset() [3/3]

double Tof2PID::offset ( int n) const
inline

Definition at line 25 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

25{ return m_offset[n]; }

◆ offsetTof2() [1/3]

double Tof2PID::offsetTof2 ( int n,
int cntr,
double ptrk,
double ztof,
double m_ph2,
double charge )
protected

Definition at line 153 of file Tof2PID.cxx.

154 {
155 double offset;
156 // double gb = ptrk/xmass(n);
157 double betagamma;
158 switch ( n )
159 {
160
161 case 0: { // Electron
162 offset = 0.0;
163 return offset;
164 }
165
166 case 1: { // Muon
167 offset = 0.0;
168 return offset;
169 }
170
171 case 2: { // Pion
172 betagamma = ptrk / 139.57;
173 break;
174 }
175 case 3: { // Kaon
176 betagamma = ptrk / 493.68;
177 break;
178 }
179
180 case 4: { // Proton
181 betagamma = ptrk / 938.27;
182 break;
183 }
184
185 default: {
186 offset = 0.0;
187 return offset;
188 }
189 break;
190 }
191 z = z / 1000.0;
192 double Q = ph;
193 double beta = betagamma / TMath::Sqrt( 1 + betagamma * betagamma );
194 double Q0 = sampleQ0( betagamma, beta );
195 double func[15] = { 0. };
196 func[0] = 1.;
197 func[1] = 1. / sqrt( Q );
198 func[2] = z / sqrt( Q );
199 func[3] = z * z / sqrt( Q );
200 func[4] = Q;
201 func[5] = Q * Q;
202 func[6] = Q * Q * Q;
203 func[7] = 1. / ( 0.89 * 0.89 + z * z );
204 func[8] = z;
205 func[9] = z * z;
206 func[10] = z * z * z;
207 func[11] = 1. / sqrt( Q0 );
208 func[12] = z / sqrt( Q0 );
209 func[13] = z * z / sqrt( Q0 );
210 func[14] = z * z * z / sqrt( Q0 );
211 offset = 0.;
212 for ( int i = 0; i < 15; i++ ) { offset += m_pars[i] * func[i]; }
213
214 return offset;
215}
double sampleQ0(double betagamma, double beta)
Definition Tof2PID.cxx:257

◆ offsetTof2() [2/3]

double Tof2PID::offsetTof2 ( int n,
int cntr,
double ptrk,
double ztof,
double m_ph2,
double charge )
protected

◆ offsetTof2() [3/3]

double Tof2PID::offsetTof2 ( int n,
int cntr,
double ptrk,
double ztof,
double m_ph2,
double charge )
protected

◆ particleIDCalculation() [1/3]

int Tof2PID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

Definition at line 61 of file Tof2PID.cxx.

61 {
62 int irc = -1;
63 EvtRecTrack* recTrk = PidTrk();
64 if ( !( recTrk->isMdcTrackValid() ) ) return irc;
65 RecMdcTrack* mdcTrk = recTrk->mdcTrack();
66
67 double ptrk = mdcTrk->p();
68 // double cost = cos(mdcTrk->theta());
69 double charge = mdcTrk->charge();
70
71 if ( !( recTrk->isTofTrackValid() ) ) return irc;
72
73#ifndef BEAN
74 SmartRefVector<RecTofTrack> tofTrk = recTrk->tofTrack();
75 SmartRefVector<RecTofTrack>::iterator it; //=tofTrk.begin();
76#else
77 const std::vector<TTofTrack*>& tofTrk = recTrk->tofTrack();
78 std::vector<TTofTrack*>::const_iterator it; //=tofTrk.begin();
79#endif
80
81 TofHitStatus* hitst = new TofHitStatus;
82 std::vector<int> tof2count;
83 int goodtof2trk = 0;
84 for ( it = tofTrk.begin(); it != tofTrk.end(); it++, goodtof2trk++ )
85 {
86 unsigned int st = ( *it )->status();
87 hitst->setStatus( st );
88
89 if ( !( hitst->is_barrel() ) ) continue;
90 if ( !( hitst->is_counter() ) ) continue;
91 if ( hitst->layer() == 2 ) tof2count.push_back( goodtof2trk );
92 }
93 delete hitst;
94
95 if ( tof2count.size() != 1 ) return irc; // not tof2 track or more than 1 tracks
96 it = tofTrk.begin() + tof2count[0];
97 double tof = ( *it )->tof();
98 m_tof2 = tof;
99
100 if ( tof <= 0 ) return irc;
101 // int qual = (*it)->quality();
102 // if(qual != 1) return irc;
103 int cntr = ( *it )->tofID();
104 double path = ( ( *it )->path() ) * 10.0; // the unit from mm to cm
105
106 m_path2 = path;
107 // m_path2 = path;
108 // fix the bugs the 6.0.0, He K.L.
109 // double path = tofTrk->getPath1();
110 //
111 m_ph2 = ( *it )->ph();
112 m_zhit2 = ( ( *it )->zrhit() ) * 10; // the unit from mm to cm
113
114 double beta2 = path * path / velc() / velc() / tof / tof;
115 m_mass2 = ptrk * ptrk * ( 1 / beta2 - 1 );
116 if ( ( m_mass2 > 20 ) || ( m_mass2 < -1 ) ) return irc;
117
118 double chitemp = 99.;
119 double pdftemp = 0;
120 double sig_tmp = ( *it )->sigma( 0 );
121 for ( int i = 0; i < 5; i++ )
122 {
123 m_offset[i] = tof - ( *it )->texp( i ) -
124 ( *it )->toffset( i ); //- offsetTof1(i, cntr, ptrk, m_zhit1, m_ph1,charge);
125 if ( sig_tmp != 0 )
126 {
127 m_sigma[i] = 1.2 * sig_tmp;
128 if ( i < 2 ) m_sigma[i] = sig_tmp;
129 }
130 else m_sigma[i] = sigmaTof2( i, cntr, ptrk, m_zhit2, m_ph2, charge );
131 m_chi[i] = m_offset[i] / m_sigma[i];
132 if ( fabs( m_chi[i] ) < chitemp ) chitemp = fabs( m_chi[i] );
133 double ppp = pdfCalculate( m_chi[i], 1 );
134 if ( fabs( ppp ) > pdftemp ) pdftemp = fabs( ppp );
135 }
136 // if(ptrk<0.65) m_chi[2]=m_chi[3];
137 m_chimin = chitemp;
138 m_pdfmin = pdftemp;
139 if ( pdftemp < pdfCalculate( pdfMinSigmaCut(), 1 ) ) return irc;
140 if ( fabs( m_chimin ) > chiMinCut() ) return irc;
141
142 // calculate prob
143
144 for ( int i = 0; i < 5; i++ ) { m_prob[i] = probCalculate( m_chi[i] * m_chi[i], 1 ); }
145 irc = 0;
146 return irc;
147}
SmartRefVector< RecTofTrack > tofTrack()
double probCalculate(double chi2, int n)
double pdfCalculate(double offset, double sigma)
double sigmaTof2(int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
Definition Tof2PID.cxx:217
void setStatus(unsigned int status)

Referenced by calculate().

◆ particleIDCalculation() [2/3]

int Tof2PID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

◆ particleIDCalculation() [3/3]

int Tof2PID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

◆ path2() [1/3]

double Tof2PID::path2 ( ) const
inline

Definition at line 31 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

31{ return m_path2; }

◆ path2() [2/3]

double Tof2PID::path2 ( ) const
inline

Definition at line 31 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

31{ return m_path2; }

◆ path2() [3/3]

double Tof2PID::path2 ( ) const
inline

Definition at line 31 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

31{ return m_path2; }

◆ ph2() [1/3]

double Tof2PID::ph2 ( ) const
inline

Definition at line 29 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

29{ return m_ph2; }

◆ ph2() [2/3]

double Tof2PID::ph2 ( ) const
inline

Definition at line 29 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

29{ return m_ph2; }

◆ ph2() [3/3]

double Tof2PID::ph2 ( ) const
inline

Definition at line 29 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

29{ return m_ph2; }

◆ prob() [1/3]

double Tof2PID::prob ( int n) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 26 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

26{ return m_prob[n]; }

◆ prob() [2/3]

double Tof2PID::prob ( int n) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 26 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

26{ return m_prob[n]; }

◆ prob() [3/3]

double Tof2PID::prob ( int n) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 26 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

26{ return m_prob[n]; }

◆ sampleQ0() [1/3]

double Tof2PID::sampleQ0 ( double betagamma,
double beta )
protected

Definition at line 257 of file Tof2PID.cxx.

257 {
258 double p1 = 0.261;
259 double p2 = 5.43;
260 double p3 = 1.12;
261 double p4 = 1.96;
262 double p5 = 0.386;
263 double val =
264 p1 / TMath::Power( beta, p4 ) *
265 ( p2 - TMath::Power( beta, p4 ) - TMath::Log( p3 + TMath::Power( 1 / betagamma, p5 ) ) );
266
267 return val * 100.;
268}
double p2[4]
double p1[4]

Referenced by offsetTof2().

◆ sampleQ0() [2/3]

double Tof2PID::sampleQ0 ( double betagamma,
double beta )
protected

◆ sampleQ0() [3/3]

double Tof2PID::sampleQ0 ( double betagamma,
double beta )
protected

◆ sigma() [1/3]

double Tof2PID::sigma ( int n) const
inline

Definition at line 24 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

24{ return m_sigma[n]; }

Referenced by sigmaTof2().

◆ sigma() [2/3]

double Tof2PID::sigma ( int n) const
inline

Definition at line 24 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

24{ return m_sigma[n]; }

◆ sigma() [3/3]

double Tof2PID::sigma ( int n) const
inline

Definition at line 24 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

24{ return m_sigma[n]; }

◆ sigmaTof2() [1/3]

double Tof2PID::sigmaTof2 ( int n,
int cntr,
double ptrk,
double ztof,
double m_ph2,
double charge )
protected

Definition at line 217 of file Tof2PID.cxx.

218 {
219 double sigma;
220 // double gb = ptrk/xmass(n);
221 double cosz = cos( ztof / 1000.0 );
222 // double phtemp=ph;
223 switch ( n )
224 {
225
226 case 0: { // Electron
227 sigma = 0.115816 - 0.0933215 * cosz + 0.0788252 * cosz * cosz;
228 break;
229 }
230
231 case 1: { // Muon
232 sigma = 0.121536 - 0.0935898 * cosz + 0.0748771 * cosz * cosz;
233 break;
234 }
235
236 case 2: { // Pion
237 sigma = 0.106882 - 0.0147375 * cosz + 0.027491 * cosz * cosz;
238 break;
239 }
240 case 3: { // Kaon
241 sigma = 0.106882 - 0.0147375 * cosz + 0.027491 * cosz * cosz;
242 break;
243 }
244
245 case 4: { // Proton
246 sigma = 0.168489 - 0.131762 * cosz + 0.105708 * cosz * cosz;
247 break;
248 }
249
250 default: sigma = 0.100; break;
251 }
252 sigma = 0.110;
253 // sigma = 1.0;
254 return sigma;
255}

Referenced by particleIDCalculation().

◆ sigmaTof2() [2/3]

double Tof2PID::sigmaTof2 ( int n,
int cntr,
double ptrk,
double ztof,
double m_ph2,
double charge )
protected

◆ sigmaTof2() [3/3]

double Tof2PID::sigmaTof2 ( int n,
int cntr,
double ptrk,
double ztof,
double m_ph2,
double charge )
protected

◆ tof2() [1/3]

double Tof2PID::tof2 ( ) const
inline

Definition at line 32 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

32{ return m_tof2; }

◆ tof2() [2/3]

double Tof2PID::tof2 ( ) const
inline

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

32{ return m_tof2; }

◆ tof2() [3/3]

double Tof2PID::tof2 ( ) const
inline

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

32{ return m_tof2; }

◆ zhit2() [1/3]

double Tof2PID::zhit2 ( ) const
inline

Definition at line 30 of file Analysis/ParticleID/include/ParticleID/Tof2PID.h.

30{ return m_zhit2; }

◆ zhit2() [2/3]

double Tof2PID::zhit2 ( ) const
inline

Definition at line 30 of file InstallArea/x86_64-el9-gcc13-dbg/include/ParticleID/Tof2PID.h.

30{ return m_zhit2; }

◆ zhit2() [3/3]

double Tof2PID::zhit2 ( ) const
inline

Definition at line 30 of file InstallArea/x86_64-el9-gcc13-opt/include/ParticleID/Tof2PID.h.

30{ return m_zhit2; }

The documentation for this class was generated from the following files: