Skip to content
Merged
2 changes: 2 additions & 0 deletions sbnanaobj/StandardRecord/SRTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "sbnanaobj/StandardRecord/SRTrackTruth.h"
#include "sbnanaobj/StandardRecord/SRTrkChi2PID.h"
#include "sbnanaobj/StandardRecord/SRTrkLikePID.h"
#include "sbnanaobj/StandardRecord/SRTrkMCS.h"
#include "sbnanaobj/StandardRecord/SRTrkRange.h"
#include "sbnanaobj/StandardRecord/SRCRTHitMatch.h"
Expand Down Expand Up @@ -45,6 +46,7 @@ namespace caf
SRVector3D end; ///< End point of track

SRTrkChi2PID chi2pid[3]; ///< Per-plane Chi2 Particle ID
SRTrkLikePID likepid[3]; ///< Per-plane likelihood-based Particle ID variabeles (lambda = \Sigma -lnL/L_max where \Sigma is done over hits)
SRTrackCalo calo[3]; ///< Per-plane Calorimetry information
Plane_t bestplane; ///< Plane index with the most hits. -1 if no calorimetry

Expand Down
34 changes: 34 additions & 0 deletions sbnanaobj/StandardRecord/SRTrkLikePID.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
////////////////////////////////////////////////////////////////////////
// \file SRTrkLikePID.cxx
Comment thread
henrylay97 marked this conversation as resolved.
Outdated
// \brief An SRTrkLikePID is a high level track ParticlePID object for
// for larana LikelihoodPIDAlg results.
////////////////////////////////////////////////////////////////////////

#include "sbnanaobj/StandardRecord/SRTrkLikePID.h"

#include <limits>

namespace caf
{

SRTrkLikePID::SRTrkLikePID():
pdg(-999),
pid_ndof(-99),
lambda_muon(std::numeric_limits<float>::signaling_NaN()),
lambda_pion(std::numeric_limits<float>::signaling_NaN()),
lambda_proton(std::numeric_limits<float>::signaling_NaN())
{ }

SRTrkLikePID::~SRTrkLikePID(){ }

void SRTrkLikePID::setDefault()
{
pdg = -5;
pid_ndof = -5;
lambda_muon = -5.0;
lambda_pion = -5.0;
lambda_proton = -5.0;
}

} // end namespace caf
////////////////////////////////////////////////////////////////////////
29 changes: 29 additions & 0 deletions sbnanaobj/StandardRecord/SRTrkLikePID.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
////////////////////////////////////////////////////////////////////////
// \file SRTrkLikePID.h
////////////////////////////////////////////////////////////////////////
#ifndef SRTRKLIKEPID_H
#define SRTRKLIKEPID_H

namespace caf
{
/// Track PID from dE/dx v. likelihood from dE/dx PDF measured with residual range-based kinetic energy and hit pitch
class SRTrkLikePID
{
public:

SRTrkLikePID();
virtual ~SRTrkLikePID();

int pdg; ///< Likelihood PID pdg
int pid_ndof; ///< Number of degress of freedom in likelihood PID
float lambda_muon; ///< Sum of -lnL/L_max (muon hypothesis)
float lambda_pion; ///< Sum of -lnL/L_max (charged pion hypothesis)
float lambda_proton; ///< Sum of -lnL/L_max (proton hypothesis)

void setDefault();
};

} // end namespace

#endif // SRTRKLIKEPID_H
//////////////////////////////////////////////////////////////////////////////
3 changes: 2 additions & 1 deletion sbnanaobj/StandardRecord/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
<version ClassVersion="10" checksum="3777054621"/>
</class>

<class name="caf::SRTrack" ClassVersion="15">
<class name="caf::SRTrack" ClassVersion="16">
<version ClassVersion="16" checksum="2837285941"/>
<version ClassVersion="15" checksum="175611744"/>
<version ClassVersion="14" checksum="3934033130"/>
<version ClassVersion="13" checksum="522362999"/>
Comment thread
henrylay97 marked this conversation as resolved.
Expand Down