LArSoft Cluster class equivalent data container. More...
#include <cluster.hh>
Public Member Functions | |
cluster (DATA::DATA_TYPE type=DATA::Cluster) | |
Default constructor. | |
virtual | ~cluster () |
Default destructor. | |
void | set_charge (Double_t q) |
void | set_dtdw (Double_t v) |
void | set_dqdw (Double_t v) |
void | set_dtdw_err (Double_t v) |
void | set_dqdw_err (Double_t v) |
void | set_id (Int_t i) |
void | set_view (GEO::View_t v) |
void | set_start_vtx (const std::vector< Double_t > vtx) |
void | set_end_vtx (const std::vector< Double_t > vtx) |
void | set_start_vtx_err (const std::vector< Double_t > vtx) |
void | set_end_vtx_err (const std::vector< Double_t > vtx) |
Double_t | Charge () const |
Double_t | dTdW () const |
Double_t | dQdW () const |
Double_t | SigmadTdW () const |
Double_t | SigmadQdW () const |
Int_t | ID () const |
GEO::View_t | View () const |
const std::vector< Double_t > & | StartPos () const |
const std::vector< Double_t > & | EndPos () const |
const std::vector< Double_t > & | SigmaStartPos () const |
const std::vector< Double_t > & | SigmaEndPos () const |
virtual void | clear_data () |
Clear method. | |
DATA::DATA_TYPE | get_hit_type () 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 | fTotalCharge |
total charge in cluster | |
Double_t | fdTdW |
slope of cluster in tdc vs wire | |
Double_t | fdQdW |
slope of cluster in charge vs wire | |
Double_t | fSigmadTdW |
slope of cluster in tdc vs wire | |
Double_t | fSigmadQdW |
slope of cluster in charge vs wire | |
std::vector< Double_t > | fStartPos |
start of cluster in (wire, tdc) plane | |
std::vector< Double_t > | fEndPos |
start of cluster in (wire, tdc) plane | |
std::vector< Double_t > | fSigmaStartPos |
start of cluster in (wire, tdc) plane | |
std::vector< Double_t > | fSigmaEndPos |
start of cluster in (wire, tdc) plane | |
Int_t | fID |
cluster's ID | |
GEO::View_t | fView |
View associated w/ this cluster. |
LArSoft Cluster class equivalent data container.
Definition at line 27 of file cluster.hh.
larlight::cluster::cluster | ( | DATA::DATA_TYPE | type = DATA::Cluster |
) |
Default constructor.
Definition at line 9 of file cluster.cc.
References larlight::data_base::_type, clear_data(), larlight::DATA::Cluster, larlight::DATA::CrawlerCluster, larlight::DATA::DATA_TREE_NAME, larlight::DATA::DBCluster, larlight::MSG::ERROR, larlight::DATA::FuzzyCluster, larlight::DATA::HoughCluster, larlight::Message::send(), and larlight::DATA::ShowerAngleCluster.
00009 : data_base(type) 00010 //############################################################################ 00011 { 00012 if( _type != DATA::Cluster && 00013 _type != DATA::FuzzyCluster && 00014 _type != DATA::DBCluster && 00015 _type != DATA::CrawlerCluster && 00016 _type != DATA::HoughCluster && 00017 _type != DATA::ShowerAngleCluster ) 00018 00019 { 00020 Message::send(MSG::ERROR,__FUNCTION__, 00021 Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str())); 00022 00023 _type = DATA::Cluster; 00024 } 00025 00026 clear_data(); 00027 }
virtual larlight::cluster::~cluster | ( | ) | [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::cluster::Charge | ( | ) | const [inline] |
virtual void larlight::cluster::clear_data | ( | ) | [inline, virtual] |
Clear method.
Reimplemented from larlight::data_base.
Definition at line 61 of file cluster.hh.
References fdQdW, fdTdW, fEndPos, fID, fSigmadQdW, fSigmadTdW, fSigmaEndPos, fSigmaStartPos, fStartPos, fTotalCharge, fView, and larlight::GEO::kUnknown.
Referenced by cluster().
00061 { 00062 data_base::clear_data(); 00063 fTotalCharge = -1; 00064 fdTdW = fdQdW = fSigmadTdW = fSigmadQdW = -1; 00065 fStartPos.resize(2,0); 00066 fEndPos.resize(2,0); 00067 fSigmaStartPos.resize(2,0); 00068 fSigmaEndPos.resize(2,0); 00069 fID = -1; 00070 fView = GEO::kUnknown; 00071 }
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::cluster::dQdW | ( | ) | const [inline] |
Double_t larlight::cluster::dTdW | ( | ) | const [inline] |
const std::vector<Double_t>& larlight::cluster::EndPos | ( | ) | const [inline] |
DATA::DATA_TYPE larlight::cluster::get_hit_type | ( | ) | const |
Definition at line 53 of file cluster.cc.
References larlight::DATA::APAHit, larlight::DATA::CrawlerHit, larlight::DATA::DATA_TYPE_MAX, larlight::MSG::ERROR, larlight::DATA::FFTHit, larlight::DATA::GausHit, larlight::DATA::Hit, larlight::DATA::RFFHit, larlight::Message::send(), and larlight::data_base::size_association().
00054 { 00055 00056 // Assume there's only 1 unique association 00057 00058 if(size_association(DATA::Hit)) return DATA::Hit; 00059 if(size_association(DATA::GausHit)) return DATA::GausHit; 00060 if(size_association(DATA::RFFHit)) return DATA::RFFHit; 00061 if(size_association(DATA::FFTHit)) return DATA::FFTHit; 00062 if(size_association(DATA::CrawlerHit)) return DATA::CrawlerHit; 00063 if(size_association(DATA::APAHit)) return DATA::APAHit; 00064 else 00065 Message::send(MSG::ERROR,__FUNCTION__,"Did not find any associated hit!"); 00066 return DATA::DATA_TYPE_MAX; 00067 00068 }
Int_t larlight::cluster::ID | ( | ) | const [inline] |
void larlight::cluster::set_charge | ( | Double_t | q | ) | [inline] |
void larlight::cluster::set_dqdw | ( | Double_t | v | ) | [inline] |
void larlight::cluster::set_dqdw_err | ( | Double_t | v | ) | [inline] |
void larlight::cluster::set_dtdw | ( | Double_t | v | ) | [inline] |
void larlight::cluster::set_dtdw_err | ( | Double_t | v | ) | [inline] |
void larlight::cluster::set_end_vtx | ( | const std::vector< Double_t > | vtx | ) | [inline] |
void larlight::cluster::set_end_vtx_err | ( | const std::vector< Double_t > | vtx | ) | [inline] |
void larlight::cluster::set_id | ( | Int_t | i | ) | [inline] |
void larlight::cluster::set_start_vtx | ( | const std::vector< Double_t > | vtx | ) | [inline] |
void larlight::cluster::set_start_vtx_err | ( | const std::vector< Double_t > | vtx | ) | [inline] |
void larlight::cluster::set_view | ( | GEO::View_t | v | ) | [inline] |
Double_t larlight::cluster::SigmadQdW | ( | ) | const [inline] |
Double_t larlight::cluster::SigmadTdW | ( | ) | const [inline] |
const std::vector<Double_t>& larlight::cluster::SigmaEndPos | ( | ) | const [inline] |
const std::vector<Double_t>& larlight::cluster::SigmaStartPos | ( | ) | const [inline] |
Definition at line 59 of file cluster.hh.
References fSigmaStartPos.
00059 { return fSigmaStartPos; }
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 get_hit_type().
const std::vector<Double_t>& larlight::cluster::StartPos | ( | ) | const [inline] |
GEO::View_t larlight::cluster::View | ( | ) | 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(), 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().
Double_t larlight::cluster::fdQdW [private] |
slope of cluster in charge vs wire
Definition at line 79 of file cluster.hh.
Referenced by clear_data(), dQdW(), and set_dqdw().
Double_t larlight::cluster::fdTdW [private] |
slope of cluster in tdc vs wire
Definition at line 78 of file cluster.hh.
Referenced by clear_data(), dTdW(), and set_dtdw().
std::vector<Double_t> larlight::cluster::fEndPos [private] |
start of cluster in (wire, tdc) plane
Definition at line 83 of file cluster.hh.
Referenced by clear_data(), EndPos(), and set_end_vtx().
Int_t larlight::cluster::fID [private] |
cluster's ID
Definition at line 86 of file cluster.hh.
Referenced by clear_data(), ID(), and set_id().
Double_t larlight::cluster::fSigmadQdW [private] |
slope of cluster in charge vs wire
Definition at line 81 of file cluster.hh.
Referenced by clear_data(), set_dqdw_err(), and SigmadQdW().
Double_t larlight::cluster::fSigmadTdW [private] |
slope of cluster in tdc vs wire
Definition at line 80 of file cluster.hh.
Referenced by clear_data(), set_dtdw_err(), and SigmadTdW().
std::vector<Double_t> larlight::cluster::fSigmaEndPos [private] |
start of cluster in (wire, tdc) plane
Definition at line 85 of file cluster.hh.
Referenced by clear_data(), set_end_vtx_err(), and SigmaEndPos().
std::vector<Double_t> larlight::cluster::fSigmaStartPos [private] |
start of cluster in (wire, tdc) plane
Definition at line 84 of file cluster.hh.
Referenced by clear_data(), set_start_vtx_err(), and SigmaStartPos().
std::vector<Double_t> larlight::cluster::fStartPos [private] |
start of cluster in (wire, tdc) plane
Definition at line 82 of file cluster.hh.
Referenced by clear_data(), set_start_vtx(), and StartPos().
Double_t larlight::cluster::fTotalCharge [private] |
total charge in cluster
Definition at line 77 of file cluster.hh.
Referenced by Charge(), clear_data(), and set_charge().
GEO::View_t larlight::cluster::fView [private] |
View associated w/ this cluster.
Definition at line 87 of file cluster.hh.
Referenced by clear_data(), set_view(), and View().