#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-16/ShowerLID/ParticleIDAlg.h"
Public Member Functions | |
ParticleIDAlg (fhicl::ParameterSet const &pset, novadaq::cnv::DetId detId, NuEEnergyAlg *NuEEnergyAlgIn, bool loadLibs=true) | |
~ParticleIDAlg () | |
void | reconfigure (const fhicl::ParameterSet &pset, novadaq::cnv::DetId detId) |
Reinitialize parameters read from FCL file. More... | |
double | DedxTransLL (const slid::DedxParticleType partHyp, const rb::Shower *vShower, const std::vector< const rb::Shower * > showercol, const art::Event &evt) |
Calculate transverse dE/dx log-likelihood for specific particle hypothesis. More... | |
double | DedxLongLL (const slid::DedxParticleType partHyp, const rb::Shower *vShower, const std::vector< const rb::Shower * > showercol, const art::Event &evt) |
Calculate longitudinal dE/dx log-likelihood for specific particle hypothesis. More... | |
double | DedxInverseLongLL (const slid::DedxParticleType partHyp, const rb::Shower *vShower, const std::vector< const rb::Shower * > showercol, const art::Event &evt) |
Calculate longitudinal dE/dx log-likelihood for specific particle hypothesis assuming that the particle direction if opposite to the reconstructed direction. More... | |
void | SetShower (const rb::Shower *vShower, const std::vector< const rb::Shower * > showercol, const art::Event &evt) |
Set rb::Prong to be analyzed. This must be set before any calculations can be done. More... | |
double | GetGapVertexToShowerStart (const rb::Shower *vShower, TVector3 evtVtx, const art::Event &evt) |
Calculate the gap between the vertex and the start of the shower. More... | |
double | Pi0Mass (const std::vector< const rb::Shower * > showerCollection, unsigned int iShower, const art::Event &evt) |
Calculate the mass of candidate and any other shower in the slice that is closest to the pi0 mass. More... | |
int | Pi0SecondPhoton (const std::vector< const rb::Shower * > showerCollection, unsigned int iShower, const art::Event &evt) |
Index in showerCollection of the shower for which the reconstructed invariant mass was closest to pi0 mass for the shower at index iShower. More... | |
double | Radius (const std::vector< const rb::Shower * > showerCollection, unsigned int iShower, const art::Event &evt) |
Calculate the shower radius. More... | |
double | PlaneLongDedx (unsigned int pIdx) |
return longitudinal dedx for a specified plane index More... | |
double | PlaneTransDedx (unsigned int tpIdx) |
return transverse dedx for specified transverse plane More... | |
double | CellPlaneDedx (int tpIdx, unsigned int pIdx) |
return transverse dedx for specified transverse plane More... | |
double | PlaneRadius (unsigned int pIdx) |
return shower radius for a plane index More... | |
TVector3 | PlaneHitXYZ (unsigned int pIdx) |
Return point of intersection between shower core and plane. More... | |
double | PlaneHitCell (unsigned int pIdx) |
Return point of intersection cell between shower core and plane. More... | |
unsigned int | PlaneToGlobalPlane (unsigned int pIdx) |
Return the gloabel plane index for an index in the shower coordinate. More... | |
double | PlaneCentroid (unsigned int pIdx) |
Return the energy weighted mean shower positon for the plane in cm. More... | |
double | ShowerAsym () const |
Return the asymmetry of the shower. More... | |
TVector3 | InertiaXYZ () const |
Return the inertia calculation. More... | |
double | PointDoca (TVector3 vtx, TVector3 start, TVector3 stop) |
Get distance of closest approach between shower and vertex. More... | |
int | GetMIPPlanes (const rb::Shower *shower, const std::vector< const rb::Shower * > showercol, const art::Event &evt) |
Number of MIP planes within the first 20 planes of the start of the shower. More... | |
Public Attributes | |
std::map< int, float > | fPartLongLL |
Map of the longitudinal ll by paricle type. More... | |
std::map< int, float > | fPartTransLL |
Map of the transverse ll by particle type. More... | |
Private Member Functions | |
double | CalcPlaneLongitudinalDedx (unsigned int plane) |
Calculate the longitudinal dE/dx in a given plane. Input is the actuall plane number in the detector. More... | |
double | CalcPlaneTransverseDedx (unsigned int iTransversePlane) |
Calculate the transverse dE/dx in a given tranverse slice. Input is the transverse slice index. More... | |
double | CalcCellPlaneTransverseDedx (int iTransversePlane, unsigned int iPlane) |
Calculate the transverse dE/dx in a given tranverse cell and plane. Input is the transverse slice index, including plus and minus to the shower core, and plane number. More... | |
std::map< int, std::map< int, int > > | CalcPlaneHits (const rb::Shower *vShower) |
Return a map off all hits in a given longitudinal plane indexed by the longitudinalplane for shower already read into object by SetShower. More... | |
std::map< int, double > | CalcPlaneCentroid (const rb::Shower *vShower) |
Return a map of mean cell posisiton for each plane for shower already read into object by SetShower. More... | |
double | CalcEnergyInLongitudinalPlane (int iPlane) |
Sum the energy in a longitudinal plane. More... | |
void | CalcDetectorXYRegionIndex () |
Determine detector XY region. More... | |
double | CalcPlaneLongDedxProb (DedxParticleType particleType, int igev, unsigned int iPlane, unsigned int plane) |
Get longitudinal dE/dx probability for a given longitudinal plane, energy bin, and particle hypothesis. More... | |
double | CalcPlaneTransDedxProb (DedxParticleType particleType, int igev, unsigned int iTransversePlane) |
Get transverse dE/dx probability for a given transverse plane, energy bin, and particle hypothesis. More... | |
double | CalcInterPlaneDedxProb (DedxParticleType type, unsigned int iLongPlane, unsigned int plane) |
From Jianming's code, still working out changes. More... | |
double | CalcInterCellTransDedxProb (const DedxParticleType type, unsigned int iTransPlane) |
From Jianming's code, still working out changes. More... | |
bool | LoadDedxHistogramFiles (const fhicl::ParameterSet &pset, novadaq::cnv::DetId geom) |
Load all of the histograms from files into arrays of TH1D* objects. The details of handling the histograms are taken care of within object of the helper class slid::DedxDistribution. More... | |
double | CalcTrkHitPath (unsigned int plane) |
Calculate path length of shower through this plane. More... | |
void | CalculateEnergyBinIndex () |
Calculate energy bin indices and energy values from the histograms corresponding energy of shower to be used to interpolate between bins in energy. More... | |
void | CalcAsymIneria () |
Calculate the asymmetry and inertia of the shower. More... | |
TVector3 | GetCellNodePos (unsigned int plane1, unsigned int cell1, unsigned int plane2, unsigned int cell2) |
Helper function for interia and asymmetry calculation. More... | |
Private Attributes | |
art::EventID | eventID |
data/MC flag More... | |
double | fClosestPi0Mass |
Closest mass to pi0 mass formed by this shower and any other shower in the slice. More... | |
std::vector< slid::DedxDistribution > | fDedxDistributions |
dE/dx distributions (histogram files and data) for each detector type and particle category More... | |
const rb::Shower * | fShower |
rb::Shower object for which particle ID is to be calculated. This is cached. More... | |
std::vector< const rb::Shower * > | fShowerCol |
double | fShowerEnergyGev |
Shower energy. More... | |
art::ServiceHandle< geo::Geometry > | fGeom |
geometry More... | |
NuEEnergyAlg * | fNuEEnergyAlg |
Nue energy algorithms. More... | |
std::map< int, double > | fDedxLongByPlane |
std::map< int, double > | fDedxTransByPlane |
std::map< int, std::map< int, int > > | fPlaneHits |
std::map< unsigned int, unsigned int > | fMapIdxToGlobalPlane |
std::map< int, double > | fPlaneCentroid |
std::map< int, double > | fTransEnergy |
Map of transverse energy for each transverse plane. More... | |
std::map< int, double > | fTransPathLength |
Map of path length for each transverse plane. More... | |
int | fPi0Index |
int | iReg |
Detector sub-region bin. Calculated once and cached for a given shower/event combo. More... | |
TVector3 | pos |
Shower start position. More... | |
int | igev0 |
Shower adjacent energy bins. Calculated once and cached for a given shower/event combo. More... | |
int | igev1 |
double | e0 |
Energy values of energy bins adjacent to shower. Calculated once and cached for a given shower/event combo. More... | |
double | e1 |
TVector3 | fIxyz |
shower moment of ineria More... | |
double | fAsym |
shower asymmetry More... | |
double | fMipRangeHigh |
Upper bound of MIP Range. More... | |
double | fMipRangeLow |
Lower bound of MIP Range. More... | |
novadaq::cnv::DetId | fDetId |
Detector ID. More... | |
Definition at line 50 of file ParticleIDAlg.h.
|
explicit |
Definition at line 30 of file ParticleIDAlg.cxx.
References LoadDedxHistogramFiles().
slid::ParticleIDAlg::~ParticleIDAlg | ( | ) |
Definition at line 49 of file ParticleIDAlg.cxx.
|
private |
Calculate the asymmetry and inertia of the shower.
Definition at line 1037 of file ParticleIDAlg.cxx.
References slid::NuEEnergyAlg::CellEnergy(), rb::Prong::Dir(), e, eventID, stan::math::fabs(), fAsym, fIxyz, fMapIdxToGlobalPlane, fNuEEnergyAlg, fPlaneHits, fShower, fShowerCol, geom(), GetCellNodePos(), Mag(), file_size_ana::node, geo::GeometryBase::Plane(), PlaneHitXYZ(), cet::pow(), r(), std::sqrt(), rb::Prong::Start(), and geo::PlaneGeo::View().
Referenced by SetShower().
|
private |
Calculate the transverse dE/dx in a given tranverse cell and plane. Input is the transverse slice index, including plus and minus to the shower core, and plane number.
Definition at line 607 of file ParticleIDAlg.cxx.
References abs(), CalcTrkHitPath(), slid::NuEEnergyAlg::CellEnergy(), dir, rb::Prong::Dir(), eventID, stan::math::fabs(), fGeom, fMapIdxToGlobalPlane, fNuEEnergyAlg, fPlaneCentroid, fPlaneHits, fShower, fShowerCol, makeTrainCVSamples::int, std::isnan(), geo::PlaneGeo::Ncells(), path, geo::GeometryBase::Plane(), and PlaneHitCell().
Referenced by CellPlaneDedx().
|
private |
Determine detector XY region.
Definition at line 416 of file ParticleIDAlg.cxx.
References fDetId, fShower, iReg, cmf::kFARDET, pos, rb::Prong::Start(), and rb::Shower::Stop().
Referenced by SetShower().
|
private |
Sum the energy in a longitudinal plane.
Definition at line 492 of file ParticleIDAlg.cxx.
References slid::NuEEnergyAlg::CellEnergy(), slid::NuEEnergyAlg::ECorrMC(), eventID, fNuEEnergyAlg, fPlaneHits, fShower, fShowerCol, and std::isnan().
Referenced by CalcPlaneLongitudinalDedx().
|
private |
From Jianming's code, still working out changes.
Definition at line 756 of file ParticleIDAlg.cxx.
References CalcPlaneTransDedxProb(), e0, e1, igev0, and igev1.
Referenced by DedxTransLL().
|
private |
From Jianming's code, still working out changes.
Definition at line 729 of file ParticleIDAlg.cxx.
References CalcPlaneLongDedxProb(), std::cos(), rb::Prong::Dir(), e0, e1, stan::math::fabs(), fShower, igev0, igev1, and makeTrainCVSamples::int.
Referenced by DedxLongLL().
|
private |
Return a map of mean cell posisiton for each plane for shower already read into object by SetShower.
Definition at line 278 of file ParticleIDAlg.cxx.
References slid::NuEEnergyAlg::CellEnergy(), cellPos(), eventID, fNuEEnergyAlg, fPlaneHits, fShowerCol, and std::isnan().
Referenced by SetShower().
|
private |
Return a map off all hits in a given longitudinal plane indexed by the longitudinalplane for shower already read into object by SetShower.
Definition at line 241 of file ParticleIDAlg.cxx.
References rb::CellHit::Cell(), rb::Cluster::Cell(), rb::Prong::Dir(), fMapIdxToGlobalPlane, MECModelEnuComparisons::i, rb::Cluster::MaxPlane(), rb::Cluster::MinPlane(), rb::Cluster::NCell(), ncells, and rb::CellHit::Plane().
Referenced by SetShower().
|
private |
Get longitudinal dE/dx probability for a given longitudinal plane, energy bin, and particle hypothesis.
Definition at line 696 of file ParticleIDAlg.cxx.
References CalcPlaneLongitudinalDedx(), fDedxDistributions, GetEntries(), HandyFuncs::Interpolate(), iReg, slid::kNumEnergyBin, slid::kNumLongitudinalPlane, and slid::kNumXYRegion.
Referenced by CalcInterPlaneDedxProb().
|
private |
Calculate the longitudinal dE/dx in a given plane. Input is the actuall plane number in the detector.
Definition at line 506 of file ParticleIDAlg.cxx.
References CalcEnergyInLongitudinalPlane(), CalcTrkHitPath(), and fDedxLongByPlane.
Referenced by CalcPlaneLongDedxProb(), GetMIPPlanes(), and PlaneLongDedx().
|
private |
Get transverse dE/dx probability for a given transverse plane, energy bin, and particle hypothesis.
Definition at line 713 of file ParticleIDAlg.cxx.
References CalcPlaneTransverseDedx(), fDedxDistributions, GetEntries(), HandyFuncs::Interpolate(), iReg, slid::kNumEnergyBin, slid::kNumTransversePlane, and slid::kNumXYRegion.
Referenced by CalcInterCellTransDedxProb().
|
private |
Calculate the transverse dE/dx in a given tranverse slice. Input is the transverse slice index.
Definition at line 530 of file ParticleIDAlg.cxx.
References CalcTrkHitPath(), slid::NuEEnergyAlg::CellEnergy(), dir, rb::Prong::Dir(), eventID, stan::math::fabs(), fDedxTransByPlane, fGeom, fNuEEnergyAlg, fPlaneCentroid, fPlaneHits, fShower, fShowerCol, fTransEnergy, fTransPathLength, makeTrainCVSamples::int, std::isnan(), geo::PlaneGeo::Ncells(), and geo::GeometryBase::Plane().
Referenced by CalcPlaneTransDedxProb(), DedxTransLL(), and PlaneTransDedx().
|
private |
Calculate path length of shower through this plane.
Definition at line 473 of file ParticleIDAlg.cxx.
References geo::PlaneGeo::Cell(), rb::Prong::Dir(), e, stan::math::fabs(), fGeom, fPlaneHits, fShower, geo::CellGeo::HalfD(), Mag(), geo::GeometryBase::Plane(), util::pythag(), rb::Prong::Start(), and rb::Shower::Stop().
Referenced by CalcCellPlaneTransverseDedx(), CalcPlaneLongitudinalDedx(), and CalcPlaneTransverseDedx().
|
private |
Calculate energy bin indices and energy values from the histograms corresponding energy of shower to be used to interpolate between bins in energy.
Definition at line 440 of file ParticleIDAlg.cxx.
References e0, e1, fShowerEnergyGev, igev0, igev1, slid::kEnergyBins, and slid::kNumEnergyBin.
Referenced by SetShower().
return transverse dedx for specified transverse plane
Definition at line 891 of file ParticleIDAlg.cxx.
References CalcCellPlaneTransverseDedx(), om::cout, allTimeWatchdog::endl, and slid::kNumTransversePlane.
Referenced by slid::LIDTraining::analyze(), and slid::LIDBuilder::produce().
double slid::ParticleIDAlg::DedxInverseLongLL | ( | const slid::DedxParticleType | partHyp, |
const rb::Shower * | vShower, | ||
const std::vector< const rb::Shower * > | showercol, | ||
const art::Event & | evt | ||
) |
Calculate longitudinal dE/dx log-likelihood for specific particle hypothesis assuming that the particle direction if opposite to the reconstructed direction.
Calculate longitudinal dE/dx log-likelihood for specific particle hypothesis.
Definition at line 150 of file ParticleIDAlg.cxx.
References DedxLongLL(), rb::Prong::Dir(), rb::Prong::SetDir(), rb::Prong::SetStart(), and rb::Shower::Stop().
Referenced by slid::LIDBuilder::produce().
double slid::ParticleIDAlg::DedxLongLL | ( | const slid::DedxParticleType | partHyp, |
const rb::Shower * | vShower, | ||
const std::vector< const rb::Shower * > | showercol, | ||
const art::Event & | evt | ||
) |
Calculate longitudinal dE/dx log-likelihood for specific particle hypothesis.
Definition at line 101 of file ParticleIDAlg.cxx.
References CalcInterPlaneDedxProb(), rb::Prong::Dir(), fPartLongLL, fPlaneHits, test_ParserArtEvents::log, and SetShower().
Referenced by DedxInverseLongLL(), slid::LIDBuilder::produce(), and slid::SPIDBuilder::produce().
double slid::ParticleIDAlg::DedxTransLL | ( | const slid::DedxParticleType | partHyp, |
const rb::Shower * | vShower, | ||
const std::vector< const rb::Shower * > | showercol, | ||
const art::Event & | evt | ||
) |
Calculate transverse dE/dx log-likelihood for specific particle hypothesis.
Definition at line 68 of file ParticleIDAlg.cxx.
References CalcInterCellTransDedxProb(), CalcPlaneTransverseDedx(), fPartTransLL, slid::kNumTransversePlane, test_ParserArtEvents::log, and SetShower().
Referenced by slid::LIDBuilder::produce(), and slid::SPIDBuilder::produce().
|
private |
Helper function for interia and asymmetry calculation.
Definition at line 1116 of file ParticleIDAlg.cxx.
References geo::PlaneGeo::Cell(), geom(), geo::CellGeo::GetCenter(), geo::kX, geo::kY, geo::GeometryBase::Plane(), geo::PlaneGeo::View(), submit_syst::x, submit_syst::y, and test::z.
Referenced by CalcAsymIneria().
double slid::ParticleIDAlg::GetGapVertexToShowerStart | ( | const rb::Shower * | vShower, |
TVector3 | evtVtx, | ||
const art::Event & | evt | ||
) |
Calculate the gap between the vertex and the start of the shower.
Definition at line 767 of file ParticleIDAlg.cxx.
References Mag(), PointDoca(), std::sqrt(), rb::Prong::Start(), and rb::Shower::Stop().
Referenced by slid::LIDBuilder::produce().
int slid::ParticleIDAlg::GetMIPPlanes | ( | const rb::Shower * | shower, |
const std::vector< const rb::Shower * > | showercol, | ||
const art::Event & | evt | ||
) |
Number of MIP planes within the first 20 planes of the start of the shower.
Definition at line 1141 of file ParticleIDAlg.cxx.
References CalcPlaneLongitudinalDedx(), confusionMatrixTree::count, fMipRangeHigh, fMipRangeLow, fPlaneHits, and SetShower().
Referenced by slid::LIDBuilder::produce().
|
inline |
Return the inertia calculation.
Definition at line 134 of file ParticleIDAlg.h.
References febshutoff_auto::start.
|
private |
Load all of the histograms from files into arrays of TH1D* objects. The details of handling the histograms are taken care of within object of the helper class slid::DedxDistribution.
FD dE/dx input histogram files
NDOS dE/dx input histograms
ND dE/dx input histograms
Definition at line 306 of file ParticleIDAlg.cxx.
References om::cout, allTimeWatchdog::endl, util::EnvExpansion(), fDedxDistributions, fhicl::ParameterSet::get(), slid::kELECTRON, slid::kELECTRONCCCOH, slid::kELECTRONCCDIS, slid::kELECTRONCCQE, slid::kELECTRONCCRES, cmf::kFARDET, slid::kMUON, novadaq::cnv::kNDOS, cmf::kNEARDET, slid::kNEUTRON, slid::kPHOTON, slid::kPI0, slid::kPION, slid::kPROTON, and string.
Referenced by ParticleIDAlg().
double slid::ParticleIDAlg::Pi0Mass | ( | const std::vector< const rb::Shower * > | showerCollection, |
unsigned int | iShower, | ||
const art::Event & | evt | ||
) |
Calculate the mass of candidate and any other shower in the slice that is closest to the pi0 mass.
Definition at line 799 of file ParticleIDAlg.cxx.
References e, evt, stan::math::fabs(), fClosestPi0Mass, fNuEEnergyAlg, fPi0Index, std::isnan(), calib::j, SetShower(), and slid::NuEEnergyAlg::ShowerEnergy().
Referenced by Pi0SecondPhoton(), and slid::LIDBuilder::produce().
int slid::ParticleIDAlg::Pi0SecondPhoton | ( | const std::vector< const rb::Shower * > | showerCollection, |
unsigned int | iShower, | ||
const art::Event & | evt | ||
) |
Index in showerCollection of the shower for which the reconstructed invariant mass was closest to pi0 mass for the shower at index iShower.
Definition at line 835 of file ParticleIDAlg.cxx.
References fPi0Index, fShower, and Pi0Mass().
Referenced by slid::LIDBuilder::produce().
double slid::ParticleIDAlg::PlaneCentroid | ( | unsigned int | pIdx | ) |
Return the energy weighted mean shower positon for the plane in cm.
Definition at line 1024 of file ParticleIDAlg.cxx.
References fMapIdxToGlobalPlane, fPlaneCentroid, and it.
double slid::ParticleIDAlg::PlaneHitCell | ( | unsigned int | pIdx | ) |
Return point of intersection cell between shower core and plane.
Definition at line 968 of file ParticleIDAlg.cxx.
References geo::PlaneGeo::Cell(), om::cout, rb::Prong::Dir(), allTimeWatchdog::endl, stan::math::fabs(), fMapIdxToGlobalPlane, fShower, geom(), geo::CellGeo::GetCenter(), geo::CellGeo::HalfW(), geo::kX, geo::kY, geo::PlaneGeo::Ncells(), geo::GeometryBase::Plane(), NDAPDHVSetting::plane, rb::Prong::Start(), rb::Shower::Stop(), POTSpillRate::view, and geo::PlaneGeo::View().
Referenced by CalcCellPlaneTransverseDedx().
TVector3 slid::ParticleIDAlg::PlaneHitXYZ | ( | unsigned int | pIdx | ) |
Return point of intersection between shower core and plane.
Definition at line 938 of file ParticleIDAlg.cxx.
References geo::PlaneGeo::Cell(), rb::Prong::Dir(), stan::math::fabs(), fMapIdxToGlobalPlane, fShower, geom(), geo::CellGeo::GetCenter(), geo::GeometryBase::Plane(), rb::Prong::Start(), and rb::Shower::Stop().
Referenced by slid::LIDTraining::analyze(), and CalcAsymIneria().
double slid::ParticleIDAlg::PlaneLongDedx | ( | unsigned int | pIdx | ) |
return longitudinal dedx for a specified plane index
Definition at line 870 of file ParticleIDAlg.cxx.
References CalcPlaneLongitudinalDedx(), om::cout, allTimeWatchdog::endl, and fMapIdxToGlobalPlane.
Referenced by slid::LIDTraining::analyze(), slid::LIDBuilder::produce(), and slid::SPIDBuilder::produce().
double slid::ParticleIDAlg::PlaneRadius | ( | unsigned int | pIdx | ) |
return shower radius for a plane index
Definition at line 901 of file ParticleIDAlg.cxx.
References rb::CellHit::Cell(), rb::Cluster::Cell(), slid::NuEEnergyAlg::CellEnergy(), geo::ClosestApproach(), om::cout, dir, rb::Prong::Dir(), dist, allTimeWatchdog::endl, eventID, fGeom, fMapIdxToGlobalPlane, fNuEEnergyAlg, fPlaneHits, fShower, fShowerCol, it, geo::kX, rb::CellHit::Plane(), geo::GeometryBase::Plane(), Munits::rad, std::sqrt(), febshutoff_auto::start, rb::Prong::Start(), and rb::CellHit::View().
Referenced by slid::LIDTraining::analyze().
Return the gloabel plane index for an index in the shower coordinate.
Definition at line 930 of file ParticleIDAlg.cxx.
References fMapIdxToGlobalPlane.
Referenced by slid::LIDTraining::analyze().
double slid::ParticleIDAlg::PlaneTransDedx | ( | unsigned int | tpIdx | ) |
return transverse dedx for specified transverse plane
Definition at line 881 of file ParticleIDAlg.cxx.
References CalcPlaneTransverseDedx(), om::cout, allTimeWatchdog::endl, and slid::kNumTransversePlane.
Referenced by slid::LIDTraining::analyze().
double slid::ParticleIDAlg::PointDoca | ( | TVector3 | vtx, |
TVector3 | start, | ||
TVector3 | stop | ||
) |
Get distance of closest approach between shower and vertex.
Definition at line 786 of file ParticleIDAlg.cxx.
References d, Mag(), and febshutoff_auto::start.
Referenced by GetGapVertexToShowerStart(), slid::LIDBuilder::produce(), slid::SPIDBuilder::produce(), and cosrej::MakeNueCosRej::produce().
double slid::ParticleIDAlg::Radius | ( | const std::vector< const rb::Shower * > | showerCollection, |
unsigned int | iShower, | ||
const art::Event & | evt | ||
) |
Calculate the shower radius.
Definition at line 846 of file ParticleIDAlg.cxx.
References rb::CellHit::Cell(), rb::Cluster::Cell(), slid::NuEEnergyAlg::CellEnergy(), geo::ClosestApproach(), dir, rb::Prong::Dir(), dist, eventID, evt, fGeom, fNuEEnergyAlg, fShower, fShowerCol, geo::kX, rb::Cluster::NCell(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), Munits::rad, SetShower(), std::sqrt(), febshutoff_auto::start, rb::Prong::Start(), and rb::CellHit::View().
Referenced by slid::LIDBuilder::produce().
void slid::ParticleIDAlg::reconfigure | ( | const fhicl::ParameterSet & | pset, |
novadaq::cnv::DetId | detId | ||
) |
Reinitialize parameters read from FCL file.
Definition at line 54 of file ParticleIDAlg.cxx.
void slid::ParticleIDAlg::SetShower | ( | const rb::Shower * | vShower, |
const std::vector< const rb::Shower * > | showercol, | ||
const art::Event & | evt | ||
) |
Set rb::Prong to be analyzed. This must be set before any calculations can be done.
Set rb::Shower object to be analyzed. Calculate its total energy, which will be needed for calculations.
vShower | |
evt |
Definition at line 169 of file ParticleIDAlg.cxx.
References CalcAsymIneria(), CalcDetectorXYRegionIndex(), CalcPlaneCentroid(), CalcPlaneHits(), CalculateEnergyBinIndex(), e, gov::fnal::cd::rms::provider::equal(), eventID, fAsym, fDedxLongByPlane, fDedxTransByPlane, fIxyz, fMapIdxToGlobalPlane, fNuEEnergyAlg, fPartLongLL, fPartTransLL, fPi0Index, fPlaneCentroid, fPlaneHits, fShower, fShowerCol, fShowerEnergyGev, fTransEnergy, fTransPathLength, art::Event::id(), rb::Cluster::ID(), std::isnan(), and slid::NuEEnergyAlg::ShowerEnergy().
Referenced by slid::LIDTraining::analyze(), DedxLongLL(), DedxTransLL(), GetMIPPlanes(), Pi0Mass(), slid::LIDBuilder::produce(), slid::SPIDBuilder::produce(), and Radius().
|
inline |
|
private |
Energy values of energy bins adjacent to shower. Calculated once and cached for a given shower/event combo.
Definition at line 280 of file ParticleIDAlg.h.
Referenced by CalcInterCellTransDedxProb(), CalcInterPlaneDedxProb(), and CalculateEnergyBinIndex().
|
private |
Definition at line 281 of file ParticleIDAlg.h.
Referenced by CalcInterCellTransDedxProb(), CalcInterPlaneDedxProb(), and CalculateEnergyBinIndex().
|
private |
data/MC flag
event ID
Definition at line 210 of file ParticleIDAlg.h.
Referenced by CalcAsymIneria(), CalcCellPlaneTransverseDedx(), CalcEnergyInLongitudinalPlane(), CalcPlaneCentroid(), CalcPlaneTransverseDedx(), PlaneRadius(), Radius(), and SetShower().
|
private |
shower asymmetry
Definition at line 286 of file ParticleIDAlg.h.
Referenced by CalcAsymIneria(), and SetShower().
|
private |
Closest mass to pi0 mass formed by this shower and any other shower in the slice.
Definition at line 213 of file ParticleIDAlg.h.
Referenced by Pi0Mass().
|
private |
dE/dx distributions (histogram files and data) for each detector type and particle category
Definition at line 216 of file ParticleIDAlg.h.
Referenced by CalcPlaneLongDedxProb(), CalcPlaneTransDedxProb(), and LoadDedxHistogramFiles().
|
private |
Map of longitudinal dedx by plane. The first element is plane number and the second is the dedx for that plane. This is used for lazy caching of the dedx plane values in order to save recalculating for the same shower.
Definition at line 236 of file ParticleIDAlg.h.
Referenced by CalcPlaneLongitudinalDedx(), and SetShower().
|
private |
Map of transverse dedx by plane. The first element is plane number and the second is the dedx for that plane. This is used for lazy caching of the dedx plane values in order to save recalculating for the same shower.
Definition at line 242 of file ParticleIDAlg.h.
Referenced by CalcPlaneTransverseDedx(), and SetShower().
|
private |
Detector ID.
Definition at line 295 of file ParticleIDAlg.h.
Referenced by CalcDetectorXYRegionIndex().
|
private |
geometry
Definition at line 226 of file ParticleIDAlg.h.
Referenced by CalcCellPlaneTransverseDedx(), CalcPlaneTransverseDedx(), CalcTrkHitPath(), PlaneRadius(), and Radius().
|
private |
shower moment of ineria
Definition at line 284 of file ParticleIDAlg.h.
Referenced by CalcAsymIneria(), and SetShower().
Map where the key is the index of the plane in the shower and the second is the global plane This map saves looping in some of the utility functions
Definition at line 253 of file ParticleIDAlg.h.
Referenced by CalcAsymIneria(), CalcCellPlaneTransverseDedx(), CalcPlaneHits(), PlaneCentroid(), PlaneHitCell(), PlaneHitXYZ(), PlaneLongDedx(), PlaneRadius(), PlaneToGlobalPlane(), and SetShower().
|
private |
Upper bound of MIP Range.
Definition at line 289 of file ParticleIDAlg.h.
Referenced by GetMIPPlanes().
|
private |
Lower bound of MIP Range.
Definition at line 292 of file ParticleIDAlg.h.
Referenced by GetMIPPlanes().
|
private |
Nue energy algorithms.
Definition at line 229 of file ParticleIDAlg.h.
Referenced by CalcAsymIneria(), CalcCellPlaneTransverseDedx(), CalcEnergyInLongitudinalPlane(), CalcPlaneCentroid(), CalcPlaneTransverseDedx(), Pi0Mass(), PlaneRadius(), Radius(), and SetShower().
std::map<int, float> slid::ParticleIDAlg::fPartLongLL |
Map of the longitudinal ll by paricle type.
Definition at line 145 of file ParticleIDAlg.h.
Referenced by DedxLongLL(), slid::LIDBuilder::produce(), slid::SPIDBuilder::produce(), and SetShower().
std::map<int, float> slid::ParticleIDAlg::fPartTransLL |
Map of the transverse ll by particle type.
Definition at line 148 of file ParticleIDAlg.h.
Referenced by DedxTransLL(), slid::LIDBuilder::produce(), slid::SPIDBuilder::produce(), and SetShower().
|
private |
Index of the other photon shower used for pi0 mass calculation for a given shower
Definition at line 267 of file ParticleIDAlg.h.
Referenced by Pi0Mass(), Pi0SecondPhoton(), and SetShower().
|
private |
Map where the first index is plane number and the second is the energy weighted center position for that plane
Definition at line 257 of file ParticleIDAlg.h.
Referenced by CalcCellPlaneTransverseDedx(), CalcPlaneTransverseDedx(), PlaneCentroid(), and SetShower().
Map where the first element is plane number and the second is a map with the key being the cell number in the plane and the second value is the global cell index in a shower
Definition at line 249 of file ParticleIDAlg.h.
Referenced by CalcAsymIneria(), CalcCellPlaneTransverseDedx(), CalcEnergyInLongitudinalPlane(), CalcPlaneCentroid(), CalcPlaneTransverseDedx(), CalcTrkHitPath(), DedxLongLL(), GetMIPPlanes(), PlaneRadius(), and SetShower().
|
private |
rb::Shower object for which particle ID is to be calculated. This is cached.
Definition at line 219 of file ParticleIDAlg.h.
Referenced by CalcAsymIneria(), CalcCellPlaneTransverseDedx(), CalcDetectorXYRegionIndex(), CalcEnergyInLongitudinalPlane(), CalcInterPlaneDedxProb(), CalcPlaneTransverseDedx(), CalcTrkHitPath(), Pi0SecondPhoton(), PlaneHitCell(), PlaneHitXYZ(), PlaneRadius(), Radius(), and SetShower().
|
private |
Definition at line 220 of file ParticleIDAlg.h.
Referenced by CalcAsymIneria(), CalcCellPlaneTransverseDedx(), CalcEnergyInLongitudinalPlane(), CalcPlaneCentroid(), CalcPlaneTransverseDedx(), PlaneRadius(), Radius(), and SetShower().
|
private |
Shower energy.
Definition at line 223 of file ParticleIDAlg.h.
Referenced by CalculateEnergyBinIndex(), and SetShower().
|
private |
Map of transverse energy for each transverse plane.
Definition at line 260 of file ParticleIDAlg.h.
Referenced by CalcPlaneTransverseDedx(), and SetShower().
|
private |
Map of path length for each transverse plane.
Definition at line 263 of file ParticleIDAlg.h.
Referenced by CalcPlaneTransverseDedx(), and SetShower().
|
private |
Shower adjacent energy bins. Calculated once and cached for a given shower/event combo.
Definition at line 276 of file ParticleIDAlg.h.
Referenced by CalcInterCellTransDedxProb(), CalcInterPlaneDedxProb(), and CalculateEnergyBinIndex().
|
private |
Definition at line 277 of file ParticleIDAlg.h.
Referenced by CalcInterCellTransDedxProb(), CalcInterPlaneDedxProb(), and CalculateEnergyBinIndex().
|
private |
Detector sub-region bin. Calculated once and cached for a given shower/event combo.
Definition at line 270 of file ParticleIDAlg.h.
Referenced by CalcDetectorXYRegionIndex(), CalcPlaneLongDedxProb(), and CalcPlaneTransDedxProb().
|
private |
Shower start position.
Definition at line 273 of file ParticleIDAlg.h.
Referenced by CalcDetectorXYRegionIndex().