Public Member Functions | Private Attributes | List of all members
ShowerRecoTools::ShowerTrackStartPosition Class Reference
Inheritance diagram for ShowerRecoTools::ShowerTrackStartPosition:
ShowerRecoTools::IShowerTool

Public Member Functions

 ShowerTrackStartPosition (const fhicl::ParameterSet &pset)
 
int CalculateElement (const art::Ptr< recob::PFParticle > &pfparticle, art::Event &Event, reco::shower::ShowerElementHolder &ShowerEleHolder) override
 
- Public Member Functions inherited from ShowerRecoTools::IShowerTool
 IShowerTool (const fhicl::ParameterSet &pset)
 
virtual ~IShowerTool () noexcept=default
 
int RunShowerTool (const art::Ptr< recob::PFParticle > &pfparticle, art::Event &Event, reco::shower::ShowerElementHolder &ShowerEleHolder, std::string evd_display_name_append="")
 
virtual void InitialiseProducers ()
 
void SetPtr (art::ProducesCollector *collector)
 
void InitaliseProducerPtr (reco::shower::ShowerProducedPtrsHolder &uniqueproducerPtrs)
 
virtual int AddAssociations (const art::Ptr< recob::PFParticle > &pfpPtr, art::Event &Event, reco::shower::ShowerElementHolder &ShowerEleHolder)
 

Private Attributes

int fVerbose
 
std::string fInitialTrackInputLabel
 
std::string fShowerStartPositionOutputLabel
 

Additional Inherited Members

- Protected Member Functions inherited from ShowerRecoTools::IShowerTool
const shower::LArPandoraShowerAlgGetLArPandoraShowerAlg () const
 
template<class T >
art::Ptr< T > GetProducedElementPtr (std::string Name, reco::shower::ShowerElementHolder &ShowerEleHolder, int iter=-1)
 
template<class T >
void InitialiseProduct (std::string Name, std::string InstanceName="")
 
template<class T , class A , class B >
void AddSingle (A &a, B &b, std::string Name)
 
int GetVectorPtrSize (std::string Name)
 
void PrintPtrs ()
 
void PrintPtr (std::string Name)
 

Detailed Description

Definition at line 18 of file ShowerTrackStartPosition_tool.cc.

Constructor & Destructor Documentation

ShowerRecoTools::ShowerTrackStartPosition::ShowerTrackStartPosition ( const fhicl::ParameterSet pset)

Definition at line 34 of file ShowerTrackStartPosition_tool.cc.

35  : IShowerTool(pset.get<fhicl::ParameterSet>("BaseTools"))
36  , fVerbose(pset.get<int>("Verbose"))
37  , fInitialTrackInputLabel(pset.get<std::string>("InitialTrackInputLabel"))
38  , fShowerStartPositionOutputLabel(pset.get<std::string>("ShowerStartPositionOutputLabel"))
39  {}
std::string string
Definition: nybbler.cc:12
T get(std::string const &key) const
Definition: ParameterSet.h:271
IShowerTool(const fhicl::ParameterSet &pset)
Definition: IShowerTool.h:28

Member Function Documentation

int ShowerRecoTools::ShowerTrackStartPosition::CalculateElement ( const art::Ptr< recob::PFParticle > &  pfparticle,
art::Event Event,
reco::shower::ShowerElementHolder ShowerEleHolder 
)
overridevirtual

Implements ShowerRecoTools::IShowerTool.

Definition at line 42 of file ShowerTrackStartPosition_tool.cc.

45  {
46 
47  //Check the Track has been defined
48  if (!ShowerEleHolder.CheckElement("InitialTrack")) {
49  if (fVerbose)
50  mf::LogError("ShowerTrackStartPosition") << "Initial track not set" << std::endl;
51  return 1;
52  }
53  recob::Track InitialTrack;
54  ShowerEleHolder.GetElement(fInitialTrackInputLabel, InitialTrack);
55 
56  //Set the shower start position as the
57  TVector3 StartPositionErr = {-999, -999, -999};
58 
59  geo::Point_t TrajPosition_vec = InitialTrack.LocationAtPoint(0);
60  TVector3 TrajPosition = {TrajPosition_vec.X(), TrajPosition_vec.Y(), TrajPosition_vec.Z()};
61  ShowerEleHolder.SetElement(TrajPosition, StartPositionErr, fShowerStartPositionOutputLabel);
62 
63  return 0;
64  }
Point_t const & LocationAtPoint(size_t i) const
Definition: Track.h:126
void SetElement(T &dataproduct, const std::string &Name, bool checktag=false)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
bool CheckElement(const std::string &Name) const
int GetElement(const std::string &Name, T &Element) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:49
QTextStream & endl(QTextStream &s)

Member Data Documentation

std::string ShowerRecoTools::ShowerTrackStartPosition::fInitialTrackInputLabel
private

Definition at line 30 of file ShowerTrackStartPosition_tool.cc.

std::string ShowerRecoTools::ShowerTrackStartPosition::fShowerStartPositionOutputLabel
private

Definition at line 31 of file ShowerTrackStartPosition_tool.cc.

int ShowerRecoTools::ShowerTrackStartPosition::fVerbose
private

Definition at line 29 of file ShowerTrackStartPosition_tool.cc.


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