LArSoft EndPoint2D class equivalent data container. More...
#include <endpoint2d.hh>
Public Member Functions | |
endpoint2d (DATA::DATA_TYPE type=DATA::EndPoint2D) | |
Default constructor. | |
endpoint2d (Double_t driftTime, UInt_t wire, Double_t strength, Int_t id, GEO::View_t view, Double_t totalQ, DATA::DATA_TYPE type=DATA::EndPoint2D) | |
Alternative constructor. | |
endpoint2d (const endpoint2d &original) | |
Copy constructor. | |
virtual | ~endpoint2d () |
Default destructor. | |
virtual void | clear_data () |
Clear method. | |
Double_t | Charge () const |
--- Getters ---/// | |
GEO::View_t | View () const |
Double_t | DriftTime () const |
UInt_t | Wire () const |
Int_t | ID () const |
Double_t | Strength () const |
DATA::DATA_TYPE | data_type () const |
data type getter | |
void | add_association (DATA::DATA_TYPE type, const std::vector< unsigned short > ass) |
Adder for a set of association. | |
size_t | size_association (DATA::DATA_TYPE type) const |
Getter for # of associations. | |
const std::vector< unsigned short > | association (DATA::DATA_TYPE type, size_t index=0) const |
Getter of an association. | |
Protected Attributes | |
DATA::DATA_TYPE | _type |
DATA_TYPE. | |
std::map < larlight::DATA::DATA_TYPE, std::vector< std::vector < unsigned short > > > | _ass |
Association storage ... allow multiple set of associations. | |
Private Attributes | |
Double_t | fDriftTime |
vertex's drift time | |
UInt_t | fWire |
vertex's wireID | |
Int_t | fID |
vertex's ID | |
Double_t | fStrength |
vertex's strength | |
GEO::View_t | fView |
view for this end point | |
Double_t | fTotalCharge |
total charge of hits associated with end point |
LArSoft EndPoint2D class equivalent data container.
Definition at line 25 of file endpoint2d.hh.
larlight::endpoint2d::endpoint2d | ( | DATA::DATA_TYPE | type = DATA::EndPoint2D |
) |
Default constructor.
Definition at line 9 of file endpoint2d.cc.
References larlight::data_base::_type, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::DATA::EndPoint2D, larlight::MSG::ERROR, larlight::DATA::FeatureEndPoint2D, larlight::DATA::HarrisEndPoint2D, larlight::Message::send(), and larlight::DATA::Vertex.
00009 : data_base(type) 00010 //************************************************************ 00011 { 00012 if(_type!=DATA::EndPoint2D && 00013 _type!=DATA::FeatureEndPoint2D && 00014 _type!=DATA::HarrisEndPoint2D) { 00015 00016 Message::send(MSG::ERROR,__FUNCTION__, 00017 Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str())); 00018 _type=DATA::Vertex; 00019 } 00020 00021 clear_data(); 00022 }
larlight::endpoint2d::endpoint2d | ( | Double_t | driftTime, | |
UInt_t | wire, | |||
Double_t | strength, | |||
Int_t | id, | |||
GEO::View_t | view, | |||
Double_t | totalQ, | |||
DATA::DATA_TYPE | type = DATA::EndPoint2D | |||
) |
Alternative constructor.
Definition at line 25 of file endpoint2d.cc.
References larlight::data_base::_type, larlight::DATA::DATA_TREE_NAME, larlight::DATA::EndPoint2D, larlight::MSG::ERROR, larlight::DATA::FeatureEndPoint2D, larlight::DATA::HarrisEndPoint2D, and larlight::Message::send().
00032 : data_base(type), 00033 fDriftTime(driftTime), 00034 fWire(wire), 00035 fID(id), 00036 fStrength(strength), 00037 fView(view), 00038 fTotalCharge(totalQ) 00039 //************************************************************ 00040 { 00041 if(_type!=DATA::EndPoint2D && 00042 _type!=DATA::FeatureEndPoint2D && 00043 _type!=DATA::HarrisEndPoint2D) { 00044 00045 Message::send(MSG::ERROR,__FUNCTION__, 00046 Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str())); 00047 _type=DATA::EndPoint2D; 00048 } 00049 }
larlight::endpoint2d::endpoint2d | ( | const endpoint2d & | original | ) | [inline] |
Copy constructor.
Definition at line 42 of file endpoint2d.hh.
00042 : data_base(original), 00043 fDriftTime(original.fDriftTime), 00044 fWire(original.fWire), 00045 fID(original.fID), 00046 fStrength(original.fStrength), 00047 fView(original.fView), 00048 fTotalCharge(original.fTotalCharge) 00049 {}
virtual larlight::endpoint2d::~endpoint2d | ( | ) | [inline, virtual] |
void larlight::data_base::add_association | ( | DATA::DATA_TYPE | type, | |
const std::vector< unsigned short > | ass | |||
) | [inherited] |
Adder for a set of association.
Definition at line 9 of file data_base.cc.
References larlight::data_base::_ass.
const std::vector< unsigned short > larlight::data_base::association | ( | DATA::DATA_TYPE | type, | |
size_t | index = 0 | |||
) | const [inherited] |
Getter of an association.
Definition at line 35 of file data_base.cc.
References larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, and larlight::Message::send().
00037 { 00038 00039 size_t ass_length = size_association(type); 00040 00041 if( !(ass_length) ) { 00042 00043 Message::send(MSG::ERROR,__FUNCTION__, 00044 Form("There is no association to %s",DATA::DATA_TREE_NAME[type].c_str())); 00045 00046 return std::vector<unsigned short>(); 00047 00048 } 00049 00050 if( ass_length <= index ) { 00051 00052 Message::send(MSG::ERROR,__FUNCTION__, 00053 Form("There are only %zu associations. No association @ index=%zu",ass_length,index)); 00054 00055 return std::vector<unsigned short>(); 00056 00057 } 00058 00059 return ((_ass.find(type))->second).at(index); 00060 }
Double_t larlight::endpoint2d::Charge | ( | ) | const [inline] |
--- Getters ---///
Definition at line 58 of file endpoint2d.hh.
References fTotalCharge.
00058 { return fTotalCharge; }
void larlight::endpoint2d::clear_data | ( | ) | [virtual] |
Clear method.
Reimplemented from larlight::data_base.
Definition at line 53 of file endpoint2d.cc.
References fDriftTime, fID, fStrength, fTotalCharge, fView, fWire, larlight::DATA::INVALID_DOUBLE, larlight::DATA::INVALID_INT, larlight::DATA::INVALID_UINT, and larlight::GEO::kUnknown.
Referenced by endpoint2d().
00055 { 00056 data_base::clear_data(); 00057 fDriftTime=DATA::INVALID_DOUBLE; 00058 fWire=DATA::INVALID_UINT; 00059 fStrength=DATA::INVALID_DOUBLE; 00060 fID=DATA::INVALID_INT; 00061 fView=GEO::kUnknown; 00062 fTotalCharge=DATA::INVALID_DOUBLE; 00063 }
DATA::DATA_TYPE larlight::data_base::data_type | ( | ) | const [inline, inherited] |
data type getter
Reimplemented in larlight::event_base.
Definition at line 48 of file data_base.hh.
References larlight::data_base::_type.
00048 {return _type; }
Double_t larlight::endpoint2d::DriftTime | ( | ) | const [inline] |
Int_t larlight::endpoint2d::ID | ( | ) | const [inline] |
size_t larlight::data_base::size_association | ( | DATA::DATA_TYPE | type | ) | const [inherited] |
Getter for # of associations.
Definition at line 23 of file data_base.cc.
Referenced by larlight::cluster::get_hit_type().
Double_t larlight::endpoint2d::Strength | ( | ) | const [inline] |
GEO::View_t larlight::endpoint2d::View | ( | ) | const [inline] |
UInt_t larlight::endpoint2d::Wire | ( | ) | const [inline] |
std::map<larlight::DATA::DATA_TYPE,std::vector<std::vector<unsigned short> > > larlight::data_base::_ass [protected, inherited] |
Association storage ... allow multiple set of associations.
Definition at line 65 of file data_base.hh.
Referenced by larlight::data_base::add_association(), and larlight::data_base::clear_data().
DATA::DATA_TYPE larlight::data_base::_type [protected, inherited] |
DATA_TYPE.
Definition at line 62 of file data_base.hh.
Referenced by larlight::calorimetry::calorimetry(), larlight::cluster::cluster(), larlight::data_base::data_base(), larlight::event_base::data_type(), larlight::data_base::data_type(), endpoint2d(), larlight::event_calorimetry::event_calorimetry(), larlight::event_cluster::event_cluster(), larlight::event_endpoint2d::event_endpoint2d(), larlight::event_fifo::event_fifo(), larlight::event_hit::event_hit(), larlight::event_mcpart::event_mcpart(), larlight::event_mcshower::event_mcshower(), larlight::event_mctruth::event_mctruth(), larlight::event_pulse::event_pulse(), larlight::event_shower::event_shower(), larlight::event_simch::event_simch(), larlight::event_sps::event_sps(), larlight::event_track::event_track(), larlight::event_user::event_user(), larlight::event_vertex::event_vertex(), larlight::event_wire::event_wire(), larlight::fifo::fifo(), larlight::hit::hit(), larlight::mcnu::mcnu(), larlight::mcpart::mcpart(), larlight::mcshower::mcshower(), larlight::mctrajectory::mctrajectory(), larlight::mctruth::mctruth(), larlight::pmtfifo::pmtfifo(), larlight::pulse::pulse(), larlight::fifo::readout_sample_number_16MHz(), larlight::fifo::readout_sample_number_2MHz(), larlight::fifo::readout_sample_number_64MHz(), larlight::shower::shower(), larlight::simch::simch(), larlight::spacepoint::spacepoint(), larlight::tpcfifo::tpcfifo(), larlight::track::track(), larlight::trigger::trigger(), larlight::user_info::user_info(), larlight::vertex::vertex(), and larlight::wire::wire().
Double_t larlight::endpoint2d::fDriftTime [private] |
vertex's drift time
Definition at line 67 of file endpoint2d.hh.
Referenced by clear_data(), and DriftTime().
Int_t larlight::endpoint2d::fID [private] |
Double_t larlight::endpoint2d::fStrength [private] |
vertex's strength
Definition at line 70 of file endpoint2d.hh.
Referenced by clear_data(), and Strength().
Double_t larlight::endpoint2d::fTotalCharge [private] |
total charge of hits associated with end point
Definition at line 72 of file endpoint2d.hh.
Referenced by Charge(), and clear_data().
GEO::View_t larlight::endpoint2d::fView [private] |
view for this end point
Definition at line 71 of file endpoint2d.hh.
Referenced by clear_data(), and View().
UInt_t larlight::endpoint2d::fWire [private] |
vertex's wireID
Definition at line 68 of file endpoint2d.hh.
Referenced by clear_data(), and Wire().