LArSoft Calorimetry class equivalent data container. More...
#include <calorimetry.hh>
Public Member Functions | |
calorimetry (DATA::DATA_TYPE type=DATA::Calorimetry) | |
Default constructor. | |
calorimetry (const calorimetry &original) | |
Copy constructor. | |
virtual | ~calorimetry () |
Default destructor. | |
virtual void | clear_data () |
Clear method. | |
void | set_dedx (const std::vector< double > &v) |
void | set_dqdx (const std::vector< double > &v) |
void | set_residual_range (const std::vector< double > &v) |
void | set_deadwire_range (const std::vector< double > &v) |
void | set_kinetic_energy (const double v) |
void | set_range (const double v) |
void | set_track_pitch (const std::vector< double > &v) |
const std::vector< double > & | dEdx () const |
const std::vector< double > & | dQdx () const |
const std::vector< double > & | ResidualRange () const |
const std::vector< double > & | DeadWireResRC () const |
double | KineticEnergy () const |
double | Range () const |
const std::vector< double > & | TrkPitchVec () const |
double | TrkPitchC () 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 | |
double | fKineticEnergy |
determined kinetic energy | |
std::vector< double > | fdEdx |
dE/dx, should be same size as fResidualRange | |
std::vector< double > | fdQdx |
dQ/dx | |
std::vector< double > | fResidualRange |
range from end of track | |
std::vector< double > | fDeadWireResR |
dead wire residual range, collection plane | |
double | fRange |
total range of track | |
std::vector< double > | fTrkPitch |
track pitch on collection plane | |
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 Calorimetry class equivalent data container.
Definition at line 25 of file calorimetry.hh.
larlight::calorimetry::calorimetry | ( | DATA::DATA_TYPE | type = DATA::Calorimetry |
) |
Default constructor.
Definition at line 9 of file calorimetry.cc.
References larlight::data_base::_type, larlight::DATA::Calorimetry, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, and larlight::Message::send().
00009 : data_base(type) 00010 //************************************************************** 00011 { 00012 if(_type!=DATA::Calorimetry) { 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 00017 _type=DATA::Calorimetry; 00018 } 00019 00020 clear_data(); 00021 }
larlight::calorimetry::calorimetry | ( | const calorimetry & | original | ) | [inline] |
Copy constructor.
Definition at line 33 of file calorimetry.hh.
00033 : data_base(original), 00034 fKineticEnergy(original.fKineticEnergy), 00035 fdEdx(original.fdEdx), 00036 fdQdx(original.fdQdx), 00037 fResidualRange(original.fResidualRange), 00038 fDeadWireResR(original.fDeadWireResR), 00039 fRange(original.fRange), 00040 fTrkPitch(original.fTrkPitch) 00041 {}
virtual larlight::calorimetry::~calorimetry | ( | ) | [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 }
void larlight::calorimetry::clear_data | ( | ) | [virtual] |
Clear method.
Reimplemented from larlight::data_base.
Definition at line 24 of file calorimetry.cc.
References fDeadWireResR, fdEdx, fdQdx, fRange, fResidualRange, and fTrkPitch.
Referenced by calorimetry().
00026 { 00027 data_base::clear_data(); 00028 fdEdx.clear(); 00029 fdQdx.clear(); 00030 fResidualRange.clear(); 00031 fDeadWireResR.clear(); 00032 fTrkPitch.clear(); 00033 fRange = -1; 00034 }
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 std::vector<double>& larlight::calorimetry::DeadWireResRC | ( | ) | const [inline] |
Definition at line 61 of file calorimetry.hh.
References fDeadWireResR.
00061 { return fDeadWireResR; }
const std::vector<double>& larlight::calorimetry::dEdx | ( | ) | const [inline] |
const std::vector<double>& larlight::calorimetry::dQdx | ( | ) | const [inline] |
double larlight::calorimetry::KineticEnergy | ( | ) | const [inline] |
Definition at line 62 of file calorimetry.hh.
References fKineticEnergy.
00062 { return fKineticEnergy; }
double larlight::calorimetry::Range | ( | ) | const [inline] |
const std::vector<double>& larlight::calorimetry::ResidualRange | ( | ) | const [inline] |
Definition at line 60 of file calorimetry.hh.
References fResidualRange.
00060 { return fResidualRange; }
void larlight::calorimetry::set_deadwire_range | ( | const std::vector< double > & | v | ) | [inline] |
Definition at line 52 of file calorimetry.hh.
References fDeadWireResR.
00052 { fDeadWireResR = v; }
void larlight::calorimetry::set_dedx | ( | const std::vector< double > & | v | ) | [inline] |
void larlight::calorimetry::set_dqdx | ( | const std::vector< double > & | v | ) | [inline] |
void larlight::calorimetry::set_kinetic_energy | ( | const double | v | ) | [inline] |
Definition at line 53 of file calorimetry.hh.
References fKineticEnergy.
00053 { fKineticEnergy = v; }
void larlight::calorimetry::set_range | ( | const double | v | ) | [inline] |
void larlight::calorimetry::set_residual_range | ( | const std::vector< double > & | v | ) | [inline] |
Definition at line 51 of file calorimetry.hh.
References fResidualRange.
00051 { fResidualRange = v; }
void larlight::calorimetry::set_track_pitch | ( | const std::vector< double > & | v | ) | [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 larlight::calorimetry::TrkPitchC | ( | ) | const [inline] |
Definition at line 65 of file calorimetry.hh.
References fTrkPitch.
const std::vector<double>& larlight::calorimetry::TrkPitchVec | ( | ) | 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 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(), larlight::spacepoint::spacepoint(), larlight::tpcfifo::tpcfifo(), larlight::track::track(), larlight::trigger::trigger(), larlight::user_info::user_info(), larlight::vertex::vertex(), and larlight::wire::wire().
std::vector<double> larlight::calorimetry::fDeadWireResR [protected] |
dead wire residual range, collection plane
Definition at line 78 of file calorimetry.hh.
Referenced by clear_data(), DeadWireResRC(), and set_deadwire_range().
std::vector<double> larlight::calorimetry::fdEdx [protected] |
dE/dx, should be same size as fResidualRange
Definition at line 75 of file calorimetry.hh.
Referenced by clear_data(), dEdx(), and set_dedx().
std::vector<double> larlight::calorimetry::fdQdx [protected] |
dQ/dx
Definition at line 76 of file calorimetry.hh.
Referenced by clear_data(), dQdx(), and set_dqdx().
double larlight::calorimetry::fKineticEnergy [protected] |
determined kinetic energy
Definition at line 74 of file calorimetry.hh.
Referenced by KineticEnergy(), and set_kinetic_energy().
double larlight::calorimetry::fRange [protected] |
total range of track
Definition at line 79 of file calorimetry.hh.
Referenced by clear_data(), Range(), and set_range().
std::vector<double> larlight::calorimetry::fResidualRange [protected] |
range from end of track
Definition at line 77 of file calorimetry.hh.
Referenced by clear_data(), ResidualRange(), and set_residual_range().
std::vector<double> larlight::calorimetry::fTrkPitch [protected] |
track pitch on collection plane
Definition at line 80 of file calorimetry.hh.
Referenced by clear_data(), set_track_pitch(), TrkPitchC(), and TrkPitchVec().