16 #ifndef ParticleIDAlg_h 17 #define ParticleIDAlg_h 34 #include "Utilities/func/MathUtil.h" 35 #include "TGeoManager.h" 55 bool loadLibs =
true);
66 const std::vector< const rb::Shower* > showercol,
73 const std::vector< const rb::Shower* > showercol,
80 const std::vector< const rb::Shower* > showercol,
85 const std::vector< const rb::Shower* > showercol,
91 double GetGapVertexToShowerStart(
const rb::Shower* vShower, TVector3 evtVtx,
95 double Pi0Mass(
const std::vector< const rb::Shower* > showerCollection,
100 int Pi0SecondPhoton(
const std::vector< const rb::Shower* > showerCollection,
104 double Radius(
const std::vector<const rb::Shower*> showerCollection,
108 double PlaneLongDedx(
unsigned int pIdx);
111 double PlaneTransDedx(
unsigned int tpIdx);
114 double CellPlaneDedx(
int tpIdx,
unsigned int pIdx);
117 double PlaneRadius(
unsigned int pIdx);
120 TVector3 PlaneHitXYZ(
unsigned int pIdx);
123 double PlaneHitCell(
unsigned int pIdx);
125 unsigned int PlaneToGlobalPlane(
unsigned int pIdx);
128 double PlaneCentroid(
unsigned int pIdx);
137 double PointDoca(TVector3 vtx, TVector3
start, TVector3 stop);
141 const std::vector< const rb::Shower* > showercol,
153 double CalcPlaneLongitudinalDedx(
unsigned int plane);
156 double CalcPlaneTransverseDedx(
unsigned int iTransversePlane);
160 double CalcCellPlaneTransverseDedx(
int iTransversePlane,
unsigned int iPlane);
164 std::map< int, std::map< int, int > > CalcPlaneHits(
const rb::Shower* vShower );
168 std::map< int, double > CalcPlaneCentroid(
const rb::Shower* vShower);
171 double CalcEnergyInLongitudinalPlane(
int iPlane);
174 void CalcDetectorXYRegionIndex();
177 double CalcPlaneLongDedxProb(
DedxParticleType particleType,
int igev,
unsigned int iPlane,
unsigned int plane);
180 double CalcPlaneTransDedxProb(
DedxParticleType particleType,
int igev,
unsigned int iTransversePlane);
194 double CalcTrkHitPath(
unsigned int plane);
198 void CalculateEnergyBinIndex();
201 void CalcAsymIneria();
204 TVector3 GetCellNodePos(
unsigned int plane1,
unsigned int cell1,
unsigned int plane2,
unsigned int cell2);
299 #endif // ParticleIDAlg_h novadaq::cnv::DetId fDetId
Detector ID.
NuEEnergyAlg * fNuEEnergyAlg
Nue energy algorithms.
std::map< int, double > fTransEnergy
Map of transverse energy for each transverse plane.
double fClosestPi0Mass
Closest mass to pi0 mass formed by this shower and any other shower in the slice. ...
TVector3 InertiaXYZ() const
Return the inertia calculation.
This is a helper class for ParticleIDAlg that provides a tidy structure in which to hold the dE/dx hi...
int iReg
Detector sub-region bin. Calculated once and cached for a given shower/event combo.
double e0
Energy values of energy bins adjacent to shower. Calculated once and cached for a given shower/event ...
const rb::Shower * fShower
rb::Shower object for which particle ID is to be calculated. This is cached.
std::map< unsigned int, unsigned int > fMapIdxToGlobalPlane
std::vector< slid::DedxDistribution > fDedxDistributions
dE/dx distributions (histogram files and data) for each detector type and particle category ...
double fShowerEnergyGev
Shower energy.
double fMipRangeLow
Lower bound of MIP Range.
double Radius(int A, double Ro=constants::kNucRo)
DedxParticleType
An enum used to give allowed particle types a visible name in the code. Note that for electron...
std::vector< const rb::Shower * > fShowerCol
double ShowerAsym() const
Return the asymmetry of the shower.
TVector3 pos
Shower start position.
art::ServiceHandle< geo::Geometry > fGeom
geometry
std::map< int, float > fPartTransLL
Map of the transverse ll by particle type.
Perform a "2 point" Hough transform on a collection of hits.
double fAsym
shower asymmetry
art::EventID eventID
data/MC flag
std::map< int, double > fTransPathLength
Map of path length for each transverse plane.
std::map< int, double > fDedxTransByPlane
TVector3 fIxyz
shower moment of ineria
Calculates deposited and corrected energy of the electron shower and of electron flavoured neutrino...
A rb::Prong with a length.
Build slid::LID objects to store electron ID, if asked for, otherwise, calculate LID info and make av...
std::map< int, double > fPlaneCentroid
std::map< int, std::map< int, int > > fPlaneHits
std::map< int, float > fPartLongLL
Map of the longitudinal ll by paricle type.
int igev0
Shower adjacent energy bins. Calculated once and cached for a given shower/event combo.
Encapsulate the geometry of one entire detector (near, far, ndos)
std::map< int, double > fDedxLongByPlane
double fMipRangeHigh
Upper bound of MIP Range.