551 if(thisTrack != 0x0){
590 for(
size_t k = 0;
k < calovector.size() &&
k<3;
k++){
591 int plane = calovector[
k].PlaneID().Plane;
592 if(plane !=2 )
continue;
596 for(
size_t l=0;
l<calovector[
k].dEdx().size() &&
l<
MAXHits; ++
l){
600 const auto &
pos=(calovector[
k].XYZ())[
l];
608 else if(thisShower != 0x0){
628 art::FindManyP<recob::SpacePoint> spFromMCPartHits(hitsFromMCPart,
evt,
fPFParticleTag);
630 if( hitsFromMCPart.size()){
632 for(
size_t i=0; i<hitsFromMCPart.size(); ++i){
633 if( hitsFromMCPart[i]->
WireID().Plane != 2 )
continue;
635 TVector3 xyzWire = pwire->
GetCenter<TVector3>();
636 tot_ch += hitsFromMCPart[i]->Integral();
642 std::vector<art::Ptr<recob::SpacePoint>> sp = spFromMCPartHits.at(i);
671 auto recoShowers =
evt.getValidHandle< std::vector< recob::Shower > >(
fShowerTag);
672 art::FindManyP<recob::Hit> findHitsFromShowers(recoShowers,
evt,
fShowerTag);
676 std::vector< art::Ptr< recob::Hit > > tmp_sh_hits = findHitsFromShowers.at( thisShower->
ID() );
680 for(
size_t j=0; j<sh_hits.size() && j<
MAXHits; ++j){
681 if( sh_hits[j]->
WireID().Plane != 2 )
continue;
682 art::FindManyP<recob::Wire> wFromHits(sh_hits,
evt,
"hitpdune");
683 std::vector<art::Ptr<recob::Wire>> wires = wFromHits.at(j);
685 TVector3 xyzWire = pwire->
GetCenter<TVector3>();
686 std::array<float,4> cnn_out = hitResults.getOutput( tmp_sh_hits[j] );
687 double p_trk_or_sh = cnn_out[ hitResults.getIndex(
"track") ]+ cnn_out[ hitResults.getIndex(
"em") ];
688 double cnn_score = cnn_out[ hitResults.getIndex(
"em") ]/p_trk_or_sh;
697 std::vector<art::Ptr<recob::SpacePoint>> sp = spFromShowerHits.at(j);
710 if(calovector.size() != 3 &&
fVerbose > 0)
711 std::cerr <<
"WARNING::Calorimetry vector size for primary is = " << calovector.size() <<
std::endl;
713 for(
size_t k = 0;
k < calovector.size() &&
k<3;
k++){
714 int plane = calovector[
k].PlaneID().Plane;
715 if(plane !=2 )
continue;
719 for(
size_t l=0;
l<calovector[
k].dEdx().size() &&
l<
MAXHits; ++
l){
723 const auto &
pos=(calovector[
k].XYZ())[
l];
double E(const int i=0) const
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
double fprimaryShower_hit_cnn[MAXHits]
const TVector3 & ShowerStart() const
const std::vector< const recob::Hit * > GetRecoShowerHits(const recob::Shower &shower, art::Event const &evt, const std::string showerModule) const
Get the hits from a given reco shower.
double EndMomentum() const
int fprimaryShower_hit_ch[MAXHits]
double fprimaryShower_hit_X[MAXHits]
double GetDepEnergyMC(const art::Event &evt, geo::GeometryCore const *fGeom, int trackid, int whichview) const
geo::GeometryCore const * fGeometry
std::vector< anab::T0 > GetPFParticleT0(const recob::PFParticle &particle, art::Event const &evt, std::string particleLabel) const
Get the T0(s) from a given PFParticle.
double fprimary_calX[MAXHits]
const recob::Shower * GetPFParticleShower(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string showerLabel) const
Get the shower associated to this particle. Returns a null pointer if not found.
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
std::vector< anab::Calorimetry > GetRecoTrackCalorimetry(const recob::Track &track, art::Event const &evt, const std::string trackModule, const std::string caloModule) const
Get the Calorimetry(s) from a given reco track.
std::vector< anab::Calorimetry > GetRecoShowerCalorimetry(const recob::Shower &shower, art::Event const &evt, const std::string showerModule, const std::string caloModule) const
Get shower calo info.
double fprimaryKineticEnergy[3]
double fprimaryEndMomentum
const std::vector< const recob::Hit * > GetPFParticleHits(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const
Get the hits associated to the PFParticle.
double fprimaryTruthShower_hit_q[MAXHits]
int fprimaryShowerBestPlane
protoana::ProtoDUNETrackUtils trackUtil
double fprimaryShower_hit_Y[MAXHits]
double fprimaryStartPosition[3]
double fprimaryTruth_vtx[3]
double fprimaryOpeningAngle
int fprimaryTruthShower_hit_w[MAXHits]
std::string fShowerCaloTag
std::string fPFParticleTag
trkf::TrackMomentumCalculator trmom
std::string fCalorimetryTag
std::vector< const recob::Hit * > GetMCParticleHits(detinfo::DetectorClocksData const &clockData, const simb::MCParticle &mcpart, const art::Event &evt, std::string hitModule, bool use_eve=true) const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
double fprimaryEndDirection[3]
protoana::ProtoDUNEPFParticleUtils pfpUtil
double Length(size_t p=0) const
Access to various track properties.
double fprimary_calZ[MAXHits]
double fprimaryShowerCharge
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
double GetPurity(detinfo::DetectorClocksData const &clockData, const recob::PFParticle &pfpart, const art::Event &evt, std::string pfparticleModule) const
double Theta() const
Access to spherical or geographical angles at vertex or at any point.
double fprimarydEdx[MAXHits]
const recob::Track * GetPFParticleTrack(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const
Get the track associated to this particle. Returns a null pointer if not found.
double fprimaryTruthShower_hit_Z[MAXHits]
double fprimaryTruth_purity
protoana::ProtoDUNETruthUtils truthUtil
const simb::MCParticle * GetMCParticleFromRecoTrack(detinfo::DetectorClocksData const &clockData, const recob::Track &track, art::Event const &evt, std::string trackModule) const
const TVector3 & Direction() const
double fprimaryMomentumByRangeMuon
int fprimaryIsBeamparticle
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
double Vx(const int i=0) const
double fprimaryResidualRange[MAXHits]
double StartMomentum() const
double fprimaryTruth_Edepo
double fprimaryMomentumByRangeProton
double fprimaryTruthShower_hit_Y[MAXHits]
double fprimaryShower_hit_Z[MAXHits]
Point_t const & End() const
Returns the position of the last valid point of the trajectory [cm].
double fprimary_calY[MAXHits]
double fprimary_cal_pitch[MAXHits]
double fprimaryShower_hit_q[MAXHits]
double fprimaryShower_hit_t[MAXHits]
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
const simb::MCParticle * GetMCParticleFromRecoShower(detinfo::DetectorClocksData const &clockData, const recob::Shower &shower, art::Event const &evt, std::string showerModule) const
double fprimaryStartDirection[3]
int fprimaryShower_hit_w[MAXHits]
Vector_t StartDirection() const
Returns the direction of the trajectory at the first point.
protoana::ProtoDUNEShowerUtils showerUtil
recob::tracking::Plane Plane
Point_t const & Start() const
Returns the position of the first valid point of the trajectory [cm].
double fprimarydQdx[MAXHits]
float GetBeamCosmicScore(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const
Access the BDT output used to decide if a slice is beam-like or cosmic-like.
double fprimaryTruthShower_hit_t[MAXHits]
double Vy(const int i=0) const
double fprimaryEndPosition[3]
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
double GetTrackMomentum(double trkrange, int pdg) const
QTextStream & endl(QTextStream &s)
double fprimaryTruthShower_hit_X[MAXHits]
double fprimaryShowerTruth_Charge
int fprimaryTruthShower_nHits
WireGeo const * WirePtr(geo::WireID const &wireid) const
Returns the specified wire.