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

#include <EmcPID.h>

Inheritance diagram for EmcPID:

Public Member Functions

 ~EmcPID ()
void init ()
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double prob (int n) const
int ndof () const
double energy () const
double eseed () const
double e3x3 () const
double e5x5 () const
double delta_theta () const
double delta_phi () const
double secondmoment () const
double val_emc1 () const
int neuronPID () const
double pars (int n) const
 ~EmcPID ()
void init ()
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double prob (int n) const
int ndof () const
double energy () const
double eseed () const
double e3x3 () const
double e5x5 () const
double delta_theta () const
double delta_phi () const
double secondmoment () const
double val_emc1 () const
int neuronPID () const
double pars (int n) const
 ~EmcPID ()
void init ()
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double prob (int n) const
int ndof () const
double energy () const
double eseed () const
double e3x3 () const
double e5x5 () const
double delta_theta () const
double delta_phi () const
double secondmoment () const
double val_emc1 () const
int neuronPID () const
double pars (int n) 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 EmcPIDinstance ()
static EmcPIDinstance ()
static EmcPIDinstance ()

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ ~EmcPID() [1/3]

EmcPID::~EmcPID ( )
inline

Definition at line 20 of file Analysis/ParticleID/include/ParticleID/EmcPID.h.

20{ ; }

◆ ~EmcPID() [2/3]

EmcPID::~EmcPID ( )
inline

◆ ~EmcPID() [3/3]

EmcPID::~EmcPID ( )
inline

Member Function Documentation

◆ calculate() [1/3]

void EmcPID::calculate ( )
virtual

Implements ParticleIDBase.

Definition at line 158 of file EmcPID.cxx.

158 {
159 if ( particleIDCalculation() == 0 ) m_ndof = 1;
160}
int particleIDCalculation()
Definition EmcPID.cxx:162

◆ calculate() [2/3]

void EmcPID::calculate ( )
virtual

Implements ParticleIDBase.

◆ calculate() [3/3]

void EmcPID::calculate ( )
virtual

Implements ParticleIDBase.

◆ chi() [1/3]

double EmcPID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

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

◆ chi() [2/3]

double EmcPID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

25{ return m_chi[n]; }

◆ chi() [3/3]

double EmcPID::chi ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

25{ return m_chi[n]; }

◆ delta_phi() [1/3]

double EmcPID::delta_phi ( ) const
inline

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

33{ return m_delta_phi; }

◆ delta_phi() [2/3]

double EmcPID::delta_phi ( ) const
inline

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

33{ return m_delta_phi; }

◆ delta_phi() [3/3]

double EmcPID::delta_phi ( ) const
inline

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

33{ return m_delta_phi; }

◆ delta_theta() [1/3]

double EmcPID::delta_theta ( ) const
inline

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

32{ return m_delta_theta; }

◆ delta_theta() [2/3]

double EmcPID::delta_theta ( ) const
inline

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

32{ return m_delta_theta; }

◆ delta_theta() [3/3]

double EmcPID::delta_theta ( ) const
inline

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

32{ return m_delta_theta; }

◆ e3x3() [1/3]

double EmcPID::e3x3 ( ) const
inline

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

30{ return m_e3x3; }

◆ e3x3() [2/3]

double EmcPID::e3x3 ( ) const
inline

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

30{ return m_e3x3; }

◆ e3x3() [3/3]

double EmcPID::e3x3 ( ) const
inline

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

30{ return m_e3x3; }

◆ e5x5() [1/3]

double EmcPID::e5x5 ( ) const
inline

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

31{ return m_e5x5; }

◆ e5x5() [2/3]

double EmcPID::e5x5 ( ) const
inline

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

31{ return m_e5x5; }

◆ e5x5() [3/3]

double EmcPID::e5x5 ( ) const
inline

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

31{ return m_e5x5; }

◆ energy() [1/3]

double EmcPID::energy ( ) const
inline

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

28{ return m_energy; }

◆ energy() [2/3]

double EmcPID::energy ( ) const
inline

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

28{ return m_energy; }

◆ energy() [3/3]

double EmcPID::energy ( ) const
inline

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

28{ return m_energy; }

◆ eseed() [1/3]

double EmcPID::eseed ( ) const
inline

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

29{ return m_eseed; }

◆ eseed() [2/3]

double EmcPID::eseed ( ) const
inline

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

29{ return m_eseed; }

◆ eseed() [3/3]

double EmcPID::eseed ( ) const
inline

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

29{ return m_eseed; }

◆ init() [1/3]

void EmcPID::init ( )
virtual

Implements ParticleIDBase.

Definition at line 100 of file EmcPID.cxx.

100 {
101 for ( int i = 0; i < 5; i++ )
102 {
103 m_chi[i] = 99.0;
104 m_prob[i] = -1.0;
105 }
106 m_chimin = 99.;
107 m_ndof = 0;
108 m_energy = -99;
109 m_eseed = -99;
110 m_e3x3 = -99;
111 m_e5x5 = -99;
112 m_delta_theta = -99;
113 m_delta_phi = -99;
114 m_secondmoment = -99;
115 m_val_emc = -99;
116 // std::string emc = path + "/share/emc_epimu.txt";
117 /* if(!m_trainTree_emconly){
118 m_trainTree_emconly = new TTree("m_trainTree_emconly","m_trainTree_emconly");
119 m_trainTree_emconly->Branch("ptrk",&m_ptrk,"ptrk/D");
120 m_trainTree_emconly->Branch("pt",&m_pt,"pt/D");
121 m_trainTree_emconly->Branch("type",&m_type,"type/D");
122 m_trainTree_emconly->Branch("energy",&m_energy,"energy/D");
123 m_trainTree_emconly->Branch("eseed",&m_eseed,"eseed/D");
124 m_trainTree_emconly->Branch("e3x3",&m_e3x3,"e3x3/D");
125 m_trainTree_emconly->Branch("e5x5",&m_e5x5,"e5x5/D");
126 m_trainTree_emconly->Branch("secondmoment",&m_secondmoment,"secondmoment/D");
127 m_trainTree_emconly->Branch("delta_phi",&m_delta_phi,"delta_phi/D");
128 m_trainTree_emconly->Branch("delta_theta",&m_delta_theta,"delta_theta/D");
129 }
130 if(!m_mlp_emc){
131 m_mlp_emc = new
132 TMultiLayerPerceptron("ptrk,pt,energy,eseed,e3x3,e5x5,secondmoment,delta_theta,delta_phi:18:type",m_trainTree_emconly);
133 m_mlp_emc->LoadWeights(emc.c_str());
134 }
135 */
136
137 /*if(!m_trainTree_emconly){
138 m_trainTree_emconly = new TTree("m_trainTree_emconly","m_trainTree_emconly");
139 m_trainTree_emconly->Branch("ptrk",&m_ptrk,"ptrk/D");
140 m_trainTree_emconly->Branch("pt",&m_pt,"pt/D");
141 m_trainTree_emconly->Branch("type",&m_type,"type/D");
142 m_trainTree_emconly->Branch("energy",&m_energy,"energy/D");
143 m_trainTree_emconly->Branch("eseed",&m_eseed,"eseed/D");
144 m_trainTree_emconly->Branch("e3x3",&m_e3x3,"e3x3/D");
145 m_trainTree_emconly->Branch("e5x5",&m_e5x5,"e5x5/D");
146 m_trainTree_emconly->Branch("secondmoment",&m_secondmoment,"secondmoment/D");
147 m_trainTree_emconly->Branch("delta_phi",&m_delta_phi,"delta_phi/D");
148 m_trainTree_emconly->Branch("delta_theta",&m_delta_theta,"delta_theta/D");
149 }
150 if(!m_mlp_emc){
151 m_mlp_emc = new
152 TMultiLayerPerceptron("ptrk,pt,energy,eseed,e3x3,e5x5,secondmoment,delta_theta,delta_phi:18:type",m_trainTree_emconly);
153 m_mlp_emc->LoadWeights(emc.c_str());
154 }
155 */
156}

◆ init() [2/3]

void EmcPID::init ( )
virtual

Implements ParticleIDBase.

◆ init() [3/3]

void EmcPID::init ( )
virtual

Implements ParticleIDBase.

◆ instance() [1/3]

EmcPID * EmcPID::instance ( )
static

Definition at line 22 of file EmcPID.cxx.

22 {
23 if ( !m_pointer ) m_pointer = new EmcPID();
24 return m_pointer;
25}

Referenced by ParticleID::init().

◆ instance() [2/3]

EmcPID * EmcPID::instance ( )
static

◆ instance() [3/3]

EmcPID * EmcPID::instance ( )
static

◆ IsPidInfoValid() [1/3]

bool EmcPID::IsPidInfoValid ( ) const
inlinevirtual

Implements ParticleIDBase.

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

24{ return ( m_ndof > 0 ); }

◆ IsPidInfoValid() [2/3]

bool EmcPID::IsPidInfoValid ( ) const
inlinevirtual

Implements ParticleIDBase.

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

24{ return ( m_ndof > 0 ); }

◆ IsPidInfoValid() [3/3]

bool EmcPID::IsPidInfoValid ( ) const
inlinevirtual

Implements ParticleIDBase.

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

24{ return ( m_ndof > 0 ); }

◆ LikelihoodCalculation() [1/3]

int EmcPID::LikelihoodCalculation ( )
inlineprotectedvirtual

Implements ParticleIDBase.

Definition at line 42 of file Analysis/ParticleID/include/ParticleID/EmcPID.h.

42{ return -1; }

◆ LikelihoodCalculation() [2/3]

int EmcPID::LikelihoodCalculation ( )
inlineprotectedvirtual

Implements ParticleIDBase.

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

42{ return -1; }

◆ LikelihoodCalculation() [3/3]

int EmcPID::LikelihoodCalculation ( )
inlineprotectedvirtual

Implements ParticleIDBase.

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

42{ return -1; }

◆ ndof() [1/3]

int EmcPID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

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

27{ return m_ndof; }

◆ ndof() [2/3]

int EmcPID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

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

27{ return m_ndof; }

◆ ndof() [3/3]

int EmcPID::ndof ( ) const
inlinevirtual

Implements ParticleIDBase.

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

27{ return m_ndof; }

◆ neuronPID() [1/3]

int EmcPID::neuronPID ( ) const
inline

Definition at line 36 of file Analysis/ParticleID/include/ParticleID/EmcPID.h.

36{ return -1; }

◆ neuronPID() [2/3]

int EmcPID::neuronPID ( ) const
inline

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

36{ return -1; }

◆ neuronPID() [3/3]

int EmcPID::neuronPID ( ) const
inline

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

36{ return -1; }

◆ neuronPIDCalculation() [1/3]

int EmcPID::neuronPIDCalculation ( )
inlineprotected

Definition at line 41 of file Analysis/ParticleID/include/ParticleID/EmcPID.h.

41{ return -1; }

◆ neuronPIDCalculation() [2/3]

int EmcPID::neuronPIDCalculation ( )
inlineprotected

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

41{ return -1; }

◆ neuronPIDCalculation() [3/3]

int EmcPID::neuronPIDCalculation ( )
inlineprotected

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

41{ return -1; }

◆ pars() [1/3]

double EmcPID::pars ( int n) const
inline

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

37{ return params_emc1[n]; }

◆ pars() [2/3]

double EmcPID::pars ( int n) const
inline

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

37{ return params_emc1[n]; }

◆ pars() [3/3]

double EmcPID::pars ( int n) const
inline

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

37{ return params_emc1[n]; }

◆ particleIDCalculation() [1/3]

int EmcPID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

Definition at line 162 of file EmcPID.cxx.

162 {
163 int irc = -1;
164 EvtRecTrack* recTrk = PidTrk();
165 if ( !( recTrk->isMdcTrackValid() ) ) return irc;
166 RecMdcTrack* mdcTrk = recTrk->mdcTrack();
167 if ( !( recTrk )->isMdcKalTrackValid() ) return irc;
168 RecMdcKalTrack* mdcKalTrk = ( recTrk )->mdcKalTrack();
170 double ptrk = mdcKalTrk->p();
171 // double ptrk = mdcTrk->p();
172 m_ptrk = ptrk;
173
174 m_pt = mdcKalTrk->pxy();
175 m_pt = m_pt * mdcTrk->charge();
176 // double cost = cos(mdcTrk->theta());
177
178 if ( !( recTrk->isExtTrackValid() ) ) return irc;
179 RecExtTrack* extTrk = recTrk->extTrack();
180 if ( extTrk->emcVolumeNumber() == -1 ) return irc;
181 if ( !( recTrk->isEmcShowerValid() ) ) return irc;
182 RecEmcShower* emcTrk = recTrk->emcShower();
183
184 m_energy = emcTrk->energy();
185 m_eseed = emcTrk->eSeed();
186 m_e3x3 = emcTrk->e3x3();
187 m_e5x5 = emcTrk->e5x5();
188
189 double m_emc_theta = emcTrk->theta();
190 double m_emc_phi = emcTrk->phi();
191
192 Hep3Vector mc = extTrk->emcPosition();
193 double m_ext_theta = mc.theta();
194 double m_ext_phi = mc.phi();
195
196 m_delta_theta = m_emc_theta - m_ext_theta;
197 m_delta_phi = m_emc_phi - m_ext_phi;
198 if ( m_delta_phi > 1 ) m_delta_phi = m_delta_phi - 6.283;
199 if ( m_delta_phi < -1 ) m_delta_phi = m_delta_phi + 6.283;
200
201 m_secondmoment = emcTrk->secondMoment() / 1000.;
202 m_a20moment = emcTrk->a20Moment();
203 m_latmoment = emcTrk->latMoment();
204 m_a42moment = emcTrk->a42Moment();
205
206 if ( emcTrk->energy() <= 0 ) return irc;
207 // if(emcTrk->energy() > ptrk) return irc;
208
209 /* params_emc1[0] = m_ptrk;
210 params_emc1[1] = m_pt;
211 params_emc1[2] = m_energy;
212 params_emc1[3] = m_eseed;
213 params_emc1[4] = m_e3x3;
214 params_emc1[5] = m_e5x5;
215 params_emc1[6] = m_secondmoment;
216 params_emc1[7] = m_delta_theta;
217 params_emc1[8] = m_delta_phi;*/
218 params_emc1[0] = m_ptrk;
219 params_emc1[1] = m_pt;
220 params_emc1[2] = m_energy;
221 params_emc1[3] = m_eseed;
222 params_emc1[4] = m_e3x3;
223 params_emc1[5] = m_e5x5;
224 params_emc1[6] = m_secondmoment;
225 params_emc1[7] = m_latmoment;
226 params_emc1[8] = m_a20moment;
227 params_emc1[9] = m_a42moment;
228 params_emc1[10] = m_delta_theta;
229 params_emc1[11] = m_delta_phi;
230
231 m_val_emc = m_mlp_emc->Evaluate( 0, params_emc1 );
232 int pindex = int( ( m_ptrk - 0.2 ) / 0.1 );
233 int bindex = int( ( m_val_emc - 0.5 ) / 0.01 );
234 if ( bindex > 300 || bindex < 0 ) return irc;
235 if ( pindex > 17 ) pindex = 17;
236 if ( pindex < 0 ) pindex = 0;
237 // double bin_pos[3];
238 m_prob[0] = m_e_h[pindex][bindex];
239 m_prob[1] = m_m_h[pindex][bindex];
240 m_prob[2] = m_p_h[pindex][bindex];
241 m_prob[3] = m_p_h[pindex][bindex];
242 m_prob[4] = m_p_h[pindex][bindex];
243 for ( int i = 0; i < 5; i++ )
244 {
245 if ( m_prob[i] == 0 ) m_prob[i] = 0.001;
246 }
247 // calculate the chisq value using GAUSIN
248 float ppp[5];
249 for ( int i = 0; i < 5; i++ ) { ppp[i] = 0; }
250 for ( int j = 0; j <= bindex; j++ )
251 {
252 ppp[0] += m_e_h[pindex][j];
253 ppp[1] += m_m_h[pindex][j];
254 ppp[2] += m_p_h[pindex][j];
255 }
256 for ( int i = 0; i < 3; i++ )
257 {
258 ppp[i] = ppp[i] * 0.01;
259 if ( ppp[i] > 0 && ppp[i] < 1 ) { CALG( ppp[i], m_chi[i] ); }
260 if ( ppp[i] <= 0 || ppp[i] >= 1 ) m_chi[i] = -99;
261 }
262 // if(fabs(m_chi[2])==-99)
263 m_chi[3] = m_chi[2];
264 m_chi[4] = m_chi[2];
265
266 m_ndof = 1;
267 irc = 0;
268 return irc;
269}
void CALG(double Px, double &e2)
Definition calg.cxx:31

Referenced by calculate().

◆ particleIDCalculation() [2/3]

int EmcPID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

◆ particleIDCalculation() [3/3]

int EmcPID::particleIDCalculation ( )
protectedvirtual

Implements ParticleIDBase.

◆ prob() [1/3]

double EmcPID::prob ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

26{ return m_prob[n]; }

◆ prob() [2/3]

double EmcPID::prob ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

26{ return m_prob[n]; }

◆ prob() [3/3]

double EmcPID::prob ( int n) const
inlinevirtual

Implements ParticleIDBase.

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

26{ return m_prob[n]; }

◆ secondmoment() [1/3]

double EmcPID::secondmoment ( ) const
inline

Definition at line 34 of file Analysis/ParticleID/include/ParticleID/EmcPID.h.

34{ return m_secondmoment; }

◆ secondmoment() [2/3]

double EmcPID::secondmoment ( ) const
inline

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

34{ return m_secondmoment; }

◆ secondmoment() [3/3]

double EmcPID::secondmoment ( ) const
inline

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

34{ return m_secondmoment; }

◆ val_emc1() [1/3]

double EmcPID::val_emc1 ( ) const
inline

Definition at line 35 of file Analysis/ParticleID/include/ParticleID/EmcPID.h.

35{ return m_val_emc; }

◆ val_emc1() [2/3]

double EmcPID::val_emc1 ( ) const
inline

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

35{ return m_val_emc; }

◆ val_emc1() [3/3]

double EmcPID::val_emc1 ( ) const
inline

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

35{ return m_val_emc; }

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