Public Member Functions | Private Attributes | List of all members
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
 
- Public Member Functions inherited from evd::RawDataDrawer::OperationBaseClass
 OperationBaseClass (geo::PlaneID const &pid, RawDataDrawer *data_drawer=nullptr)
 
virtual ~OperationBaseClass ()=default
 
virtual std::string Name () const
 
bool operator() (geo::WireID const &wireID, size_t tick, float adc)
 
geo::PlaneID const & PlaneID () const
 
RawDataDrawerRawDataDrawerPtr () const
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from evd::RawDataDrawer::OperationBaseClass
RawDataDrawerpRawDataDrawer = nullptr
 

Detailed Description

Definition at line 1068 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 1070 of file RawDataDrawer.cxx.

1074  : OperationBaseClass(pid, dataDrawer)
1075  , view(new_view)
1076  , rawCharge(0.)
1077  , convertedCharge(0.)
1078  , drawingRange(*(dataDrawer->fDrawingRange))
1079  , ADCCorrector(detProp, PlaneID())
1080  {}
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 1132 of file RawDataDrawer.cxx.

1133  {
1134  // write the information back
1135  geo::PlaneID::PlaneID_t const plane = PlaneID().Plane;
1138 
1139  // the cell size might have changed because of minimum size settings
1140  // from configuration (see Initialize())
1142 
1143  // complete the drawing
1145 
1146  return true;
1147  }
details::CellGridClass drawingRange
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:473
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:493
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 ( void  )
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 1083 of file RawDataDrawer.cxx.

1084  {
1086 
1087  // set up the size of the grid to be visualized;
1088  // the information on the size has to be already there:
1089  // caller should have user ExtractRange(), or similar, first.
1090  // set the minimum cell in ticks to at least match fTicksPerPoint
1092  // also set the minimum wire cell size to 1,
1093  // otherwise there will be cells represented by no wire.
1095  boxInfo.clear();
1096  boxInfo.resize(drawingRange.NCells());
1097  return true;
1098  }
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.
bool evd::RawDataDrawer::BoxDrawer::Operate ( geo::WireID const &  wireID,
size_t  tick,
float  adc 
)
inlineoverridevirtual

Implements evd::RawDataDrawer::OperationBaseClass.

Definition at line 1113 of file RawDataDrawer.cxx.

1114  {
1115  geo::WireID::WireID_t const wire = wireID.Wire;
1116  std::ptrdiff_t cell = drawingRange.GetCell(wire, tick);
1117  if (cell < 0) return true;
1118 
1119  BoxInfo_t& info = boxInfo[cell];
1120  info.good = true; // if in range, we mark this cell as good
1121 
1122  rawCharge += adc;
1124 
1125  // draw maximum digit in the cell
1126  if (std::abs(info.adc) <= std::abs(adc)) info.adc = adc;
1127 
1128  return true;
1129  }
details::CellGridClass drawingRange
std::ptrdiff_t GetCell(float wire, float tick) const
Returns the index of specified cell, or -1 if out of range.
int16_t adc
Definition: CRTFragment.hh:202
std::vector< BoxInfo_t > boxInfo
details::ADCCorrectorClass ADCCorrector
T abs(T value)
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:75
unsigned int WireID_t
Type for the ID number.
Definition: geo_types.h:561
bool evd::RawDataDrawer::BoxDrawer::ProcessTick ( size_t  tick)
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 1107 of file RawDataDrawer.cxx.

1108  {
1109  return drawingRange.hasTick((float)tick);
1110  }
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:75
bool evd::RawDataDrawer::BoxDrawer::ProcessWire ( geo::WireID const &  wire)
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 1101 of file RawDataDrawer.cxx.

1102  {
1103  return drawingRange.hasWire((int)wire.Wire);
1104  }
details::CellGridClass drawingRange
bool hasWire(float wire) const
Returns whether the range includes the specified wire.

Member Data Documentation

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

Definition at line 1155 of file RawDataDrawer.cxx.

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

Definition at line 1154 of file RawDataDrawer.cxx.

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

Definition at line 1152 of file RawDataDrawer.cxx.

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

Definition at line 1153 of file RawDataDrawer.cxx.

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

Definition at line 1152 of file RawDataDrawer.cxx.

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

Definition at line 1150 of file RawDataDrawer.cxx.


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