16 #include "TPolyLine3D.h" 34 void DrawRectangularBox(evdb::View3D*,
const Eigen::Vector3f&,
const Eigen::Vector3f&,
int,
int,
int)
const;
61 std::vector<float> opHitPEVec;
65 for(
size_t idx = 0; idx < recoOpt->
fOpHitLabels.size(); idx++)
69 event.getByLabel(opHitProducer, opHitHandle);
71 if (!opHitHandle.
isValid() )
continue;
72 if ( opHitHandle->size() == 0)
continue;
75 for(
const auto& opHit : *opHitHandle)
79 if (opHit.PeakTime() < recoOpt->
fFlashTMin)
continue;
80 if (opHit.PeakTime() > recoOpt->
fFlashTMax)
continue;
82 opHitPEVec.push_back(opHit.PE());
87 if (!opHitPEVec.empty())
90 std::sort(opHitPEVec.begin(),opHitPEVec.end());
92 float minTotalPE = opHitPEVec.front();
93 float maxTotalPE = opHitPEVec[0.9 * opHitPEVec.size()];
99 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)
113 if (opHit.PeakTime() < recoOpt->
fFlashTMin)
continue;
114 if (opHit.PeakTime() > recoOpt->
fFlashTMax)
continue;
116 unsigned int opChannel = opHit.OpChannel();
119 float xWidth = opHit.Width();
120 float zWidth = opHitGeo.
HalfW();
121 float yWidth = opHitGeo.
HalfH();
123 Eigen::Vector3f opHitLo(opHitPos.X() - xWidth, opHitPos.Y() - yWidth, opHitPos.Z() - zWidth);
124 Eigen::Vector3f opHitHi(opHitPos.X() + xWidth, opHitPos.Y() + yWidth, opHitPos.Z() + zWidth);
140 TPolyLine3D&
top = view->AddPolyLine3D(5, color, width, style);
141 top.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
142 top.SetPoint(1, coordsHi[0], coordsHi[1], coordsLo[2]);
143 top.SetPoint(2, coordsHi[0], coordsHi[1], coordsHi[2]);
144 top.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
145 top.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
147 TPolyLine3D& side = view->AddPolyLine3D(5, color, width, style);
148 side.SetPoint(0, coordsHi[0], coordsHi[1], coordsLo[2]);
149 side.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
150 side.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
151 side.SetPoint(3, coordsHi[0], coordsHi[1], coordsHi[2]);
152 side.SetPoint(4, coordsHi[0], coordsHi[1], coordsLo[2]);
154 TPolyLine3D& side2 = view->AddPolyLine3D(5, color, width, style);
155 side2.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
156 side2.SetPoint(1, coordsLo[0], coordsLo[1], coordsLo[2]);
157 side2.SetPoint(2, coordsLo[0], coordsLo[1], coordsHi[2]);
158 side2.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
159 side2.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
161 TPolyLine3D&
bottom = view->AddPolyLine3D(5, color, width, style);
162 bottom.SetPoint(0, coordsLo[0], coordsLo[1], coordsLo[2]);
163 bottom.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
164 bottom.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
165 bottom.SetPoint(3, coordsLo[0], coordsLo[1], coordsHi[2]);
166 bottom.SetPoint(4, coordsLo[0], coordsLo[1], coordsLo[2]);
void GetCenter(double *xyz, double localz=0.0) const
double fFlashTMin
Minimal time for a flash to be displayed.
art framework interface to geometry description
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
const evdb::ColorScale & CalQ(geo::SigType_t st) const
double fFlashMinPE
Minimal PE for a flash to be displayed.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
std::size_t color(std::string const &procname)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
LArSoft geometry interface.
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
Event finding and building.
Signal from collection planes.