19 #include "TPolyLine3D.h" 34 const Eigen::Vector3f&,
35 const Eigen::Vector3f&,
53 std::vector<float> opHitPEVec;
57 for (
size_t idx = 0; idx < recoOpt->
fOpHitLabels.size(); idx++) {
60 event.getByLabel(opHitProducer, opHitHandle);
62 if (!opHitHandle.
isValid())
continue;
63 if (opHitHandle->size() == 0)
continue;
66 for (
const auto& opHit : *opHitHandle) {
69 if (opHit.PeakTime() < recoOpt->
fFlashTMin)
continue;
70 if (opHit.PeakTime() > recoOpt->
fFlashTMax)
continue;
72 opHitPEVec.push_back(opHit.PE());
77 if (!opHitPEVec.empty()) {
79 std::sort(opHitPEVec.begin(), opHitPEVec.end());
81 float minTotalPE = opHitPEVec.front();
82 float maxTotalPE = opHitPEVec[0.9 * opHitPEVec.size()];
86 (maxTotalPE - minTotalPE));
90 for (
size_t idx = 0; idx < recoOpt->
fOpHitLabels.size(); idx++) {
93 event.getByLabel(opHitProducer, opHitHandle);
95 if (!opHitHandle.
isValid())
continue;
96 if (opHitHandle->size() == 0)
continue;
99 for (
const auto& opHit : *opHitHandle) {
102 if (opHit.PeakTime() < recoOpt->
fFlashTMin)
continue;
103 if (opHit.PeakTime() > recoOpt->
fFlashTMax)
continue;
105 unsigned int opChannel = opHit.OpChannel();
106 const geo::OpDetGeo& opHitGeo = wireReadoutGeom.OpDetGeoFromOpChannel(opChannel);
108 float xWidth = opHit.Width();
109 float zWidth = opHitGeo.
HalfW();
110 float yWidth = opHitGeo.
HalfH();
112 Eigen::Vector3f opHitLo(
113 opHitPos.X() - xWidth, opHitPos.Y() - yWidth, opHitPos.Z() - zWidth);
114 Eigen::Vector3f opHitHi(
115 opHitPos.X() + xWidth, opHitPos.Y() + yWidth, opHitPos.Z() + zWidth);
118 opHitPEScale * std::min(maxTotalPE,
float(opHit.PE()));
129 const Eigen::Vector3f& coordsLo,
130 const Eigen::Vector3f& coordsHi,
135 TPolyLine3D& top = view->
AddPolyLine3D(5, color, width, style);
136 top.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
137 top.SetPoint(1, coordsHi[0], coordsHi[1], coordsLo[2]);
138 top.SetPoint(2, coordsHi[0], coordsHi[1], coordsHi[2]);
139 top.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
140 top.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
142 TPolyLine3D& side = view->
AddPolyLine3D(5, color, width, style);
143 side.SetPoint(0, coordsHi[0], coordsHi[1], coordsLo[2]);
144 side.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
145 side.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
146 side.SetPoint(3, coordsHi[0], coordsHi[1], coordsHi[2]);
147 side.SetPoint(4, coordsHi[0], coordsHi[1], coordsLo[2]);
149 TPolyLine3D& side2 = view->
AddPolyLine3D(5, color, width, style);
150 side2.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
151 side2.SetPoint(1, coordsLo[0], coordsLo[1], coordsLo[2]);
152 side2.SetPoint(2, coordsLo[0], coordsLo[1], coordsHi[2]);
153 side2.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
154 side2.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
156 TPolyLine3D& bottom = view->
AddPolyLine3D(5, color, width, style);
157 bottom.SetPoint(0, coordsLo[0], coordsLo[1], coordsLo[2]);
158 bottom.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
159 bottom.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
160 bottom.SetPoint(3, coordsLo[0], coordsLo[1], coordsHi[2]);
161 bottom.SetPoint(4, coordsLo[0], coordsLo[1], coordsLo[2]);
Point_t const & GetCenter() const
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
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.
Encapsulate the geometry of an optical detector.
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.
std::vector< art::InputTag > fOpHitLabels
module labels that produced events
Event finding and building.
Signal from collection planes.