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

#include <ParticleID.h>

Inheritance diagram for ParticleID:

Public Member Functions

 ~ParticleID ()
void init ()
bool IsDedxInfoValid () const
bool IsTofInfoValid () const
bool IsTofEInfoValid () const
bool IsTofQInfoValid () const
bool IsTofCInfoValid () const
bool IsTofCorrInfoValid () const
bool IsEmcInfoValid () const
bool IsMucInfoValid () const
double chiDedx (int n) const
double chiTof (int n) const
double chiTof1 (int n) const
double chiTof2 (int n) const
double chiTofE (int n) const
double chiTofQ (int n) const
double chiTofC (int n) const
double chiTofCorr (int n) const
double chiEmc (int n) const
double chiMuc (int n) const
double probDedx (int n) const
double probTof (int n) const
double probTofE (int n) const
double probTofQ (int n) const
double probTofC (int n) const
double probTofCorr (int n) const
double probEmc (int n) const
double probMuc (int n) const
double pdfDedx (int n)
double pdfTof (int n)
double pdfTofE (int n)
double pdfTofQ (int n)
double pdfTofC (int n)
double pdfTofCorr (int n)
double pdfEmc (int n)
double pdfMuc (int n)
int getNhitCut () const
void setNhitCut (const int nhitcuth=5)
void setMethod (const int method)
void usePidSys (const int pidsys)
void identify (const int pidcase)
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double prob (int n) const
int ndof () const
double pdf (int n) const
double lhf (int n) const
double probElectron () const
double probMuon () const
double probPion () const
double probKaon () const
double probProton () const
int discard () const
double pdfElectron () const
double pdfMuon () const
double pdfPion () const
double pdfKaon () const
double pdfProton () const
int neuronStat () const
double neuronVal () const
int ipmt ()
double dt (int ipar, int ipmt)
double dtCorr (int ipar, int ipmt)
double sigCorr (int ipar, int ipmt)
double chiCorr (int ipar, int ipmt)
double offset (int ipar)
double sigma (int ipar)
 ~ParticleID ()
void init ()
bool IsDedxInfoValid () const
bool IsTofInfoValid () const
bool IsTofEInfoValid () const
bool IsTofQInfoValid () const
bool IsTofCInfoValid () const
bool IsTofCorrInfoValid () const
bool IsEmcInfoValid () const
bool IsMucInfoValid () const
double chiDedx (int n) const
double chiTof (int n) const
double chiTof1 (int n) const
double chiTof2 (int n) const
double chiTofE (int n) const
double chiTofQ (int n) const
double chiTofC (int n) const
double chiTofCorr (int n) const
double chiEmc (int n) const
double chiMuc (int n) const
double probDedx (int n) const
double probTof (int n) const
double probTofE (int n) const
double probTofQ (int n) const
double probTofC (int n) const
double probTofCorr (int n) const
double probEmc (int n) const
double probMuc (int n) const
double pdfDedx (int n)
double pdfTof (int n)
double pdfTofE (int n)
double pdfTofQ (int n)
double pdfTofC (int n)
double pdfTofCorr (int n)
double pdfEmc (int n)
double pdfMuc (int n)
int getNhitCut () const
void setNhitCut (const int nhitcuth=5)
void setMethod (const int method)
void usePidSys (const int pidsys)
void identify (const int pidcase)
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double prob (int n) const
int ndof () const
double pdf (int n) const
double lhf (int n) const
double probElectron () const
double probMuon () const
double probPion () const
double probKaon () const
double probProton () const
int discard () const
double pdfElectron () const
double pdfMuon () const
double pdfPion () const
double pdfKaon () const
double pdfProton () const
int neuronStat () const
double neuronVal () const
int ipmt ()
double dt (int ipar, int ipmt)
double dtCorr (int ipar, int ipmt)
double sigCorr (int ipar, int ipmt)
double chiCorr (int ipar, int ipmt)
double offset (int ipar)
double sigma (int ipar)
 ~ParticleID ()
void init ()
bool IsDedxInfoValid () const
bool IsTofInfoValid () const
bool IsTofEInfoValid () const
bool IsTofQInfoValid () const
bool IsTofCInfoValid () const
bool IsTofCorrInfoValid () const
bool IsEmcInfoValid () const
bool IsMucInfoValid () const
double chiDedx (int n) const
double chiTof (int n) const
double chiTof1 (int n) const
double chiTof2 (int n) const
double chiTofE (int n) const
double chiTofQ (int n) const
double chiTofC (int n) const
double chiTofCorr (int n) const
double chiEmc (int n) const
double chiMuc (int n) const
double probDedx (int n) const
double probTof (int n) const
double probTofE (int n) const
double probTofQ (int n) const
double probTofC (int n) const
double probTofCorr (int n) const
double probEmc (int n) const
double probMuc (int n) const
double pdfDedx (int n)
double pdfTof (int n)
double pdfTofE (int n)
double pdfTofQ (int n)
double pdfTofC (int n)
double pdfTofCorr (int n)
double pdfEmc (int n)
double pdfMuc (int n)
int getNhitCut () const
void setNhitCut (const int nhitcuth=5)
void setMethod (const int method)
void usePidSys (const int pidsys)
void identify (const int pidcase)
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double prob (int n) const
int ndof () const
double pdf (int n) const
double lhf (int n) const
double probElectron () const
double probMuon () const
double probPion () const
double probKaon () const
double probProton () const
int discard () const
double pdfElectron () const
double pdfMuon () const
double pdfPion () const
double pdfKaon () const
double pdfProton () const
int neuronStat () const
double neuronVal () const
int ipmt ()
double dt (int ipar, int ipmt)
double dtCorr (int ipar, int ipmt)
double sigCorr (int ipar, int ipmt)
double chiCorr (int ipar, int ipmt)
double offset (int ipar)
double sigma (int ipar)
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 ParticleIDinstance ()
static ParticleIDinstance ()
static ParticleIDinstance ()

Protected Member Functions

int particleIDCalculation ()
int LikelihoodCalculation ()
int neuronPIDCalculation ()
int particleIDCalculation ()
int LikelihoodCalculation ()
int neuronPIDCalculation ()
int particleIDCalculation ()
int LikelihoodCalculation ()
int neuronPIDCalculation ()

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ ~ParticleID() [1/3]

ParticleID::~ParticleID ( )

Definition at line 88 of file ParticleID.cxx.

88 {
89 // if(m_dedxpid) delete m_dedxpid;
90 // if(m_tof1pid) delete m_tof1pid;
91 // if(m_tof2pid) delete m_tof2pid;
92 // if(m_tofepid) delete m_tofepid;
93 // if(m_tofqpid) delete m_tofqpid;
94 // if(m_emcpid) delete m_emcpid;
95}

◆ ~ParticleID() [2/3]

ParticleID::~ParticleID ( )

◆ ~ParticleID() [3/3]

ParticleID::~ParticleID ( )

Member Function Documentation

◆ calculate() [1/3]

void ParticleID::calculate ( )
virtual

Implements ParticleIDBase.

Definition at line 97 of file ParticleID.cxx.

97 {
98#ifdef BEAN
99 cout << " please use ParticleID::calculate(run) ! " << endl;
100 exit( 1 );
101}
102
103void ParticleID::calculate( int run ) {
104#endif
105 int nhitcutpid = getNhitCut();
106
107#ifndef BEAN
108 IDataProviderSvc* m_eventSvc;
109 Gaudi::svcLocator()->service( "EventDataSvc", m_eventSvc, true );
110
111 SmartDataPtr<Event::EventHeader> eventHeaderpid( m_eventSvc, "/Event/EventHeader" );
112 int runpid = eventHeaderpid->runNumber();
113 int eventpid = eventHeaderpid->eventNumber();
114 // cout<<"runpid="<<runpid<<endl;
115 // cout<<"eventpid="<<eventpid<<endl;
116#else
117 int runpid = run;
118#endif
119
120 EvtRecTrack* recTrk = PidTrk();
121 // int runnum=getRunNo();
122 // cout<<"runnum="<<runnum<<endl;
123 // if user did not specify sub sys, sepcify the default value
124 if ( m_pidsys == 0 )
125 {
126 m_pidsys = useDedx() | useTof() | useTofE() | useEmc() | useMuc() | useTofQ() | useTofC() |
127 useTofCorr();
128 }
129 // if user did not set the seperate case, set the default value
130
131 if ( m_pidcase == 0 ) { m_pidcase = all(); }
132 // dedx sys
133 if ( IsDedxInfoUsed() )
134 {
135 if ( !m_dedxpid ) m_dedxpid = DedxPID::instance();
136 m_dedxpid->init();
137 m_dedxpid->setRunNo( runpid );
138 m_dedxpid->setNhitCutDx( nhitcutpid );
139 m_dedxpid->setRecTrack( recTrk );
140 m_dedxpid->setChiMinCut( chiMinCut() );
141 m_dedxpid->setPdfMinSigmaCut( pdfMinSigmaCut() );
142 m_dedxpid->calculate();
143 }
144
145 // tof1 and tof2 sys
146 if ( IsTofInfoUsed() | IsTof1InfoUsed() | IsTof2InfoUsed() | IsTofCInfoUsed() )
147 {
148 if ( IsTofCInfoUsed() )
149 {
150 if ( !m_tofcpid ) m_tofcpid = TofCPID::instance();
151 m_tofcpid->init();
152 m_tofcpid->setRunNo( runpid );
153 m_tofcpid->setRecTrack( recTrk );
154 m_tofcpid->setChiMinCut( chiMinCut() );
155 m_tofcpid->setPdfMinSigmaCut( pdfMinSigmaCut() );
156 m_tofcpid->calculate();
157 }
158 else
159 {
160 if ( !m_tofpid ) m_tofpid = TofPID::instance();
161 m_tofpid->init();
162 m_tofpid->setRecTrack( recTrk );
163 m_tofpid->setChiMinCut( chiMinCut() );
164 m_tofpid->setPdfMinSigmaCut( pdfMinSigmaCut() );
165 m_tofpid->calculate();
166 }
167 }
168
169 // tof secondary correction sys
170 if ( IsTofCorrInfoUsed() )
171 {
172 if ( !m_tofcorrpid ) m_tofcorrpid = TofCorrPID::instance();
173 m_tofcorrpid->setRunNo( runpid );
174 m_tofcorrpid->init();
175 m_tofcorrpid->setRecTrack( recTrk );
176 m_tofcorrpid->setChiMinCut( chiMinCut() );
177 m_tofcorrpid->setChiMaxCut( chiMaxCut() );
178 m_tofcorrpid->setPdfMinSigmaCut( pdfMinSigmaCut() );
179 m_tofcorrpid->calculate();
180 }
181
182 /*
183 // tof1 sys
184 if(IsTof1InfoUsed()){
185 if(!m_tof1pid) m_tof1pid = Tof1PID::instance();
186 m_tof1pid->init();
187 m_tof1pid->setRecTrack(recTrk);
188 m_tof1pid->setChiMinCut(4);
189 m_tof1pid->setPdfMinSigmaCut(4);
190 m_tof1pid->calculate();
191 }
192
193 // tof2 sys
194 if(IsTof2InfoUsed()){
195 if(!m_tof2pid) m_tof2pid = Tof2PID::instance();
196 m_tof2pid->init();
197 m_tof2pid->setRecTrack(recTrk);
198 m_tof2pid->setChiMinCut(4);
199 m_tof2pid->setPdfMinSigmaCut(4);
200 m_tof2pid->calculate();
201 }
202
203 */
204 // tofq sys
205 if ( IsTofQInfoUsed() )
206 {
207 if ( !m_tofqpid ) m_tofqpid = TofQPID::instance();
208 m_tofqpid->init();
209 m_tofqpid->setRecTrack( recTrk );
210 m_tofqpid->setChiMinCut( chiMinCut() );
211 m_tofqpid->calculate();
212 }
213
214 // endcap tof sys
215 if ( IsTofEInfoUsed() && ( !IsTofCorrInfoUsed() ) )
216 {
217 if ( !m_tofepid ) m_tofepid = TofEPID::instance();
218 m_tofepid->init();
219 m_tofepid->setRecTrack( recTrk );
220 m_tofepid->setChiMinCut( chiMinCut() );
221 m_tofepid->setPdfMinSigmaCut( pdfMinSigmaCut() );
222 m_tofepid->calculate();
223 }
224 // emc sys
225 if ( IsEmcInfoUsed() )
226 {
227 if ( !m_emcpid ) m_emcpid = EmcPID::instance();
228 m_emcpid->init();
229 m_emcpid->setRecTrack( recTrk );
230 m_emcpid->setChiMinCut( chiMinCut() );
231 m_emcpid->calculate();
232 }
233
234 // muc sys
235 if ( IsMucInfoUsed() )
236 {
237 if ( !m_mucpid ) m_mucpid = MucPID::instance();
238 m_mucpid->init();
239 m_mucpid->setRecTrack( recTrk );
240 m_mucpid->setChiMinCut( chiMinCut() );
241 m_mucpid->calculate();
242 }
243 // probability method
244 if ( ( m_method & methodProbability() ) == methodProbability() )
245 if ( particleIDCalculation() < 0 ) m_ndof = 0;
246 // std::cout<<"m_ndof="<<m_ndof<<std::endl;
247
248 // likelihood method
249 if ( ( m_method & methodLikelihood() ) == methodLikelihood() )
250 if ( LikelihoodCalculation() < 0 ) m_discard = 0;
251 // neuron network
252 if ( ( m_method & methodNeuronNetwork() ) == methodNeuronNetwork() )
253 // m_neuronPid = neuronPIDCalculation();
254 if ( LikelihoodCalculation() < 0 ) m_discard = 0;
255}
static DedxPID * instance()
Definition DedxPID.cxx:17
static EmcPID * instance()
Definition EmcPID.cxx:22
static MucPID * instance()
Definition MucPID.cxx:22
int LikelihoodCalculation()
int particleIDCalculation()
void calculate()
static TofCPID * instance()
Definition TofCPID.cxx:18
static TofCorrPID * instance()
static TofEPID * instance()
Definition TofEPID.cxx:16
static TofPID * instance()
Definition TofPID.cxx:14
static TofQPID * instance()
Definition TofQPID.cxx:13

Referenced by BeamParams::execute(), DQAJpsi2PPbarAlg::execute(), DQAKsKpi::execute(), DQAKsKpiDEDX::execute(), DQAPi2p2::execute(), DQARhopi::execute(), DQASelBhabha::execute(), DQASelDimu::execute(), DQASelHadron::execute(), DTagSetAlg::execute(), Gam4pikp::execute(), inclks::execute(), inclkstar::execute(), incllambda::execute(), inclphi::execute(), KsKpi::execute(), LTagSetAlg::execute(), PPbar::execute(), Rhopi::execute(), Single::execute(), TagSetAlg::execute(), ValidJpsiRhopi::execute(), ValidPhyJPsill::execute(), XYZTagSetAlg::execute(), LocalKaonSelector::operator()(), LocalLambdaSelector::operator()(), LocalPionSelector::operator()(), and LocalProtonSelector::operator()().

◆ calculate() [2/3]

void ParticleID::calculate ( )
virtual

Implements ParticleIDBase.

◆ calculate() [3/3]

void ParticleID::calculate ( )
virtual

Implements ParticleIDBase.

◆ chi() [1/3]

double ParticleID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 111 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

111{ return m_chisq[n]; }
const Int_t n

◆ chi() [2/3]

double ParticleID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

111{ return m_chisq[n]; }

◆ chi() [3/3]

double ParticleID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

111{ return m_chisq[n]; }

◆ chiCorr() [1/3]

double ParticleID::chiCorr ( int ipar,
int ipmt )
inline

Definition at line 155 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

155{ return m_tofcorrpid->chiCorr( ipar, ipmt ); }

◆ chiCorr() [2/3]

double ParticleID::chiCorr ( int ipar,
int ipmt )
inline

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

155{ return m_tofcorrpid->chiCorr( ipar, ipmt ); }

◆ chiCorr() [3/3]

double ParticleID::chiCorr ( int ipar,
int ipmt )
inline

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

155{ return m_tofcorrpid->chiCorr( ipar, ipmt ); }

◆ chiDedx() [1/3]

◆ chiDedx() [2/3]

double ParticleID::chiDedx ( int n) const
inline

◆ chiDedx() [3/3]

double ParticleID::chiDedx ( int n) const
inline

◆ chiEmc() [1/3]

double ParticleID::chiEmc ( int n) const
inline

Referenced by particleIDCalculation().

◆ chiEmc() [2/3]

double ParticleID::chiEmc ( int n) const
inline

◆ chiEmc() [3/3]

double ParticleID::chiEmc ( int n) const
inline

◆ chiMuc() [1/3]

double ParticleID::chiMuc ( int n) const
inline

Referenced by particleIDCalculation().

◆ chiMuc() [2/3]

double ParticleID::chiMuc ( int n) const
inline

◆ chiMuc() [3/3]

double ParticleID::chiMuc ( int n) const
inline

◆ chiTof() [1/3]

double ParticleID::chiTof ( int n) const
inline

◆ chiTof() [2/3]

double ParticleID::chiTof ( int n) const
inline

◆ chiTof() [3/3]

double ParticleID::chiTof ( int n) const
inline

◆ chiTof1() [1/3]

◆ chiTof1() [2/3]

double ParticleID::chiTof1 ( int n) const
inline

◆ chiTof1() [3/3]

double ParticleID::chiTof1 ( int n) const
inline

◆ chiTof2() [1/3]

◆ chiTof2() [2/3]

double ParticleID::chiTof2 ( int n) const
inline

◆ chiTof2() [3/3]

double ParticleID::chiTof2 ( int n) const
inline

◆ chiTofC() [1/3]

double ParticleID::chiTofC ( int n) const
inline

Referenced by particleIDCalculation().

◆ chiTofC() [2/3]

double ParticleID::chiTofC ( int n) const
inline

◆ chiTofC() [3/3]

double ParticleID::chiTofC ( int n) const
inline

◆ chiTofCorr() [1/3]

double ParticleID::chiTofCorr ( int n) const
inline

◆ chiTofCorr() [2/3]

double ParticleID::chiTofCorr ( int n) const
inline

◆ chiTofCorr() [3/3]

double ParticleID::chiTofCorr ( int n) const
inline

◆ chiTofE() [1/3]

double ParticleID::chiTofE ( int n) const
inline

◆ chiTofE() [2/3]

double ParticleID::chiTofE ( int n) const
inline

◆ chiTofE() [3/3]

double ParticleID::chiTofE ( int n) const
inline

◆ chiTofQ() [1/3]

double ParticleID::chiTofQ ( int n) const
inline

◆ chiTofQ() [2/3]

double ParticleID::chiTofQ ( int n) const
inline

◆ chiTofQ() [3/3]

double ParticleID::chiTofQ ( int n) const
inline

◆ discard() [1/3]

int ParticleID::discard ( ) const
inline

Definition at line 124 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

124{ return m_discard; }

◆ discard() [2/3]

int ParticleID::discard ( ) const
inline

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

124{ return m_discard; }

◆ discard() [3/3]

int ParticleID::discard ( ) const
inline

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

124{ return m_discard; }

◆ dt() [1/3]

double ParticleID::dt ( int ipar,
int ipmt )
inline

Definition at line 152 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

152{ return m_tofcorrpid->dt( ipar, ipmt ); }

◆ dt() [2/3]

double ParticleID::dt ( int ipar,
int ipmt )
inline

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

152{ return m_tofcorrpid->dt( ipar, ipmt ); }

◆ dt() [3/3]

double ParticleID::dt ( int ipar,
int ipmt )
inline

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

152{ return m_tofcorrpid->dt( ipar, ipmt ); }

◆ dtCorr() [1/3]

double ParticleID::dtCorr ( int ipar,
int ipmt )
inline

Definition at line 153 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

153{ return m_tofcorrpid->dtCorr( ipar, ipmt ); }

◆ dtCorr() [2/3]

double ParticleID::dtCorr ( int ipar,
int ipmt )
inline

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

153{ return m_tofcorrpid->dtCorr( ipar, ipmt ); }

◆ dtCorr() [3/3]

double ParticleID::dtCorr ( int ipar,
int ipmt )
inline

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

153{ return m_tofcorrpid->dtCorr( ipar, ipmt ); }

◆ getNhitCut() [1/3]

int ParticleID::getNhitCut ( ) const
inline

Definition at line 86 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

86{ return m_nhitcut; }

◆ getNhitCut() [2/3]

int ParticleID::getNhitCut ( ) const
inline

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

86{ return m_nhitcut; }

◆ getNhitCut() [3/3]

int ParticleID::getNhitCut ( ) const
inline

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

86{ return m_nhitcut; }

◆ identify() [1/3]

◆ identify() [2/3]

void ParticleID::identify ( const int pidcase)
inline

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

101{ m_pidcase = ( m_pidcase | pidcase ); }

◆ identify() [3/3]

void ParticleID::identify ( const int pidcase)
inline

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

101{ m_pidcase = ( m_pidcase | pidcase ); }

◆ init() [1/3]

void ParticleID::init ( )
virtual

Implements ParticleIDBase.

Definition at line 26 of file ParticleID.cxx.

26 {
27
28 if ( IsDedxInfoUsed() )
29 {
30 if ( !m_dedxpid ) m_dedxpid = DedxPID::instance();
31 m_dedxpid->init();
32 }
33
34 if ( IsTofInfoUsed() | IsTof1InfoUsed() | IsTof2InfoUsed() )
35 {
36 if ( !m_tofpid ) m_tofpid = TofPID::instance();
37 m_tofpid->init();
38 }
39
40 if ( IsTofCorrInfoUsed() )
41 {
42 if ( !m_tofcorrpid ) m_tofcorrpid = TofCorrPID::instance();
43 // m_tofcorrpid->init();
44 }
45
46 if ( IsEmcInfoUsed() )
47 {
48 if ( !m_emcpid ) m_emcpid = EmcPID::instance();
49 m_emcpid->init();
50 }
51
52 if ( IsMucInfoUsed() )
53 {
54 if ( !m_mucpid ) m_mucpid = MucPID::instance();
55 m_mucpid->init();
56 }
57
58 // global info.
59 m_pidsys = 0;
60 m_pidcase = 0;
61 m_method = 0;
62 m_TotalLikelihood = 0;
63 m_discard = 1;
64 // probability
65 m_ndof = 0;
66 m_nhitcut = 5;
67 // chi cut
68 setChiMinCut( 4.0 );
69 setChiMaxCut( 6.0 );
70 for ( int i = 0; i < 5; i++ )
71 {
72 m_chisq[i] = 9999.;
73 m_prob[i] = -1.0;
74 }
75}

Referenced by BeamParams::execute(), DQAJpsi2PPbarAlg::execute(), DQAKsKpi::execute(), DQAKsKpiDEDX::execute(), DQAPi2p2::execute(), DQARhopi::execute(), DQASelBhabha::execute(), DQASelDimu::execute(), DQASelHadron::execute(), DTagSetAlg::execute(), Gam4pikp::execute(), inclks::execute(), inclkstar::execute(), incllambda::execute(), inclphi::execute(), KsKpi::execute(), LTagSetAlg::execute(), PPbar::execute(), Rhopi::execute(), Single::execute(), TagSetAlg::execute(), ValidJpsiRhopi::execute(), ValidPhyJPsill::execute(), XYZTagSetAlg::execute(), LocalKaonSelector::operator()(), LocalLambdaSelector::operator()(), LocalPionSelector::operator()(), and LocalProtonSelector::operator()().

◆ init() [2/3]

void ParticleID::init ( )
virtual

Implements ParticleIDBase.

◆ init() [3/3]

void ParticleID::init ( )
virtual

Implements ParticleIDBase.

◆ instance() [1/3]

◆ instance() [2/3]

ParticleID * ParticleID::instance ( )
static

◆ instance() [3/3]

ParticleID * ParticleID::instance ( )
static

◆ ipmt() [1/3]

int ParticleID::ipmt ( )
inline

Definition at line 151 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

151{ return m_tofcorrpid->ipmt(); }

Referenced by chiCorr(), dt(), dtCorr(), and sigCorr().

◆ ipmt() [2/3]

int ParticleID::ipmt ( )
inline

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

151{ return m_tofcorrpid->ipmt(); }

◆ ipmt() [3/3]

int ParticleID::ipmt ( )
inline

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

151{ return m_tofcorrpid->ipmt(); }

◆ IsDedxInfoValid() [1/3]

bool ParticleID::IsDedxInfoValid ( ) const
inline

◆ IsDedxInfoValid() [2/3]

bool ParticleID::IsDedxInfoValid ( ) const
inline

◆ IsDedxInfoValid() [3/3]

bool ParticleID::IsDedxInfoValid ( ) const
inline

◆ IsEmcInfoValid() [1/3]

bool ParticleID::IsEmcInfoValid ( ) const
inline

◆ IsEmcInfoValid() [2/3]

bool ParticleID::IsEmcInfoValid ( ) const
inline

◆ IsEmcInfoValid() [3/3]

bool ParticleID::IsEmcInfoValid ( ) const
inline

◆ IsMucInfoValid() [1/3]

bool ParticleID::IsMucInfoValid ( ) const
inline

◆ IsMucInfoValid() [2/3]

bool ParticleID::IsMucInfoValid ( ) const
inline

◆ IsMucInfoValid() [3/3]

bool ParticleID::IsMucInfoValid ( ) const
inline

◆ IsPidInfoValid() [1/3]

◆ IsPidInfoValid() [2/3]

bool ParticleID::IsPidInfoValid ( ) const
inlinevirtual

Implements ParticleIDBase.

◆ IsPidInfoValid() [3/3]

bool ParticleID::IsPidInfoValid ( ) const
inlinevirtual

Implements ParticleIDBase.

◆ IsTofCInfoValid() [1/3]

bool ParticleID::IsTofCInfoValid ( ) const
inline

◆ IsTofCInfoValid() [2/3]

bool ParticleID::IsTofCInfoValid ( ) const
inline

◆ IsTofCInfoValid() [3/3]

bool ParticleID::IsTofCInfoValid ( ) const
inline

◆ IsTofCorrInfoValid() [1/3]

bool ParticleID::IsTofCorrInfoValid ( ) const
inline

◆ IsTofCorrInfoValid() [2/3]

bool ParticleID::IsTofCorrInfoValid ( ) const
inline

◆ IsTofCorrInfoValid() [3/3]

bool ParticleID::IsTofCorrInfoValid ( ) const
inline

◆ IsTofEInfoValid() [1/3]

bool ParticleID::IsTofEInfoValid ( ) const
inline

◆ IsTofEInfoValid() [2/3]

bool ParticleID::IsTofEInfoValid ( ) const
inline

◆ IsTofEInfoValid() [3/3]

bool ParticleID::IsTofEInfoValid ( ) const
inline

◆ IsTofInfoValid() [1/3]

bool ParticleID::IsTofInfoValid ( ) const
inline

◆ IsTofInfoValid() [2/3]

bool ParticleID::IsTofInfoValid ( ) const
inline

◆ IsTofInfoValid() [3/3]

bool ParticleID::IsTofInfoValid ( ) const
inline

◆ IsTofQInfoValid() [1/3]

bool ParticleID::IsTofQInfoValid ( ) const
inline

◆ IsTofQInfoValid() [2/3]

bool ParticleID::IsTofQInfoValid ( ) const
inline

◆ IsTofQInfoValid() [3/3]

bool ParticleID::IsTofQInfoValid ( ) const
inline

◆ lhf() [1/3]

double ParticleID::lhf ( int n) const
inline

Definition at line 117 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

117{ return m_likelihoodfraction[n]; }

Referenced by neuronVal().

◆ lhf() [2/3]

double ParticleID::lhf ( int n) const
inline

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

117{ return m_likelihoodfraction[n]; }

◆ lhf() [3/3]

double ParticleID::lhf ( int n) const
inline

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

117{ return m_likelihoodfraction[n]; }

◆ LikelihoodCalculation() [1/3]

int ParticleID::LikelihoodCalculation ( )
protectedvirtual

Implements ParticleIDBase.

Definition at line 456 of file ParticleID.cxx.

456 {
457 int irc = -1;
458
459 bool valid = IsDedxInfoValid() || IsTofInfoValid() || IsTofEInfoValid() ||
462 if ( !valid ) return irc;
463 double pdf[5];
464 bool pidcase[5];
465 for ( int i = 0; i < 5; i++ )
466 {
467 pdf[i] = 1;
468 pidcase[i] = false;
469 }
470
471 if ( ( m_pidcase & onlyElectron() ) == onlyElectron() ) pidcase[0] = true;
472 if ( ( m_pidcase & onlyMuon() ) == onlyMuon() ) pidcase[1] = true;
473 if ( ( m_pidcase & onlyPion() ) == onlyPion() ) pidcase[2] = true;
474 if ( ( m_pidcase & onlyKaon() ) == onlyKaon() ) pidcase[3] = true;
475 if ( ( m_pidcase & onlyProton() ) == onlyProton() ) pidcase[4] = true;
476
477 for ( int i = 0; i < 5; i++ )
478 {
479 if ( pidcase[i] == 0 ) pdf[i] = 0;
480 }
481
482 //
483 // dEdx PID
484 //
485 if ( IsDedxInfoUsed() )
486 {
487 if ( IsDedxInfoValid() )
488 {
489 bool okpid = false;
490 for ( int i = 0; i < 5; i++ )
491 {
492 if ( pidcase[i] && pdfCalculate( chiDedx( i ), 1 ) >
493 pdfCalculate( m_dedxpid->pdfMinSigmaCut(), 1.5 ) )
494 if ( !okpid ) okpid = true;
495 }
496 if ( okpid )
497 {
498 m_ndof++;
499 for ( int i = 0; i < 5; i++ ) { pdf[i] *= pdfDedx( i ); }
500 }
501 } // dE/dx
502 }
503
504 //
505 // Barrel TOF
506 //
507 if ( IsTofInfoUsed() | IsTof1InfoUsed() | IsTof2InfoUsed() | IsTofCInfoUsed() )
508 {
509 if ( IsTofCInfoUsed() )
510 {
511
512 if ( IsTofCInfoValid() )
513 {
514 bool okpid = false;
515 for ( int i = 0; i < 5; i++ )
516 {
517 if ( pidcase[i] && pdfCalculate( chiTof( i ), 1 ) >
518 pdfCalculate( m_tofcpid->pdfMinSigmaCut(), 1.5 ) )
519 if ( !okpid ) okpid = true;
520 }
521 if ( okpid )
522 {
523 m_ndof++;
524 for ( int i = 0; i < 5; i++ ) { pdf[i] *= pdfTofC( i ); }
525 }
526 } // TOF
527 }
528
529 else
530 {
531 if ( IsTofInfoValid() )
532 {
533 bool okpid = false;
534 for ( int i = 0; i < 5; i++ )
535 {
536 if ( pidcase[i] && pdfCalculate( chiTof( i ), 1 ) >
537 pdfCalculate( m_tofpid->pdfMinSigmaCut(), 1.5 ) )
538 if ( !okpid ) okpid = true;
539 }
540 if ( okpid )
541 {
542 m_ndof++;
543 for ( int i = 0; i < 5; i++ ) { pdf[i] *= pdfTof( i ); }
544 }
545 } // TOF
546
547 //
548 // EndCap Tof
549 //
550
551 if ( IsTofEInfoUsed() )
552 {
553 if ( IsTofEInfoValid() )
554 {
555 bool okpid = false;
556 for ( int i = 0; i < 5; i++ )
557 {
558 if ( pidcase[i] && pdfCalculate( chiTofE( i ), 1 ) >
559 pdfCalculate( m_tofepid->pdfMinSigmaCut(), 1.5 ) )
560 if ( !okpid ) okpid = true;
561 }
562 if ( okpid )
563 {
564 // m_ndof++;
565 // for(int i = 0; i < 5; i++) pdf[i] *= pdfTofE(i);
566 }
567 } // EndCap TOF
568 }
569 }
570 }
571
572 // Secondary TOF correction
573 if ( IsTofCorrInfoUsed() )
574 {
575 if ( IsTofCorrInfoValid() )
576 {
577 bool okpid = false;
578 for ( int i = 0; i < 5; i++ )
579 {
580 if ( pidcase[i] && pdfCalculate( chiTofCorr( i ), 1 ) >
581 pdfCalculate( m_tofcorrpid->pdfMinSigmaCut(), 1.5 ) )
582 if ( !okpid ) okpid = true;
583 }
584 if ( okpid )
585 {
586 m_ndof++;
587 for ( int i = 0; i < 5; i++ ) { pdf[i] *= pdfTofCorr( i ); }
588 }
589 }
590 }
591
592 //
593 // Barrel TOF Q
594 //
595
596 if ( IsTofQInfoValid() )
597 {
598 bool okpid = false;
599 for ( int i = 0; i < 5; i++ )
600 {
601 if ( pidcase[i] )
602 if ( !okpid ) okpid = true;
603 }
604 if ( okpid )
605 {
606 // m_ndof++;
607 for ( int i = 0; i < 5; i++ ) pdf[i] *= pdfTofQ( i );
608 }
609 } // TofQ
610
611 //
612 // Emc PID
613 //
614 if ( IsEmcInfoUsed() )
615 {
616 if ( IsEmcInfoValid() )
617 {
618 bool okpid = false;
619 for ( int i = 0; i < 5; i++ )
620 {
621 if ( pidcase[i] && pdfEmc( i ) > 0 )
622 if ( !okpid ) okpid = true;
623 }
624 if ( okpid )
625 {
626 m_ndof++;
627 for ( int i = 0; i < 5; i++ ) { pdf[i] *= pdfEmc( i ); }
628 } // Emc Pid
629 }
630 }
631 if ( IsMucInfoUsed() )
632 {
633 if ( IsMucInfoValid() )
634 {
635 bool okpid = false;
636 for ( int i = 0; i < 5; i++ )
637 {
638 if ( pidcase[i] && pdfMuc( i ) > 0 )
639 if ( !okpid ) okpid = true;
640 }
641 if ( okpid )
642 {
643 m_ndof++;
644 for ( int i = 0; i < 5; i++ ) { pdf[i] *= pdfMuc( i ); }
645 }
646 } // Emc Pid
647 }
648
649 if ( m_ndof <= 0 ) return irc;
650 for ( int i = 0; i < 5; i++ )
651 {
652 m_pdf[i] = pdf[i];
653 m_TotalLikelihood += pdf[i];
654 }
655 for ( int i = 0; i < 5; i++ ) { m_likelihoodfraction[i] = pdf[i] / m_TotalLikelihood; }
656
657 irc = 0;
658 return irc;
659}
double pdfCalculate(double offset, double sigma)
double pdfEmc(int n)
double pdfTofC(int n)
bool IsTofEInfoValid() const
bool IsEmcInfoValid() const
double pdfDedx(int n)
double chiTofE(int n) const
bool IsTofCorrInfoValid() const
bool IsTofCInfoValid() const
bool IsTofInfoValid() const
double pdfTof(int n)
bool IsTofQInfoValid() const
bool IsDedxInfoValid() const
double pdfMuc(int n)
double pdfTofCorr(int n)
bool IsMucInfoValid() const
double chiTof(int n) const
double pdfTofQ(int n)
double chiTofCorr(int n) const
double chiDedx(int n) const

◆ LikelihoodCalculation() [2/3]

int ParticleID::LikelihoodCalculation ( )
protectedvirtual

Implements ParticleIDBase.

◆ LikelihoodCalculation() [3/3]

int ParticleID::LikelihoodCalculation ( )
protectedvirtual

Implements ParticleIDBase.

◆ ndof() [1/3]

int ParticleID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

Definition at line 113 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

113{ return m_ndof; }

◆ ndof() [2/3]

int ParticleID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

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

113{ return m_ndof; }

◆ ndof() [3/3]

int ParticleID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

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

113{ return m_ndof; }

◆ neuronPIDCalculation() [1/3]

int ParticleID::neuronPIDCalculation ( )
protected

◆ neuronPIDCalculation() [2/3]

int ParticleID::neuronPIDCalculation ( )
protected

◆ neuronPIDCalculation() [3/3]

int ParticleID::neuronPIDCalculation ( )
protected

◆ neuronStat() [1/3]

int ParticleID::neuronStat ( ) const
inline

Definition at line 142 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

142{ return IsPidInfoValid(); }
bool IsPidInfoValid() const

◆ neuronStat() [2/3]

int ParticleID::neuronStat ( ) const
inline

◆ neuronStat() [3/3]

int ParticleID::neuronStat ( ) const
inline

◆ neuronVal() [1/3]

double ParticleID::neuronVal ( ) const
inline

Definition at line 143 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

143 {
144 if ( lhf( 0 ) > 0.02 ) return 1.0;
145 if ( lhf( 1 ) > 0.02 ) return 8.5;
146 if ( lhf( 2 ) > 0.02 ) return 2.0;
147 if ( lhf( 3 ) > 0.02 ) return 4.0;
148 if ( lhf( 4 ) > 0.02 ) return 5.0;
149 }

◆ neuronVal() [2/3]

double ParticleID::neuronVal ( ) const
inline

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

143 {
144 if ( lhf( 0 ) > 0.02 ) return 1.0;
145 if ( lhf( 1 ) > 0.02 ) return 8.5;
146 if ( lhf( 2 ) > 0.02 ) return 2.0;
147 if ( lhf( 3 ) > 0.02 ) return 4.0;
148 if ( lhf( 4 ) > 0.02 ) return 5.0;
149 }

◆ neuronVal() [3/3]

double ParticleID::neuronVal ( ) const
inline

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

143 {
144 if ( lhf( 0 ) > 0.02 ) return 1.0;
145 if ( lhf( 1 ) > 0.02 ) return 8.5;
146 if ( lhf( 2 ) > 0.02 ) return 2.0;
147 if ( lhf( 3 ) > 0.02 ) return 4.0;
148 if ( lhf( 4 ) > 0.02 ) return 5.0;
149 }

◆ offset() [1/3]

double ParticleID::offset ( int ipar)
inline

Definition at line 156 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

156{ return m_tofcorrpid->offset( ipar ); }

◆ offset() [2/3]

double ParticleID::offset ( int ipar)
inline

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

156{ return m_tofcorrpid->offset( ipar ); }

◆ offset() [3/3]

double ParticleID::offset ( int ipar)
inline

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

156{ return m_tofcorrpid->offset( ipar ); }

◆ particleIDCalculation() [1/3]

int ParticleID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

Definition at line 257 of file ParticleID.cxx.

257 {
258 int irc = -1;
259 bool valid = IsDedxInfoValid() || IsTofInfoValid() || IsTofEInfoValid() ||
262
263 if ( !valid ) return irc;
264
265 double chisq[5];
266 bool pidcase[5];
267 for ( int i = 0; i < 5; i++ )
268 {
269 chisq[i] = 0;
270 pidcase[i] = false;
271 }
272
273 if ( ( m_pidcase & onlyElectron() ) == onlyElectron() ) pidcase[0] = true;
274 if ( ( m_pidcase & onlyMuon() ) == onlyMuon() ) pidcase[1] = true;
275 if ( ( m_pidcase & onlyPion() ) == onlyPion() ) pidcase[2] = true;
276 if ( ( m_pidcase & onlyKaon() ) == onlyKaon() ) pidcase[3] = true;
277 if ( ( m_pidcase & onlyProton() ) == onlyProton() ) pidcase[4] = true;
278
279 //
280 // dEdx PID
281 //
282 if ( IsDedxInfoUsed() )
283 {
284 if ( IsDedxInfoValid() )
285 {
286 bool okpid = false;
287 for ( int i = 0; i < 5; i++ )
288 {
289 if ( pidcase[i] && ( fabs( chiDedx( i ) ) < m_dedxpid->chiMinCut() ) )
290 if ( !okpid ) okpid = true;
291 }
292 if ( okpid )
293 {
294 m_ndof++;
295 for ( int i = 0; i < 5; i++ ) chisq[i] += chiDedx( i ) * chiDedx( i );
296 }
297 } // dE/dx
298 }
299 //
300 // Barrel TOF
301 //
302
303 if ( IsTofInfoUsed() | IsTof1InfoUsed() | IsTof2InfoUsed() | IsTofCInfoUsed() )
304 {
305 if ( IsTofCInfoUsed() )
306 {
307 if ( IsTofCInfoValid() )
308 {
309 bool okpid = false;
310 for ( int i = 0; i < 5; i++ )
311 {
312 if ( pidcase[i] && ( fabs( chiTofC( i ) ) < m_tofcpid->chiMinCut() ) )
313 if ( !okpid ) okpid = true;
314 }
315 if ( okpid )
316 {
317 m_ndof++;
318 for ( int i = 0; i < 5; i++ ) chisq[i] += chiTofC( i ) * chiTofC( i );
319 }
320 } // TOF1
321 }
322 else
323 {
324 if ( IsTofInfoValid() )
325 {
326 bool okpid = false;
327 for ( int i = 0; i < 5; i++ )
328 {
329 if ( pidcase[i] && ( fabs( chiTof( i ) ) < m_tofpid->chiMinCut() ) )
330 if ( !okpid ) okpid = true;
331 }
332 if ( okpid )
333 {
334 m_ndof++;
335 for ( int i = 0; i < 5; i++ ) chisq[i] += chiTof( i ) * chiTof( i );
336 }
337 } // TOF1
338
339 //
340 // EndCap Tof
341 //
342
343 if ( IsTofEInfoUsed() )
344 {
345 if ( IsTofEInfoValid() )
346 {
347 bool okpid = false;
348 for ( int i = 0; i < 5; i++ )
349 {
350 if ( pidcase[i] && ( fabs( chiTofE( i ) ) < m_tofepid->chiMinCut() ) )
351 if ( !okpid ) okpid = true;
352 }
353 if ( okpid )
354 {
355 m_ndof++;
356 for ( int i = 0; i < 5; i++ ) chisq[i] += chiTofE( i ) * chiTofE( i );
357 }
358 } // EndCap TOF
359 }
360 }
361 }
362
363 // Secondary TOF correction
364 if ( IsTofCorrInfoUsed() )
365 {
366 if ( IsTofCorrInfoValid() )
367 {
368 bool okpid = false;
369 for ( int i = 0; i < 5; i++ )
370 {
371 if ( pidcase[i] && ( chiTofCorr( i ) < m_tofcorrpid->chiMaxCut() ) &&
372 ( chiTofCorr( i ) > ( 0.0 - m_tofcorrpid->chiMinCut() ) ) )
373 // if(pidcase[i] && ( chiTofCorr(i) < 6.0 && chiTofCorr(i) > -4.0 ) )
374 if ( !okpid ) okpid = true;
375 }
376 if ( okpid )
377 {
378 m_ndof++;
379 for ( int i = 0; i < 5; i++ ) chisq[i] += chiTofCorr( i ) * chiTofCorr( i );
380 }
381 }
382 }
383
384 //
385 // Barrel TOF Q
386 //
387
388 if ( IsTofQInfoUsed() )
389 {
390 if ( IsTofQInfoValid() )
391 {
392 bool okpid = false;
393 for ( int i = 0; i < 5; i++ )
394 {
395 if ( pidcase[i] && ( fabs( chiTofQ( i ) ) < m_tofqpid->chiMinCut() ) )
396 if ( !okpid ) okpid = true;
397 }
398 if ( okpid )
399 {
400 m_ndof++;
401 for ( int i = 0; i < 5; i++ ) chisq[i] += chiTofQ( i ) * chiTofQ( i );
402 }
403 } // TofQ
404 }
405
406 // Muc Pid
407 if ( IsMucInfoUsed() )
408 {
409 if ( IsMucInfoValid() )
410 {
411 bool okpid = false;
412 for ( int i = 0; i < 5; i++ )
413 {
414 if ( pidcase[i] && ( fabs( chiMuc( i ) ) < m_mucpid->chiMinCut() ) )
415 if ( !okpid ) okpid = true;
416 }
417 if ( okpid )
418 {
419 m_ndof++;
420 for ( int i = 0; i < 5; i++ ) chisq[i] += chiMuc( i ) * chiMuc( i );
421 }
422 } // Muc Pid
423 }
424
425 // Emc PID
426 if ( IsEmcInfoUsed() )
427 {
428 if ( IsEmcInfoValid() )
429 {
430 bool okpid = false;
431 for ( int i = 0; i < 5; i++ )
432 {
433 if ( pidcase[i] && ( fabs( chiEmc( i ) ) < m_emcpid->chiMinCut() ) )
434 if ( !okpid ) okpid = true;
435 }
436 if ( okpid )
437 {
438 m_ndof++;
439 for ( int i = 0; i < 5; i++ ) chisq[i] += chiEmc( i ) * chiEmc( i );
440 }
441 } // Emc Pid
442 }
443
444 if ( m_ndof <= 0 ) return irc;
445
446 for ( int i = 0; i < 5; i++ )
447 {
448 m_chisq[i] = chisq[i];
449 m_prob[i] = probCalculate( chisq[i], m_ndof );
450 }
451
452 irc = 0;
453 return irc;
454}
double probCalculate(double chi2, int n)
double chiMuc(int n) const
double chiTofQ(int n) const
double chiTofC(int n) const
double chiEmc(int n) const

◆ particleIDCalculation() [2/3]

int ParticleID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

◆ particleIDCalculation() [3/3]

int ParticleID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

◆ pdf() [1/3]

double ParticleID::pdf ( int n) const
inline

Definition at line 116 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

116{ return m_pdf[n]; }

Referenced by LikelihoodCalculation().

◆ pdf() [2/3]

double ParticleID::pdf ( int n) const
inline

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

116{ return m_pdf[n]; }

◆ pdf() [3/3]

double ParticleID::pdf ( int n) const
inline

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

116{ return m_pdf[n]; }

◆ pdfDedx() [1/3]

double ParticleID::pdfDedx ( int n)
inline

Referenced by LikelihoodCalculation().

◆ pdfDedx() [2/3]

double ParticleID::pdfDedx ( int n)
inline

◆ pdfDedx() [3/3]

double ParticleID::pdfDedx ( int n)
inline

◆ pdfElectron() [1/3]

double ParticleID::pdfElectron ( ) const
inline

Definition at line 127 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

127{ return m_pdf[0]; }

◆ pdfElectron() [2/3]

double ParticleID::pdfElectron ( ) const
inline

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

127{ return m_pdf[0]; }

◆ pdfElectron() [3/3]

double ParticleID::pdfElectron ( ) const
inline

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

127{ return m_pdf[0]; }

◆ pdfEmc() [1/3]

double ParticleID::pdfEmc ( int n)
inline

Referenced by LikelihoodCalculation().

◆ pdfEmc() [2/3]

double ParticleID::pdfEmc ( int n)
inline

◆ pdfEmc() [3/3]

double ParticleID::pdfEmc ( int n)
inline

◆ pdfKaon() [1/3]

double ParticleID::pdfKaon ( ) const
inline

Definition at line 130 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

130{ return m_pdf[3]; }

◆ pdfKaon() [2/3]

double ParticleID::pdfKaon ( ) const
inline

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

130{ return m_pdf[3]; }

◆ pdfKaon() [3/3]

double ParticleID::pdfKaon ( ) const
inline

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

130{ return m_pdf[3]; }

◆ pdfMuc() [1/3]

double ParticleID::pdfMuc ( int n)
inline

Referenced by LikelihoodCalculation().

◆ pdfMuc() [2/3]

double ParticleID::pdfMuc ( int n)
inline

◆ pdfMuc() [3/3]

double ParticleID::pdfMuc ( int n)
inline

◆ pdfMuon() [1/3]

double ParticleID::pdfMuon ( ) const
inline

Definition at line 128 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

128{ return m_pdf[1]; }

◆ pdfMuon() [2/3]

double ParticleID::pdfMuon ( ) const
inline

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

128{ return m_pdf[1]; }

◆ pdfMuon() [3/3]

double ParticleID::pdfMuon ( ) const
inline

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

128{ return m_pdf[1]; }

◆ pdfPion() [1/3]

double ParticleID::pdfPion ( ) const
inline

Definition at line 129 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

129{ return m_pdf[2]; }

◆ pdfPion() [2/3]

double ParticleID::pdfPion ( ) const
inline

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

129{ return m_pdf[2]; }

◆ pdfPion() [3/3]

double ParticleID::pdfPion ( ) const
inline

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

129{ return m_pdf[2]; }

◆ pdfProton() [1/3]

double ParticleID::pdfProton ( ) const
inline

Definition at line 131 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

131{ return m_pdf[4]; }

◆ pdfProton() [2/3]

double ParticleID::pdfProton ( ) const
inline

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

131{ return m_pdf[4]; }

◆ pdfProton() [3/3]

double ParticleID::pdfProton ( ) const
inline

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

131{ return m_pdf[4]; }

◆ pdfTof() [1/3]

double ParticleID::pdfTof ( int n)
inline

Referenced by LikelihoodCalculation().

◆ pdfTof() [2/3]

double ParticleID::pdfTof ( int n)
inline

◆ pdfTof() [3/3]

double ParticleID::pdfTof ( int n)
inline

◆ pdfTofC() [1/3]

double ParticleID::pdfTofC ( int n)
inline

Referenced by LikelihoodCalculation().

◆ pdfTofC() [2/3]

double ParticleID::pdfTofC ( int n)
inline

◆ pdfTofC() [3/3]

double ParticleID::pdfTofC ( int n)
inline

◆ pdfTofCorr() [1/3]

double ParticleID::pdfTofCorr ( int n)
inline

Referenced by LikelihoodCalculation().

◆ pdfTofCorr() [2/3]

double ParticleID::pdfTofCorr ( int n)
inline

◆ pdfTofCorr() [3/3]

double ParticleID::pdfTofCorr ( int n)
inline

◆ pdfTofE() [1/3]

double ParticleID::pdfTofE ( int n)
inline

◆ pdfTofE() [2/3]

double ParticleID::pdfTofE ( int n)
inline

◆ pdfTofE() [3/3]

double ParticleID::pdfTofE ( int n)
inline

◆ pdfTofQ() [1/3]

double ParticleID::pdfTofQ ( int n)
inline

Referenced by LikelihoodCalculation().

◆ pdfTofQ() [2/3]

double ParticleID::pdfTofQ ( int n)
inline

◆ pdfTofQ() [3/3]

double ParticleID::pdfTofQ ( int n)
inline

◆ prob() [1/3]

double ParticleID::prob ( int n) const
inlinevirtual

◆ prob() [2/3]

double ParticleID::prob ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

112{ return m_prob[n]; }

◆ prob() [3/3]

double ParticleID::prob ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

112{ return m_prob[n]; }

◆ probDedx() [1/3]

double ParticleID::probDedx ( int n) const
inline

Referenced by Gam4pikp::execute().

◆ probDedx() [2/3]

double ParticleID::probDedx ( int n) const
inline

◆ probDedx() [3/3]

double ParticleID::probDedx ( int n) const
inline

◆ probElectron() [1/3]

◆ probElectron() [2/3]

double ParticleID::probElectron ( ) const
inline

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

119{ return m_prob[0]; }

◆ probElectron() [3/3]

double ParticleID::probElectron ( ) const
inline

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

119{ return m_prob[0]; }

◆ probEmc() [1/3]

double ParticleID::probEmc ( int n) const
inline

◆ probEmc() [2/3]

double ParticleID::probEmc ( int n) const
inline

◆ probEmc() [3/3]

double ParticleID::probEmc ( int n) const
inline

◆ probKaon() [1/3]

◆ probKaon() [2/3]

double ParticleID::probKaon ( ) const
inline

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

122{ return m_prob[3]; }

◆ probKaon() [3/3]

double ParticleID::probKaon ( ) const
inline

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

122{ return m_prob[3]; }

◆ probMuc() [1/3]

double ParticleID::probMuc ( int n) const
inline

◆ probMuc() [2/3]

double ParticleID::probMuc ( int n) const
inline

◆ probMuc() [3/3]

double ParticleID::probMuc ( int n) const
inline

◆ probMuon() [1/3]

◆ probMuon() [2/3]

double ParticleID::probMuon ( ) const
inline

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

120{ return m_prob[1]; }

◆ probMuon() [3/3]

double ParticleID::probMuon ( ) const
inline

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

120{ return m_prob[1]; }

◆ probPion() [1/3]

◆ probPion() [2/3]

double ParticleID::probPion ( ) const
inline

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

121{ return m_prob[2]; }

◆ probPion() [3/3]

double ParticleID::probPion ( ) const
inline

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

121{ return m_prob[2]; }

◆ probProton() [1/3]

◆ probProton() [2/3]

double ParticleID::probProton ( ) const
inline

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

123{ return m_prob[4]; }

◆ probProton() [3/3]

double ParticleID::probProton ( ) const
inline

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

123{ return m_prob[4]; }

◆ probTof() [1/3]

double ParticleID::probTof ( int n) const
inline

Referenced by Gam4pikp::execute().

◆ probTof() [2/3]

double ParticleID::probTof ( int n) const
inline

◆ probTof() [3/3]

double ParticleID::probTof ( int n) const
inline

◆ probTofC() [1/3]

double ParticleID::probTofC ( int n) const
inline

◆ probTofC() [2/3]

double ParticleID::probTofC ( int n) const
inline

◆ probTofC() [3/3]

double ParticleID::probTofC ( int n) const
inline

◆ probTofCorr() [1/3]

double ParticleID::probTofCorr ( int n) const
inline

◆ probTofCorr() [2/3]

double ParticleID::probTofCorr ( int n) const
inline

◆ probTofCorr() [3/3]

double ParticleID::probTofCorr ( int n) const
inline

◆ probTofE() [1/3]

double ParticleID::probTofE ( int n) const
inline

◆ probTofE() [2/3]

double ParticleID::probTofE ( int n) const
inline

◆ probTofE() [3/3]

double ParticleID::probTofE ( int n) const
inline

◆ probTofQ() [1/3]

double ParticleID::probTofQ ( int n) const
inline

◆ probTofQ() [2/3]

double ParticleID::probTofQ ( int n) const
inline

◆ probTofQ() [3/3]

double ParticleID::probTofQ ( int n) const
inline

◆ setMethod() [1/3]

◆ setMethod() [2/3]

void ParticleID::setMethod ( const int method)
inline

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

92{ m_method = ( m_method | method ); }

◆ setMethod() [3/3]

void ParticleID::setMethod ( const int method)
inline

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

92{ m_method = ( m_method | method ); }

◆ setNhitCut() [1/3]

void ParticleID::setNhitCut ( const int nhitcuth = 5)
inline

Definition at line 87 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

87{ m_nhitcut = nhitcuth; }

◆ setNhitCut() [2/3]

void ParticleID::setNhitCut ( const int nhitcuth = 5)
inline

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

87{ m_nhitcut = nhitcuth; }

◆ setNhitCut() [3/3]

void ParticleID::setNhitCut ( const int nhitcuth = 5)
inline

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

87{ m_nhitcut = nhitcuth; }

◆ sigCorr() [1/3]

double ParticleID::sigCorr ( int ipar,
int ipmt )
inline

Definition at line 154 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

154{ return m_tofcorrpid->sigCorr( ipar, ipmt ); }

◆ sigCorr() [2/3]

double ParticleID::sigCorr ( int ipar,
int ipmt )
inline

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

154{ return m_tofcorrpid->sigCorr( ipar, ipmt ); }

◆ sigCorr() [3/3]

double ParticleID::sigCorr ( int ipar,
int ipmt )
inline

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

154{ return m_tofcorrpid->sigCorr( ipar, ipmt ); }

◆ sigma() [1/3]

double ParticleID::sigma ( int ipar)
inline

Definition at line 157 of file Analysis/ParticleID/include/ParticleID/ParticleID.h.

157{ return m_tofcorrpid->sigma( ipar ); }

◆ sigma() [2/3]

double ParticleID::sigma ( int ipar)
inline

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

157{ return m_tofcorrpid->sigma( ipar ); }

◆ sigma() [3/3]

double ParticleID::sigma ( int ipar)
inline

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

157{ return m_tofcorrpid->sigma( ipar ); }

◆ usePidSys() [1/3]

◆ usePidSys() [2/3]

void ParticleID::usePidSys ( const int pidsys)
inline

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

95{ m_pidsys = ( m_pidsys | pidsys ); }

◆ usePidSys() [3/3]

void ParticleID::usePidSys ( const int pidsys)
inline

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

95{ m_pidsys = ( m_pidsys | pidsys ); }

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