LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
evd::RawDataDrawer::BoxDrawer Class Reference
Inheritance diagram for evd::RawDataDrawer::BoxDrawer:
evd::RawDataDrawer::OperationBaseClass

Public Member Functions

 BoxDrawer (detinfo::DetectorPropertiesData const &detProp, geo::PlaneID const &pid, RawDataDrawer *dataDrawer, evdb::View2D *new_view)
 
bool Initialize () override
 
bool ProcessWire (geo::WireID const &wire) override
 
bool ProcessTick (size_t tick) override
 
bool Operate (geo::WireID const &wireID, size_t tick, float adc) override
 
bool Finish () override
 
virtual std::string Name () const
 
bool operator() (geo::WireID const &wireID, size_t tick, float adc)
 
geo::PlaneID const & PlaneID () const
 
RawDataDrawerRawDataDrawerPtr () const
 

Protected Attributes

RawDataDrawerpRawDataDrawer = nullptr
 

Private Attributes

evdb::View2Dview
 
double rawCharge = 0.
 
double convertedCharge = 0.
 
details::CellGridClass drawingRange
 
std::vector< BoxInfo_tboxInfo
 
details::ADCCorrectorClass ADCCorrector
 

Detailed Description

Definition at line 864 of file RawDataDrawer.cxx.

Constructor & Destructor Documentation

evd::RawDataDrawer::BoxDrawer::BoxDrawer ( detinfo::DetectorPropertiesData const &  detProp,
geo::PlaneID const &  pid,
RawDataDrawer dataDrawer,
evdb::View2D new_view 
)
inline

Definition at line 866 of file RawDataDrawer.cxx.

870  : OperationBaseClass(pid, dataDrawer)
871  , view(new_view)
872  , rawCharge(0.)
873  , convertedCharge(0.)
874  , drawingRange(*(dataDrawer->fDrawingRange))
875  , ADCCorrector(detProp, PlaneID())
876  {}
details::CellGridClass drawingRange
OperationBaseClass(geo::PlaneID const &pid, RawDataDrawer *data_drawer=nullptr)
details::ADCCorrectorClass ADCCorrector
geo::PlaneID const & PlaneID() const

Member Function Documentation

bool evd::RawDataDrawer::BoxDrawer::Finish ( )
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 920 of file RawDataDrawer.cxx.

921  {
922  // write the information back
923  geo::PlaneID::PlaneID_t const plane = PlaneID().Plane;
926 
927  // the cell size might have changed because of minimum size settings
928  // from configuration (see Initialize())
930 
931  // complete the drawing
933 
934  return true;
935  }
details::CellGridClass drawingRange
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:464
std::vector< BoxInfo_t > boxInfo
std::vector< double > fRawCharge
Sum of Raw Charge.
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:481
geo::PlaneID const & PlaneID() const
void QueueDrawingBoxes(evdb::View2D *view, geo::PlaneID const &pid, std::vector< BoxInfo_t > const &BoxInfo)
RawDataDrawer * RawDataDrawerPtr() const
details::CellGridClass * fDrawingRange
information about the viewport
std::vector< double > fConvertedCharge
Sum of Charge Converted using Birks&#39; formula.
bool evd::RawDataDrawer::BoxDrawer::Initialize ( )
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 878 of file RawDataDrawer.cxx.

References evd::RawDrawingOptions::fTicksPerPoint.

879  {
881 
882  // set up the size of the grid to be visualized;
883  // the information on the size has to be already there:
884  // caller should have user ExtractRange(), or similar, first.
885  // set the minimum cell in ticks to at least match fTicksPerPoint
887  // also set the minimum wire cell size to 1,
888  // otherwise there will be cells represented by no wire.
890  boxInfo.clear();
891  boxInfo.resize(drawingRange.NCells());
892  return true;
893  }
details::CellGridClass drawingRange
bool SetMinTDCCellSize(float min_size)
Sets the minimum size for TDC cells.
std::vector< BoxInfo_t > boxInfo
bool SetMinWireCellSize(float min_size)
Sets the minimum size for wire cells.
int fTicksPerPoint
number of ticks to include in one point
size_t NCells() const
Returns the total number of cells in the grid.
virtual std::string evd::RawDataDrawer::OperationBaseClass::Name ( ) const
inlinevirtualinherited

Reimplemented in evd::RawDataDrawer::ManyOperations.

Definition at line 662 of file RawDataDrawer.cxx.

Referenced by evd::RawDataDrawer::RunOperation().

662 { return cet::demangle_symbol(typeid(*this).name()); }
bool evd::RawDataDrawer::BoxDrawer::Operate ( geo::WireID const &  wireID,
size_t  tick,
float  adc 
)
inlineoverridevirtual

Implements evd::RawDataDrawer::OperationBaseClass.

Definition at line 902 of file RawDataDrawer.cxx.

References util::abs(), evd::RawDataDrawer::BoxInfo_t::adc, evd::RawDataDrawer::BoxInfo_t::good, and geo::WireID::Wire.

903  {
904  geo::WireID::WireID_t const wire = wireID.Wire;
905  std::ptrdiff_t cell = drawingRange.GetCell(wire, tick);
906  if (cell < 0) return true;
907 
908  BoxInfo_t& info = boxInfo[cell];
909  info.good = true; // if in range, we mark this cell as good
910 
911  rawCharge += adc;
913 
914  // draw maximum digit in the cell
915  if (std::abs(info.adc) <= std::abs(adc)) info.adc = adc;
916 
917  return true;
918  }
details::CellGridClass drawingRange
constexpr auto abs(T v)
Returns the absolute value of the argument.
std::ptrdiff_t GetCell(float wire, float tick) const
Returns the index of specified cell, or -1 if out of range.
std::vector< BoxInfo_t > boxInfo
details::ADCCorrectorClass ADCCorrector
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
unsigned int WireID_t
Type for the ID number.
Definition: geo_types.h:546
bool evd::RawDataDrawer::OperationBaseClass::operator() ( geo::WireID const &  wireID,
size_t  tick,
float  adc 
)
inlineinherited

Definition at line 664 of file RawDataDrawer.cxx.

665  {
666  return Operate(wireID, tick, adc);
667  }
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
virtual bool Operate(geo::WireID const &wireID, size_t tick, float adc)=0
geo::PlaneID const& evd::RawDataDrawer::OperationBaseClass::PlaneID ( ) const
inlineinherited

Definition at line 669 of file RawDataDrawer.cxx.

Referenced by evd::RawDataDrawer::RunOperation().

669 { return planeID; }
bool evd::RawDataDrawer::BoxDrawer::ProcessTick ( size_t  tick)
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 900 of file RawDataDrawer.cxx.

900 { return drawingRange.hasTick((float)tick); }
details::CellGridClass drawingRange
bool hasTick(float tick) const
Returns whether the range includes the specified wire.
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
bool evd::RawDataDrawer::BoxDrawer::ProcessWire ( geo::WireID const &  wire)
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 895 of file RawDataDrawer.cxx.

References geo::WireID::Wire.

896  {
897  return drawingRange.hasWire((int)wire.Wire);
898  }
details::CellGridClass drawingRange
bool hasWire(float wire) const
Returns whether the range includes the specified wire.
RawDataDrawer* evd::RawDataDrawer::OperationBaseClass::RawDataDrawerPtr ( ) const
inlineinherited

Definition at line 670 of file RawDataDrawer.cxx.

670 { return pRawDataDrawer; }

Member Data Documentation

details::ADCCorrectorClass evd::RawDataDrawer::BoxDrawer::ADCCorrector
private

Definition at line 943 of file RawDataDrawer.cxx.

std::vector<BoxInfo_t> evd::RawDataDrawer::BoxDrawer::boxInfo
private

Definition at line 942 of file RawDataDrawer.cxx.

double evd::RawDataDrawer::BoxDrawer::convertedCharge = 0.
private

Definition at line 940 of file RawDataDrawer.cxx.

details::CellGridClass evd::RawDataDrawer::BoxDrawer::drawingRange
private

Definition at line 941 of file RawDataDrawer.cxx.

RawDataDrawer* evd::RawDataDrawer::OperationBaseClass::pRawDataDrawer = nullptr
protectedinherited

Definition at line 673 of file RawDataDrawer.cxx.

double evd::RawDataDrawer::BoxDrawer::rawCharge = 0.
private

Definition at line 940 of file RawDataDrawer.cxx.

evdb::View2D* evd::RawDataDrawer::BoxDrawer::view
private

Definition at line 938 of file RawDataDrawer.cxx.


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