LArSoft Shower class equivalent data container. More...
#include <shower.hh>
Public Member Functions | |
shower (DATA::DATA_TYPE type=DATA::Shower) | |
Default constructor. | |
shower (const shower &original) | |
Copy constructor. | |
virtual | ~shower () |
Default destructor. | |
virtual void | clear_data () |
Clear method. | |
void | set_id (Int_t id) |
void | set_total_charge (Double_t q) |
void | set_direction (TVector3 dir) |
void | set_direction_err (TVector3 dir_e) |
void | set_max_width (Double_t x, Double_t y) |
void | set_distance_max_width (Double_t d) |
Double_t | TotalCharge () const |
Int_t | ID () const |
Double_t | MaxWidthX () const |
Double_t | MaxWidthY () const |
Double_t | DistanceMaxWidth () const |
const TVector3 & | Direction () const |
const TVector3 & | DirectionErr () 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 | |
Int_t | fID |
TVector3 | fDCosStart |
direction cosines at start of shower | |
TVector3 | fSigmaDCosStart |
uncertainting on initial direction cosines | |
Double_t | fMaxWidthX |
maximum width of the prong in the x(0) | |
Double_t | fMaxWidthY |
maximum width of the prong in the y(0) | |
Double_t | fDistanceMaxWidth |
distance from the start of the prong to its maximum width | |
Double_t | fTotalCharge |
total charge of hits in the shower | |
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 Shower class equivalent data container.
Definition at line 26 of file shower.hh.
larlight::shower::shower | ( | DATA::DATA_TYPE | type = DATA::Shower |
) |
Default constructor.
Definition at line 9 of file shower.cc.
References larlight::data_base::_type, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, larlight::Message::send(), and larlight::DATA::Shower.
00009 : data_base(type) 00010 //**************************************************** 00011 { 00012 if(_type!=DATA::Shower) { 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::Shower; 00018 } 00019 clear_data(); 00020 }
larlight::shower::shower | ( | const shower & | original | ) | [inline] |
Copy constructor.
Definition at line 34 of file shower.hh.
00034 : data_base(original), 00035 fID(original.fID), 00036 fDCosStart(original.fDCosStart), 00037 fSigmaDCosStart(original.fSigmaDCosStart), 00038 fMaxWidthX(original.fMaxWidthX), 00039 fMaxWidthY(original.fMaxWidthY), 00040 fDistanceMaxWidth(original.fDistanceMaxWidth), 00041 fTotalCharge(original.fTotalCharge) 00042 {}
virtual larlight::shower::~shower | ( | ) | [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::shower::clear_data | ( | ) | [virtual] |
Clear method.
Reimplemented from larlight::data_base.
Definition at line 23 of file shower.cc.
References fDCosStart, fDistanceMaxWidth, fID, fMaxWidthX, fMaxWidthY, fSigmaDCosStart, and fTotalCharge.
Referenced by shower().
00025 { 00026 data_base::clear_data(); 00027 00028 fID = -1; 00029 fDCosStart[0] = fDCosStart[1] = fDCosStart[2] = -1; 00030 fSigmaDCosStart[0] = fSigmaDCosStart[1] = fSigmaDCosStart[2] = -1; 00031 fMaxWidthX = fMaxWidthY = -1; 00032 fDistanceMaxWidth=-1; 00033 fTotalCharge=-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 TVector3& larlight::shower::Direction | ( | ) | const [inline] |
const TVector3& larlight::shower::DirectionErr | ( | ) | const [inline] |
Definition at line 65 of file shower.hh.
References fSigmaDCosStart.
00065 { return fSigmaDCosStart; }
Double_t larlight::shower::DistanceMaxWidth | ( | ) | const [inline] |
Definition at line 63 of file shower.hh.
References fDistanceMaxWidth.
00063 { return fDistanceMaxWidth; }
Int_t larlight::shower::ID | ( | ) | const [inline] |
Double_t larlight::shower::MaxWidthX | ( | ) | const [inline] |
Double_t larlight::shower::MaxWidthY | ( | ) | const [inline] |
void larlight::shower::set_direction | ( | TVector3 | dir | ) | [inline] |
void larlight::shower::set_direction_err | ( | TVector3 | dir_e | ) | [inline] |
Definition at line 53 of file shower.hh.
References fSigmaDCosStart.
00053 { fSigmaDCosStart = dir_e; }
void larlight::shower::set_distance_max_width | ( | Double_t | d | ) | [inline] |
Definition at line 56 of file shower.hh.
References fDistanceMaxWidth.
00056 { fDistanceMaxWidth = d; }
void larlight::shower::set_id | ( | Int_t | id | ) | [inline] |
void larlight::shower::set_max_width | ( | Double_t | x, | |
Double_t | y | |||
) | [inline] |
Definition at line 54 of file shower.hh.
References fMaxWidthX, and fMaxWidthY.
00055 { fMaxWidthX=x; fMaxWidthY=y; }
void larlight::shower::set_total_charge | ( | Double_t | q | ) | [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::shower::TotalCharge | ( | ) | 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(), 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().
TVector3 larlight::shower::fDCosStart [protected] |
direction cosines at start of shower
Definition at line 70 of file shower.hh.
Referenced by clear_data(), Direction(), and set_direction().
Double_t larlight::shower::fDistanceMaxWidth [protected] |
distance from the start of the prong to its maximum width
Definition at line 74 of file shower.hh.
Referenced by clear_data(), DistanceMaxWidth(), and set_distance_max_width().
Int_t larlight::shower::fID [protected] |
Definition at line 69 of file shower.hh.
Referenced by clear_data(), ID(), and set_id().
Double_t larlight::shower::fMaxWidthX [protected] |
maximum width of the prong in the x(0)
Definition at line 72 of file shower.hh.
Referenced by clear_data(), MaxWidthX(), and set_max_width().
Double_t larlight::shower::fMaxWidthY [protected] |
maximum width of the prong in the y(0)
Definition at line 73 of file shower.hh.
Referenced by clear_data(), MaxWidthY(), and set_max_width().
TVector3 larlight::shower::fSigmaDCosStart [protected] |
uncertainting on initial direction cosines
Definition at line 71 of file shower.hh.
Referenced by clear_data(), DirectionErr(), and set_direction_err().
Double_t larlight::shower::fTotalCharge [protected] |
total charge of hits in the shower
Definition at line 75 of file shower.hh.
Referenced by clear_data(), set_total_charge(), and TotalCharge().