Public Member Functions | Protected Attributes | List of all members
remid::ReMId Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/ReMId/ReMId.h"

Inheritance diagram for remid::ReMId:
rb::PID

Public Member Functions

 ReMId ()
 
 ReMId (int pdg, double val)
 
void AddScatter (TVector3 pos, double cosScat)
 
void AddDedx (double dedx, double distFromStart, bool used=true, bool vert=false)
 
void SetMuonDedxLL (double ll)
 
void SetPionDedxLL (double ll)
 
void SetMuonScatLL (double ll)
 
void SetPionScatLL (double ll)
 
void SetDedxUsed (unsigned int idx, bool used)
 
void SetDedxVertex (unsigned int idx, bool vert)
 
void SetContained (bool cont)
 
double AvgDedx () const
 
double AvgDedxUsed () const
 
unsigned int NScatters () const
 
unsigned int NDedx () const
 
TVector3 ScatLocation (unsigned int i) const
 
double CosScat (unsigned int i) const
 
double DedxLocation (unsigned int i) const
 
double Dedx (unsigned int i) const
 
bool DedxUsed (unsigned int i) const
 
bool DedxVertex (unsigned int i) const
 
double MuonDedxLL () const
 
double PionDedxLL () const
 
double MuonScatLL () const
 
double PionScatLL () const
 
double DedxSeparation () const
 Return the dE/dx separation variable used as an input to the kNN that determines the pid value. More...
 
double ScatSeparation () const
 Return the scattering separation variable used as an input to the kNN that determines the pid value. More...
 
double MeasurementFraction () const
 Return the measurement fraction variable used as an input to the kNN that determines the pid value. More...
 
int NMeasurementPlanes () const
 
int NVertexPlanes () const
 
bool Contained () const
 
int Pdg () const
 
double Value () const
 
void SetPdg (int pdg)
 
void SetVal (double val)
 

Protected Attributes

double fMuonScatLL
 
double fPionScatLL
 
double fMuonDedxLL
 
double fPionDedxLL
 
bool fCont
 
std::vector< TVector3 > fscatLocation
 
std::vector< double > fcosScatAngle
 
std::vector< double > fdedx
 
std::vector< intfdedxvert
 
std::vector< intfdedxused
 
std::vector< double > ffracDistFromStart
 
int fPdg
 pdg code More...
 
double fVal
 pid value More...
 

Detailed Description

Definition at line 23 of file ReMId.h.

Constructor & Destructor Documentation

remid::ReMId::ReMId ( )

Definition at line 20 of file ReMId.cxx.

References SetMuonDedxLL(), SetMuonScatLL(), and SetPionDedxLL().

21  : rb::PID()
22  {
23  SetMuonDedxLL(0);
24  SetPionDedxLL(0);
25  SetMuonScatLL(0);
26  SetMuonScatLL(0);
27  }
A pid value and corresponding pdg code.
Definition: PID.h:13
void SetMuonDedxLL(double ll)
Definition: ReMId.cxx:56
void SetPionDedxLL(double ll)
Definition: ReMId.cxx:62
void SetMuonScatLL(double ll)
Definition: ReMId.cxx:156
remid::ReMId::ReMId ( int  pdg,
double  val 
)

Definition at line 30 of file ReMId.cxx.

References SetMuonDedxLL(), SetMuonScatLL(), and SetPionDedxLL().

31  : rb::PID(pdg,val)
32  {
33  SetMuonDedxLL(0);
34  SetPionDedxLL(0);
35  SetMuonScatLL(0);
36  SetMuonScatLL(0);
37  }
A pid value and corresponding pdg code.
Definition: PID.h:13
void SetMuonDedxLL(double ll)
Definition: ReMId.cxx:56
void SetPionDedxLL(double ll)
Definition: ReMId.cxx:62
void SetMuonScatLL(double ll)
Definition: ReMId.cxx:156

Member Function Documentation

void remid::ReMId::AddDedx ( double  dedx,
double  distFromStart,
bool  used = true,
bool  vert = false 
)

Definition at line 47 of file ReMId.cxx.

References fdedx, fdedxused, fdedxvert, and ffracDistFromStart.

Referenced by remid::RecoMuon::produce().

48  {
49  fdedx.push_back(dedx);
50  ffracDistFromStart.push_back(distFromStart);
51  fdedxused.push_back(used);
52  fdedxvert.push_back(vert);
53  }
std::vector< double > fdedx
Definition: ReMId.h:69
std::vector< int > fdedxvert
Definition: ReMId.h:70
std::vector< int > fdedxused
Definition: ReMId.h:71
std::vector< double > ffracDistFromStart
Definition: ReMId.h:72
void remid::ReMId::AddScatter ( TVector3  pos,
double  cosScat 
)

Definition at line 40 of file ReMId.cxx.

References fcosScatAngle, and fscatLocation.

Referenced by remid::RecoMuon::produce().

41  {
42  fscatLocation.push_back(pos);
43  fcosScatAngle.push_back(cosScat);
44  }
std::vector< TVector3 > fscatLocation
Definition: ReMId.h:67
std::vector< double > fcosScatAngle
Definition: ReMId.h:68
double remid::ReMId::AvgDedx ( ) const

Definition at line 68 of file ReMId.cxx.

References fdedx, and MECModelEnuComparisons::i.

Referenced by remid::ReMIdValidate::analyze(), caf::FillMuIdVars(), and qeef::QeFinder::produce().

69  {
70  if(fdedx.size() == 0){ return 0;}
71  else{
72  double totDedx = 0;
73  for(unsigned int i = 0; i<fdedx.size();++i){
74  totDedx+=fdedx[i];
75  }
76  return totDedx/((double)fdedx.size());
77  }
78  }
std::vector< double > fdedx
Definition: ReMId.h:69
double remid::ReMId::AvgDedxUsed ( ) const

Definition at line 81 of file ReMId.cxx.

References fdedx, fdedxused, and MECModelEnuComparisons::i.

82  {
83  int ndedxused = 0;
84  double totDedx = 0;
85  for(unsigned int i = 0; i < fdedx.size(); ++i){
86  if(fdedxused[i]){
87  ++ndedxused;
88  totDedx+=fdedx[i];
89  }
90  }
91  if(ndedxused == 0){ return 0;}
92  else{return totDedx/((double)ndedxused); }
93  }
std::vector< double > fdedx
Definition: ReMId.h:69
std::vector< int > fdedxused
Definition: ReMId.h:71
bool remid::ReMId::Contained ( ) const

Definition at line 243 of file ReMId.cxx.

References fCont.

Referenced by remid::ReMIdTrain::analyze(), and caf::FillMuIdVars().

244  {
245  return fCont;
246  }
bool fCont
Definition: ReMId.h:65
double remid::ReMId::CosScat ( unsigned int  i) const

Definition at line 114 of file ReMId.cxx.

References fcosScatAngle, and MECModelEnuComparisons::i.

Referenced by remid::ReMIdValidate::analyze(), and remid::ReMIdTrain::analyze().

115  {
116  return fcosScatAngle[i];
117  }
std::vector< double > fcosScatAngle
Definition: ReMId.h:68
double remid::ReMId::Dedx ( unsigned int  i) const
double remid::ReMId::DedxLocation ( unsigned int  i) const
double remid::ReMId::DedxSeparation ( ) const

Return the dE/dx separation variable used as an input to the kNN that determines the pid value.

Definition at line 199 of file ReMId.cxx.

References fMuonDedxLL, and fPionDedxLL.

Referenced by remid::ReMIdTrain::analyze(), caf::FillMuIdVars(), muonid::MuonIDProd::produce(), and remid::RecoMuon::produce().

200  {
201  return fMuonDedxLL-fPionDedxLL;
202  }
double fMuonDedxLL
Definition: ReMId.h:63
double fPionDedxLL
Definition: ReMId.h:64
bool remid::ReMId::DedxUsed ( unsigned int  i) const
bool remid::ReMId::DedxVertex ( unsigned int  i) const
double remid::ReMId::MeasurementFraction ( ) const

Return the measurement fraction variable used as an input to the kNN that determines the pid value.

Definition at line 213 of file ReMId.cxx.

References util::frac(), NDedx(), and NMeasurementPlanes().

Referenced by caf::FillMuIdVars().

214  {
215  double frac = -1;
216  if(this->NDedx() > 0){
217  frac = ((double)this->NMeasurementPlanes())/((double)this->NDedx());
218  }
219  return frac;
220  }
int NMeasurementPlanes() const
Definition: ReMId.cxx:223
double frac(double x)
Fractional part.
unsigned int NDedx() const
Definition: ReMId.cxx:102
double remid::ReMId::MuonDedxLL ( ) const

Definition at line 144 of file ReMId.cxx.

References fMuonDedxLL.

145  {
146  return fMuonDedxLL;
147  }
double fMuonDedxLL
Definition: ReMId.h:63
double remid::ReMId::MuonScatLL ( ) const

Definition at line 186 of file ReMId.cxx.

References fMuonScatLL.

187  {
188  return fMuonScatLL;
189  }
double fMuonScatLL
Definition: ReMId.h:61
unsigned int remid::ReMId::NDedx ( ) const

Definition at line 102 of file ReMId.cxx.

References fdedx.

Referenced by remid::ReMIdValidate::analyze(), remid::ReMIdTrain::analyze(), remid::ReMIdDedx::analyze(), remid::ReMIdDedxRock::analyze(), remid::ReMIdDedxStudies::analyze(), and MeasurementFraction().

103  {
104  return fdedx.size();
105  }
std::vector< double > fdedx
Definition: ReMId.h:69
int remid::ReMId::NMeasurementPlanes ( ) const

Definition at line 223 of file ReMId.cxx.

References fdedxused, and MECModelEnuComparisons::i.

Referenced by remid::ReMIdTrain::analyze(), remid::ReMIdDedx::analyze(), remid::ReMIdDedxRock::analyze(), remid::ReMIdDedxStudies::analyze(), MeasurementFraction(), and remid::RecoMuon::produce().

224  {
225  int npl = 0;
226  for(unsigned int i = 0; i < fdedxused.size(); ++i){
227  if(fdedxused[i]){ ++npl; }
228  }
229  return npl;
230  }
std::vector< int > fdedxused
Definition: ReMId.h:71
unsigned int remid::ReMId::NScatters ( ) const

Definition at line 96 of file ReMId.cxx.

References fscatLocation.

Referenced by remid::ReMIdValidate::analyze(), and remid::ReMIdTrain::analyze().

97  {
98  return fscatLocation.size();
99  }
std::vector< TVector3 > fscatLocation
Definition: ReMId.h:67
int remid::ReMId::NVertexPlanes ( ) const

Definition at line 233 of file ReMId.cxx.

References fdedxvert, and MECModelEnuComparisons::i.

Referenced by remid::ReMIdTrain::analyze(), and remid::RecoMuon::produce().

234  {
235  int npl = 0;
236  for(unsigned int i = 0; i< fdedxvert.size(); ++i){
237  if(fdedxvert[i]){ ++npl; }
238  }
239  return npl;
240  }
std::vector< int > fdedxvert
Definition: ReMId.h:70
int rb::PID::Pdg ( ) const
inlineinherited

Definition at line 21 of file PID.h.

References rb::PID::fPdg.

Referenced by qeef::QeFinderVal::analyze().

21 {return fPdg; }
int fPdg
pdg code
Definition: PID.h:27
double remid::ReMId::PionDedxLL ( ) const

Definition at line 150 of file ReMId.cxx.

References fPionDedxLL.

151  {
152  return fPionDedxLL;
153  }
double fPionDedxLL
Definition: ReMId.h:64
double remid::ReMId::PionScatLL ( ) const

Definition at line 192 of file ReMId.cxx.

References fPionScatLL.

193  {
194  return fPionScatLL;
195  }
double fPionScatLL
Definition: ReMId.h:62
TVector3 remid::ReMId::ScatLocation ( unsigned int  i) const

Definition at line 108 of file ReMId.cxx.

References fscatLocation, and MECModelEnuComparisons::i.

Referenced by remid::ReMIdTrain::analyze().

109  {
110  return fscatLocation[i];
111  }
std::vector< TVector3 > fscatLocation
Definition: ReMId.h:67
double remid::ReMId::ScatSeparation ( ) const

Return the scattering separation variable used as an input to the kNN that determines the pid value.

Definition at line 206 of file ReMId.cxx.

References fMuonScatLL, and fPionScatLL.

Referenced by remid::ReMIdTrain::analyze(), caf::FillMuIdVars(), muonid::MuonIDProd::produce(), and remid::RecoMuon::produce().

207  {
208  return fMuonScatLL-fPionScatLL;
209  }
double fMuonScatLL
Definition: ReMId.h:61
double fPionScatLL
Definition: ReMId.h:62
void remid::ReMId::SetContained ( bool  cont)

Definition at line 180 of file ReMId.cxx.

References fCont.

Referenced by remid::RecoMuon::produce().

181  {
182  fCont = cont;
183  }
bool fCont
Definition: ReMId.h:65
void remid::ReMId::SetDedxUsed ( unsigned int  idx,
bool  used 
)

Definition at line 168 of file ReMId.cxx.

References fdedxused, and compare_h5_caf::idx.

Referenced by remid::RecoMuon::produce().

169  {
170  fdedxused[idx] = used;
171  }
std::vector< int > fdedxused
Definition: ReMId.h:71
void remid::ReMId::SetDedxVertex ( unsigned int  idx,
bool  vert 
)

Definition at line 174 of file ReMId.cxx.

References fdedxvert, and compare_h5_caf::idx.

Referenced by remid::RecoMuon::produce().

175  {
176  fdedxvert[idx] = vert;
177  }
std::vector< int > fdedxvert
Definition: ReMId.h:70
void remid::ReMId::SetMuonDedxLL ( double  ll)

Definition at line 56 of file ReMId.cxx.

References fMuonDedxLL.

Referenced by remid::RecoMuon::produce(), and ReMId().

57  {
58  fMuonDedxLL = ll;
59  }
double fMuonDedxLL
Definition: ReMId.h:63
void remid::ReMId::SetMuonScatLL ( double  ll)

Definition at line 156 of file ReMId.cxx.

References fMuonScatLL.

Referenced by remid::RecoMuon::produce(), and ReMId().

157  {
158  fMuonScatLL = ll;
159  }
double fMuonScatLL
Definition: ReMId.h:61
void rb::PID::SetPdg ( int  pdg)
inlineinherited
void remid::ReMId::SetPionDedxLL ( double  ll)

Definition at line 62 of file ReMId.cxx.

References fPionDedxLL.

Referenced by remid::RecoMuon::produce(), and ReMId().

63  {
64  fPionDedxLL = ll;
65  }
double fPionDedxLL
Definition: ReMId.h:64
void remid::ReMId::SetPionScatLL ( double  ll)

Definition at line 162 of file ReMId.cxx.

References fPionScatLL.

Referenced by remid::RecoMuon::produce().

163  {
164  fPionScatLL = ll;
165  }
double fPionScatLL
Definition: ReMId.h:62
void rb::PID::SetVal ( double  val)
inlineinherited
double rb::PID::Value ( ) const
inlineinherited

Member Data Documentation

bool remid::ReMId::fCont
protected

Definition at line 65 of file ReMId.h.

Referenced by Contained(), and SetContained().

std::vector<double> remid::ReMId::fcosScatAngle
protected

Definition at line 68 of file ReMId.h.

Referenced by AddScatter(), and CosScat().

std::vector<double> remid::ReMId::fdedx
protected

Definition at line 69 of file ReMId.h.

Referenced by AddDedx(), AvgDedx(), AvgDedxUsed(), Dedx(), and NDedx().

std::vector<int> remid::ReMId::fdedxused
protected

Definition at line 71 of file ReMId.h.

Referenced by AddDedx(), AvgDedxUsed(), DedxUsed(), NMeasurementPlanes(), and SetDedxUsed().

std::vector<int> remid::ReMId::fdedxvert
protected

Definition at line 70 of file ReMId.h.

Referenced by AddDedx(), DedxVertex(), NVertexPlanes(), and SetDedxVertex().

std::vector<double> remid::ReMId::ffracDistFromStart
protected

Definition at line 72 of file ReMId.h.

Referenced by AddDedx(), and DedxLocation().

double remid::ReMId::fMuonDedxLL
protected

Definition at line 63 of file ReMId.h.

Referenced by DedxSeparation(), MuonDedxLL(), and SetMuonDedxLL().

double remid::ReMId::fMuonScatLL
protected

Definition at line 61 of file ReMId.h.

Referenced by MuonScatLL(), ScatSeparation(), and SetMuonScatLL().

int rb::PID::fPdg
protectedinherited

pdg code

Definition at line 27 of file PID.h.

Referenced by lem::PIDDetails::FromString(), rb::PID::Pdg(), and rb::PID::SetPdg().

double remid::ReMId::fPionDedxLL
protected

Definition at line 64 of file ReMId.h.

Referenced by DedxSeparation(), PionDedxLL(), and SetPionDedxLL().

double remid::ReMId::fPionScatLL
protected

Definition at line 62 of file ReMId.h.

Referenced by PionScatLL(), ScatSeparation(), and SetPionScatLL().

std::vector<TVector3> remid::ReMId::fscatLocation
protected

Definition at line 67 of file ReMId.h.

Referenced by AddScatter(), NScatters(), and ScatLocation().

double rb::PID::fVal
protectedinherited

pid value

Definition at line 28 of file PID.h.

Referenced by lem::PIDDetails::FromString(), rb::PID::SetVal(), lem::PIDDetails::ToString(), and rb::PID::Value().


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