Static Public Member Functions | List of all members
dune_ana::DUNEAnaTrackUtils Class Reference

DUNEAnaTrackUtils class. More...

#include <DUNEAnaTrackUtils.h>

Inheritance diagram for dune_ana::DUNEAnaTrackUtils:
dune_ana::DUNEAnaUtilsBase

Static Public Member Functions

static std::vector< art::Ptr< recob::Hit > > GetHits (const art::Ptr< recob::Track > &pTrack, const art::Event &evt, const std::string &label)
 Get the hits associated with the track. More...
 
static std::vector< art::Ptr< recob::SpacePoint > > GetSpacePoints (const art::Ptr< recob::Track > &pTrack, const art::Event &evt, const std::string &label)
 Get the spacepoints associated with the track. More...
 
static art::Ptr< recob::PFParticleGetPFParticle (const art::Ptr< recob::Track > &pTrack, const art::Event &evt, const std::string &label)
 Get the particle associated with the track. More...
 
static art::Ptr< anab::CalorimetryGetCalorimetry (const art::Ptr< recob::Track > &pTrack, const art::Event &evt, const std::string &trackLabel, const std::string &caloLabel)
 Get the particle associated with the track. More...
 
static art::Ptr< ctp::CTPResultGetSquIDResult (const art::Ptr< recob::Track > &pTrack, const art::Event &evt, const std::string &trackLabel, const std::string &squidLabel)
 Get the SquID track PID associated with the track. More...
 

Additional Inherited Members

- Static Private Member Functions inherited from dune_ana::DUNEAnaUtilsBase
template<typename T >
static std::vector< art::Ptr< T > > GetProductVector (const art::Event &evt, const std::string &label)
 
template<typename T , typename U >
static std::vector< art::Ptr< T > > GetAssocProductVector (const art::Ptr< U > &part, const art::Event &evt, const std::string &label, const std::string &assocLabel)
 
template<typename T , typename U >
static art::Ptr< T > GetAssocProduct (const art::Ptr< U > &part, const art::Event &evt, const std::string &label, const std::string &assocLabel)
 

Detailed Description

DUNEAnaTrackUtils class.

Definition at line 39 of file DUNEAnaTrackUtils.h.

Member Function Documentation

art::Ptr< anab::Calorimetry > dune_ana::DUNEAnaTrackUtils::GetCalorimetry ( const art::Ptr< recob::Track > &  pTrack,
const art::Event evt,
const std::string trackLabel,
const std::string caloLabel 
)
static

Get the particle associated with the track.

Parameters
trackis the track for which we want the particle
evtis the underlying art event
trackLabelis the label for the track producer
caloLabelis the label for the calorimetry producer
Returns
art::Ptr to the calorimetry object

Definition at line 45 of file DUNEAnaTrackUtils.cxx.

46 {
47  std::vector<art::Ptr<anab::Calorimetry>> calos = DUNEAnaTrackUtils::GetAssocProductVector<anab::Calorimetry>(pTrack,evt,trackLabel,caloLabel);
48 
49  for (const art::Ptr<anab::Calorimetry> &caloObject : calos)
50  {
51  if (caloObject->PlaneID().Plane == geo::kW) return caloObject;
52  }
53 
54  // If we don't have the collection plane then give up
55  mf::LogError("DUNEAna") << "DUNEAnaTrackUtils::GetCalorimetry - no collection view calorimetry found. Returning first alternate view." << std::endl;
56 
57  return calos.at(0);
58 }
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Planes which measure W (third view for Bo, MicroBooNE, etc).
Definition: geo_types.h:131
TCEvent evt
Definition: DataStructs.cxx:7
Definition: fwd.h:31
QTextStream & endl(QTextStream &s)
std::vector< art::Ptr< recob::Hit > > dune_ana::DUNEAnaTrackUtils::GetHits ( const art::Ptr< recob::Track > &  pTrack,
const art::Event evt,
const std::string label 
)
static

Get the hits associated with the track.

Parameters
trackis the track for which we want the hits
evtis the underlying art event
labelis the label for the track producer
Returns
vector of art::Ptrs to the hits

Definition at line 24 of file DUNEAnaTrackUtils.cxx.

25 {
26  return DUNEAnaTrackUtils::GetAssocProductVector<recob::Hit>(pTrack,evt,label,label);
27 }
TCEvent evt
Definition: DataStructs.cxx:7
art::Ptr< recob::PFParticle > dune_ana::DUNEAnaTrackUtils::GetPFParticle ( const art::Ptr< recob::Track > &  pTrack,
const art::Event evt,
const std::string label 
)
static

Get the particle associated with the track.

Parameters
trackis the track for which we want the particle
evtis the underlying art event
labelis the label for the track producer
Returns
art::Ptr to the particle

Definition at line 38 of file DUNEAnaTrackUtils.cxx.

39 {
40  return DUNEAnaTrackUtils::GetAssocProduct<recob::PFParticle>(pTrack,evt,label,label);
41 }
TCEvent evt
Definition: DataStructs.cxx:7
std::vector< art::Ptr< recob::SpacePoint > > dune_ana::DUNEAnaTrackUtils::GetSpacePoints ( const art::Ptr< recob::Track > &  pTrack,
const art::Event evt,
const std::string label 
)
static

Get the spacepoints associated with the track.

Parameters
trackis the track for which we want the spacepoints
evtis the underlying art event
labelis the label for the track producer
Returns
vector of art::Ptrs to the spacepoints

Definition at line 31 of file DUNEAnaTrackUtils.cxx.

32 {
33  return DUNEAnaTrackUtils::GetAssocProductVector<recob::SpacePoint>(pTrack,evt,label,label);
34 }
TCEvent evt
Definition: DataStructs.cxx:7
art::Ptr< ctp::CTPResult > dune_ana::DUNEAnaTrackUtils::GetSquIDResult ( const art::Ptr< recob::Track > &  pTrack,
const art::Event evt,
const std::string trackLabel,
const std::string squidLabel 
)
static

Get the SquID track PID associated with the track.

Parameters
trackis the track for which we want the particle
evtis the underlying art event
trackLabelis the label for the track producer
caloLabelis the label for the SquiID track PID producer
Returns
art::Ptr to the SquID PID result

Definition at line 62 of file DUNEAnaTrackUtils.cxx.

63 {
64  return DUNEAnaTrackUtils::GetAssocProduct<ctp::CTPResult>(pTrack,evt,trackLabel,squidLabel);
65 }
TCEvent evt
Definition: DataStructs.cxx:7

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