18 #include "TPolyLine3D.h" 35 const Eigen::Vector3f&,
36 const Eigen::Vector3f&,
64 std::vector<float> opHitPEVec;
68 for (
size_t idx = 0; idx < recoOpt->
fOpHitLabels.size(); idx++) {
71 event.getByLabel(opHitProducer, opHitHandle);
73 if (!opHitHandle.
isValid())
continue;
74 if (opHitHandle->size() == 0)
continue;
77 for (
const auto& opHit : *opHitHandle) {
80 if (opHit.PeakTime() < recoOpt->
fFlashTMin)
continue;
81 if (opHit.PeakTime() > recoOpt->
fFlashTMax)
continue;
83 opHitPEVec.push_back(opHit.PE());
88 if (!opHitPEVec.empty()) {
90 std::sort(opHitPEVec.begin(), opHitPEVec.end());
92 float minTotalPE = opHitPEVec.front();
93 float maxTotalPE = opHitPEVec[0.9 * opHitPEVec.size()];
97 (maxTotalPE - minTotalPE));
100 for (
size_t idx = 0; idx < recoOpt->
fOpHitLabels.size(); idx++) {
103 event.getByLabel(opHitProducer, opHitHandle);
105 if (!opHitHandle.
isValid())
continue;
106 if (opHitHandle->size() == 0)
continue;
109 for (
const auto& opHit : *opHitHandle) {
112 if (opHit.PeakTime() < recoOpt->
fFlashTMin)
continue;
113 if (opHit.PeakTime() > recoOpt->
fFlashTMax)
continue;
115 unsigned int opChannel = opHit.OpChannel();
118 float xWidth = opHit.Width();
119 float zWidth = opHitGeo.
HalfW();
120 float yWidth = opHitGeo.
HalfH();
122 Eigen::Vector3f opHitLo(
123 opHitPos.X() - xWidth, opHitPos.Y() - yWidth, opHitPos.Z() - zWidth);
124 Eigen::Vector3f opHitHi(
125 opHitPos.X() + xWidth, opHitPos.Y() + yWidth, opHitPos.Z() + zWidth);
128 opHitPEScale * std::min(maxTotalPE,
float(opHit.PE()));
141 const Eigen::Vector3f& coordsLo,
142 const Eigen::Vector3f& coordsHi,
147 TPolyLine3D& top = view->
AddPolyLine3D(5, color, width, style);
148 top.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
149 top.SetPoint(1, coordsHi[0], coordsHi[1], coordsLo[2]);
150 top.SetPoint(2, coordsHi[0], coordsHi[1], coordsHi[2]);
151 top.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
152 top.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
154 TPolyLine3D& side = view->
AddPolyLine3D(5, color, width, style);
155 side.SetPoint(0, coordsHi[0], coordsHi[1], coordsLo[2]);
156 side.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
157 side.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
158 side.SetPoint(3, coordsHi[0], coordsHi[1], coordsHi[2]);
159 side.SetPoint(4, coordsHi[0], coordsHi[1], coordsLo[2]);
161 TPolyLine3D& side2 = view->
AddPolyLine3D(5, color, width, style);
162 side2.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
163 side2.SetPoint(1, coordsLo[0], coordsLo[1], coordsLo[2]);
164 side2.SetPoint(2, coordsLo[0], coordsLo[1], coordsHi[2]);
165 side2.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
166 side2.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
168 TPolyLine3D& bottom = view->
AddPolyLine3D(5, color, width, style);
169 bottom.SetPoint(0, coordsLo[0], coordsLo[1], coordsLo[2]);
170 bottom.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
171 bottom.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
172 bottom.SetPoint(3, coordsLo[0], coordsLo[1], coordsHi[2]);
173 bottom.SetPoint(4, coordsLo[0], coordsLo[1], coordsLo[2]);
int GetColor(double x) const
double fFlashTMin
Minimal time for a flash to be displayed.
std::vector< double > fRecoQHigh
high edge of ADC values for drawing raw digits
double fFlashTMax
Maximum time for a flash to be displayed.
std::vector< double > fRecoQLow
low edge of ADC values for drawing raw digits
bool isValid() const noexcept
The color scales used by the event display.
TPolyLine3D & AddPolyLine3D(int n, int c, int w, int s)
const evdb::ColorScale & CalQ(geo::SigType_t st) const
double fFlashMinPE
Minimal PE for a flash to be displayed.
geo::Point_t const & GetCenter() const
std::size_t color(std::string const &procname)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
A collection of 3D drawable objects.
Namespace collecting geometry-related classes utilities.
OpDetGeo const & OpDetGeoFromOpChannel(unsigned int OpChannel) const
Returns the geo::OpDetGeo object for the given channel number.
std::vector< art::InputTag > fOpHitLabels
module labels that produced events
art framework interface to geometry description
Event finding and building.
Signal from collection planes.