LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
evdb_tool::SpacePoint3DDrawerChiSquare Class Reference
Inheritance diagram for evdb_tool::SpacePoint3DDrawerChiSquare:
evdb_tool::ISpacePoints3D

Public Member Functions

 SpacePoint3DDrawerChiSquare (const fhicl::ParameterSet &)
 
 ~SpacePoint3DDrawerChiSquare ()
 
void Draw (const std::vector< art::Ptr< recob::SpacePoint >> &, evdb::View3D *, int, int, float, const art::FindManyP< recob::Hit > *) const
 

Detailed Description

Definition at line 20 of file SpacePoint3DDrawerChiSquare_tool.cc.

Constructor & Destructor Documentation

evdb_tool::SpacePoint3DDrawerChiSquare::SpacePoint3DDrawerChiSquare ( const fhicl::ParameterSet pset)
explicit

Definition at line 39 of file SpacePoint3DDrawerChiSquare_tool.cc.

40  {
41  // fNumPoints = pset.get< int>("NumPoints", 1000);
42  // fFloatBaseline = pset.get<bool>("FloatBaseline", false);
43  // For now only draw cryostat=0.
44 
45  return;
46  }
evdb_tool::SpacePoint3DDrawerChiSquare::~SpacePoint3DDrawerChiSquare ( )

Definition at line 48 of file SpacePoint3DDrawerChiSquare_tool.cc.

49  {
50  return;
51  }

Member Function Documentation

void evdb_tool::SpacePoint3DDrawerChiSquare::Draw ( const std::vector< art::Ptr< recob::SpacePoint >> &  hitsVec,
evdb::View3D view,
int  color,
int  marker,
float  size,
const art::FindManyP< recob::Hit > *  hitAssns 
) const
virtual

Implements evdb_tool::ISpacePoints3D.

Definition at line 53 of file SpacePoint3DDrawerChiSquare_tool.cc.

References evdb::View3D::AddPolyMarker3D(), evd::ColorDrawingOptions::CalQ(), DEFINE_ART_CLASS_TOOL, evd::ColorDrawingOptions::fRecoQHigh, evd::ColorDrawingOptions::fRecoQLow, evdb::ColorScale::GetColor(), and geo::kCollection.

59  {
60  // Get services.
62 
63  using HitPosition = std::array<double, 6>;
64  std::map<int, std::vector<HitPosition>> colorToHitMap;
65 
66  float minHitChiSquare(0.);
67  float maxHitChiSquare(2.);
68  float hitChiSqScale((cst->fRecoQHigh[geo::kCollection] - cst->fRecoQLow[geo::kCollection]) /
69  (maxHitChiSquare - minHitChiSquare));
70 
71  for (const auto& spacePoint : hitsVec) {
72  const double* pos = spacePoint->XYZ();
73  const double* err = spacePoint->ErrXYZ();
74 
75  int chargeColorIdx(0);
76  float spacePointChiSq(spacePoint->Chisq());
77 
78  float hitChiSq = std::max(minHitChiSquare, std::min(maxHitChiSquare, spacePointChiSq));
79 
80  float chgFactor = cst->fRecoQHigh[geo::kCollection] - hitChiSqScale * hitChiSq;
81 
82  chargeColorIdx = cst->CalQ(geo::kCollection).GetColor(chgFactor);
83 
84  colorToHitMap[chargeColorIdx].push_back(
85  HitPosition() = {{pos[0], pos[1], pos[2], err[3], err[3], err[5]}});
86  }
87 
88  for (auto& hitPair : colorToHitMap) {
89  TPolyMarker3D& pm =
90  view->AddPolyMarker3D(hitPair.second.size(), hitPair.first, kFullDotLarge, 0.17);
91  for (const auto& hit : hitPair.second)
92  pm.SetNextPoint(hit[0], hit[1], hit[2]);
93  }
94 
95  return;
96  }
int GetColor(double x) const
Definition: ColorScale.cxx:126
std::vector< double > fRecoQHigh
high edge of ADC values for drawing raw digits
std::vector< double > fRecoQLow
low edge of ADC values for drawing raw digits
const evdb::ColorScale & CalQ(geo::SigType_t st) const
Detector simulation of raw signals on wires.
TPolyMarker3D & AddPolyMarker3D(int n, int c, int st, double sz)
Definition: View3D.cxx:75
Signal from collection planes.
Definition: geo_types.h:152

The documentation for this class was generated from the following file: