Definition at line 24 of file PlotSpacePoints_module.cc.
reco3d::PlotSpacePoints::PlotSpacePoints |
( |
const fhicl::ParameterSet & |
pset | ) |
|
|
explicit |
Definition at line 52 of file PlotSpacePoints_module.cc.
54 ,
fSpacePointTag(art::InputTag(pset.get<std::string>(
"SpacePointLabel"),
55 pset.get<std::string>(
"SpacePointInstanceLabel")))
56 ,
fHitLabel(pset.get<std::string>(
"HitLabel"))
57 ,
fSuffix(pset.get<std::string>(
"Suffix"))
58 ,
fPlots(pset.get<
bool>(
"Plots"))
59 ,
fPlots3D(pset.get<
bool>(
"Plots3D"))
art::InputTag fSpacePointTag
void reco3d::PlotSpacePoints::analyze |
( |
const art::Event & |
evt | ) |
|
|
overrideprivate |
Definition at line 173 of file PlotSpacePoints_module.cc.
176 art::Handle<std::vector<recob::SpacePoint>> pts;
189 art::Handle<std::vector<recob::Hit>> hits;
191 auto const clockData =
192 art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(
evt);
193 const std::vector<recob::SpacePoint> pts =
TrueSpacePoints(clockData, hits);
195 const std::string suffix = TString::Format(
"%s_true_%d",
fSuffix.c_str(),
evt.
event()).
Data();
std::vector< recob::SpacePoint > TrueSpacePoints(detinfo::DetectorClocksData const &clockData, art::Handle< std::vector< recob::Hit >> hits) const
art::InputTag fSpacePointTag
void Plot3D(const std::vector< recob::SpacePoint > &pts, const std::string &suffix) const
void Plot(const std::vector< recob::SpacePoint > &pts, const std::string &suffix) const
void reco3d::PlotSpacePoints::Plot |
( |
const std::vector< recob::SpacePoint > & |
pts, |
|
|
const std::string & |
suffix |
|
) |
| const |
|
private |
Definition at line 67 of file PlotSpacePoints_module.cc.
78 const double* xyz = pt.XYZ();
79 const double x = xyz[0];
80 const double y = xyz[1];
81 const double z = xyz[2];
82 gZX.SetPoint(gZX.GetN(),
z,
x);
83 gYX.SetPoint(gYX.GetN(),
y,
x);
84 gZY.SetPoint(gZY.GetN(),
z,
y);
87 if (gZX.GetN() == 0) gZX.SetPoint(0, 0, 0);
88 if (gYX.GetN() == 0) gYX.SetPoint(0, 0, 0);
89 if (gZY.GetN() == 0) gZY.SetPoint(0, 0, 0);
92 gPad->Print((
"plots/evd" + suffix +
".png").c_str());
95 gPad->Print((
"plots/evd_ortho" + suffix +
".png").c_str());
97 gPad->Print((
"plots/evd_zy" + suffix +
".png").c_str());
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
void reco3d::PlotSpacePoints::Plot3D |
( |
const std::vector< recob::SpacePoint > & |
pts, |
|
|
const std::string & |
suffix |
|
) |
| const |
|
private |
Definition at line 126 of file PlotSpacePoints_module.cc.
130 for (
int phase = 0; phase < 4; ++phase) {
132 for (
int iang = 0; iang < Nang; ++iang) {
133 const double ang = M_PI / 2 * iang / double(Nang);
138 const double* xyz =
p.XYZ();
142 x = cos(ang) * xyz[1] + sin(ang) * xyz[2];
147 y = cos(ang) * xyz[0] + sin(ang) * xyz[1];
150 x = cos(ang) * xyz[2] - sin(ang) * xyz[0];
154 x = -cos(ang) * xyz[0] + sin(ang) * xyz[1];
155 y = cos(ang) * xyz[1] + sin(ang) * xyz[0];
159 const double phi = 0;
160 g.SetPoint(g.GetN(), cos(phi) *
x + sin(phi) *
y, cos(phi) * y - sin(phi) *
x);
164 TString::Format((
"anim/evd3d" + suffix +
"_%03d.png").c_str(), frame++).Data();
165 g.SetTitle(fname.c_str());
166 if (g.GetN()) g.Draw(
"ap");
167 gPad->Print(fname.c_str());
process_name opflash particleana ie x
process_name opflash particleana ie ie y
Definition at line 102 of file PlotSpacePoints_module.cc.
105 std::vector<recob::SpacePoint> pts_true;
107 const double err[6] = {
111 art::ServiceHandle<cheat::BackTrackerService const> bt_serv;
112 for (
unsigned int i = 0; i < hits->size(); ++i) {
114 const std::vector<double> xyz = bt_serv->HitToXYZ(clockData, art::Ptr<recob::Hit>(hits, i));
115 pts_true.emplace_back(&xyz[0], err, 0);
EResult err(const char *call)
std::string reco3d::PlotSpacePoints::fHitLabel |
|
private |
bool reco3d::PlotSpacePoints::fPlots |
|
private |
bool reco3d::PlotSpacePoints::fPlots3D |
|
private |
bool reco3d::PlotSpacePoints::fPlotsTrue |
|
private |
art::InputTag reco3d::PlotSpacePoints::fSpacePointTag |
|
private |
std::string reco3d::PlotSpacePoints::fSuffix |
|
private |
The documentation for this class was generated from the following file: