52 InitialiseProduct<std::vector<recob::Vertex>>(
"myvertex");
55 InitialiseProduct<art::Assns<recob::Shower, recob::Vertex>>(
"myvertexassan");
68 std::vector<art::Ptr<recob::Vertex>> vertices;
72 bool shower_direction_set = ShowerEleHolder.
CheckElement(
"ShowerDirection");
77 if (shower_direction_set) { ShowerEleHolder.
GetElement(
"ShowerDirection", ShowerDirection); }
81 auto pos = proposed_vertex.
position();
83 if (ShowerDirection.X() < 0) { pos *= -1.; }
87 ShowerEleHolder.
SetElement(pos, recobshower_err,
"ShowerStartPosition");
91 ShowerEleHolder.
SetElement(pos, recobshower_err,
"ShowerExampleTool_ShowerStartPosition");
94 ShowerEleHolder.
SetElement(new_vertex,
"myvertex");
97 std::vector<double> xyz_vec = {pos.X(), pos.Y(), pos.Z()};
101 ShowerEleHolder.
SetElement(xyz_vec,
"xyz",
true);
106 if (will_be_checked) { std::cout <<
"Element checked at save time" << std::endl; }
115 if (
fVerbose > 1) std::cout <<
"You on are shower: " << showernum << std::endl;
143 GetProducedElementPtr<recob::Vertex>(
"myvertex", ShowerEleHolder, ptrsize);
145 GetProducedElementPtr<recob::Shower>(
"shower", ShowerEleHolder);
146 AddSingle<art::Assns<recob::Shower, recob::Vertex>>(showerptr, vertexptr,
"myvertexassan");
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
int GetShowerNumber() const
void SetElement(T &dataproduct, const std::string &Name, bool checktag=false)
void SetElementTag(const std::string &Name, bool checkelement)
constexpr int kBogusI
obviously bogus integer value
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Definition of vertex object for LArSoft.
void PrintElements() const
bool CheckElement(const std::string &Name) const
bool CheckElementTag(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.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
constexpr double kBogusD
obviously bogus double value
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
const Point_t & position() const
Return vertex 3D position.