LArSoft SpacePoint class equivalent data container. More...
#include <spacepoint.hh>
Public Member Functions | |
| spacepoint (DATA::DATA_TYPE type=DATA::SpacePoint) | |
| Default constructor. | |
| spacepoint (Int_t id, Double_t x, Double_t y, Double_t z, Double_t ex, Double_t ey, Double_t ez, Double_t chi2) | |
| spacepoint (const spacepoint &original) | |
| Copy constructor. | |
| virtual | ~spacepoint () |
| Default destructor. | |
| Int_t | ID () const |
| const Double_t * | XYZ () const |
| const Double_t * | ErrXYZ () const |
| Double_t | Chisq () const |
| void | clear_data () |
| Method to clear data member. | |
| 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 | |
| Int_t | fID |
| SpacePoint ID. | |
| Double_t | fXYZ [3] |
| position of SpacePoint in xyz | |
| Double_t | fErrXYZ [6] |
| Error matrix (triangular). | |
| Double_t | fChisq |
| Chisquare. | |
| 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. | |
LArSoft SpacePoint class equivalent data container.
Definition at line 27 of file spacepoint.hh.
| larlight::spacepoint::spacepoint | ( | DATA::DATA_TYPE | type = DATA::SpacePoint |
) |
Default constructor.
Definition at line 9 of file spacepoint.cc.
References larlight::data_base::_type, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, larlight::Message::send(), and larlight::DATA::SpacePoint.
00009 : data_base(type) 00010 //************************************************************ 00011 { 00012 if(_type!=DATA::SpacePoint) { 00013 00014 Message::send(MSG::ERROR,__FUNCTION__, 00015 Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str())); 00016 _type=DATA::SpacePoint; 00017 } 00018 00019 clear_data(); 00020 00021 }
| larlight::spacepoint::spacepoint | ( | Int_t | id, | |
| Double_t | x, | |||
| Double_t | y, | |||
| Double_t | z, | |||
| Double_t | ex, | |||
| Double_t | ey, | |||
| Double_t | ez, | |||
| Double_t | chi2 | |||
| ) | [inline] |
Definition at line 34 of file spacepoint.hh.
References clear_data(), fChisq, fErrXYZ, fID, and fXYZ.
| larlight::spacepoint::spacepoint | ( | const spacepoint & | original | ) | [inline] |
Copy constructor.
Definition at line 51 of file spacepoint.hh.
00051 : data_base(original), 00052 fID(original.fID), 00053 fChisq(original.fChisq) 00054 { 00055 fXYZ[0]=original.fXYZ[0]; 00056 fXYZ[1]=original.fXYZ[1]; 00057 fXYZ[2]=original.fXYZ[2]; 00058 fErrXYZ[0]=original.fErrXYZ[0]; 00059 fErrXYZ[1]=original.fErrXYZ[1]; 00060 fErrXYZ[2]=original.fErrXYZ[2]; 00061 }
| virtual larlight::spacepoint::~spacepoint | ( | ) | [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::spacepoint::Chisq | ( | ) | const [inline] |
| void larlight::spacepoint::clear_data | ( | ) | [inline, virtual] |
Method to clear data member.
Reimplemented from larlight::data_base.
Definition at line 72 of file spacepoint.hh.
References fChisq, fErrXYZ, fID, and fXYZ.
Referenced by spacepoint().
| 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; }
| const Double_t* larlight::spacepoint::ErrXYZ | ( | ) | const [inline] |
| Int_t larlight::spacepoint::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().
| const Double_t* larlight::spacepoint::XYZ | ( | ) | 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(), larlight::endpoint2d::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(), 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::spacepoint::fChisq [protected] |
Chisquare.
Definition at line 89 of file spacepoint.hh.
Referenced by Chisq(), clear_data(), and spacepoint().
Double_t larlight::spacepoint::fErrXYZ[6] [protected] |
Error matrix (triangular).
Definition at line 88 of file spacepoint.hh.
Referenced by clear_data(), ErrXYZ(), and spacepoint().
Int_t larlight::spacepoint::fID [protected] |
SpacePoint ID.
Definition at line 86 of file spacepoint.hh.
Referenced by clear_data(), ID(), and spacepoint().
Double_t larlight::spacepoint::fXYZ[3] [protected] |
position of SpacePoint in xyz
Definition at line 87 of file spacepoint.hh.
Referenced by clear_data(), spacepoint(), and XYZ().
1.6.1