LArSoft Hit class equivalent data container. More...
#include <hit.hh>
Public Member Functions | |
hit (DATA::DATA_TYPE type=DATA::Hit) | |
Default constructor. | |
hit (const hit &original) | |
Copy constructor. | |
virtual | ~hit () |
Default destructor. | |
void | clear_data () |
Clear method. | |
void | set_waveform (const std::vector< Double_t > &wf) |
void | set_times (Double_t start, Double_t peak, Double_t end) |
void | set_times_err (Double_t start, Double_t peak, Double_t end) |
void | set_charge (Double_t q, Double_t q_max) |
void | set_charge_err (Double_t q, Double_t q_max) |
void | set_multiplicity (Int_t m) |
void | set_channel (UInt_t ch) |
void | set_wire (UInt_t wire) |
void | set_fit_goodness (Double_t v) |
void | set_view (GEO::View_t v) |
void | set_sigtype (GEO::SigType_t t) |
const std::vector< Double_t > & | HitSignal () const |
Double_t | StartTime () const |
Double_t | EndTime () const |
Double_t | PeakTime () const |
Double_t | SigmaStartTime () const |
Double_t | SigmaEndTime () const |
Double_t | SigmaPeakTime () const |
Int_t | Multiplicity () const |
UInt_t | Channel () const |
UInt_t | Wire () const |
Double_t | Charge (bool max=false) const |
Double_t | SigmaCharge (bool max=false) const |
Double_t | GoodnessOfFit () const |
GEO::SigType_t | SignalType () const |
GEO::View_t | View () 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 | |
std::vector< Double_t > | fHitSignal |
vector of ADC values within the hit window | |
Double_t | fStartTime |
initial tdc tick for hit | |
Double_t | fSigmaStartTime |
uncertainty on initial tick | |
Double_t | fPeakTime |
tdc for the peak charge deposition | |
Double_t | fSigmaPeakTime |
uncertainty for tdc of the peak | |
Double_t | fEndTime |
final tdc tick for hit | |
Double_t | fSigmaEndTime |
uncertainty on final tick | |
Double_t | fCharge |
total charge deposited for hit | |
Double_t | fSigmaCharge |
uncertainty in total charge deposited | |
Double_t | fMaxCharge |
maximum ADC value in hit window | |
Double_t | fSigmaMaxCharge |
maximum ADC value in hit window | |
Int_t | fMultiplicity |
how many hits could this one be shared with | |
Double_t | fGoodnessOfFit |
how well do we believe we know this hit? | |
GEO::View_t | fView |
view for the plane of the hit | |
GEO::SigType_t | fSignalType |
signal type for the plane of the hit | |
UInt_t | fChannel |
channel number | |
UInt_t | fWire |
wire number | |
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 Hit class equivalent data container.
Definition at line 25 of file hit.hh.
larlight::hit::hit | ( | DATA::DATA_TYPE | type = DATA::Hit |
) |
Default constructor.
Definition at line 9 of file hit.cc.
References larlight::data_base::_type, larlight::DATA::APAHit, clear_data(), larlight::DATA::CrawlerHit, larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, larlight::DATA::FFTHit, larlight::DATA::GausHit, larlight::DATA::Hit, larlight::DATA::RFFHit, and larlight::Message::send().
00009 : data_base(type), 00010 fHitSignal() 00011 //################################################# 00012 { 00013 if( _type != DATA::Hit && 00014 _type != DATA::CrawlerHit && 00015 _type != DATA::GausHit && 00016 _type != DATA::APAHit && 00017 _type != DATA::FFTHit && 00018 _type != DATA::RFFHit ) { 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::Hit; 00024 } 00025 clear_data(); 00026 }
larlight::hit::hit | ( | const hit & | original | ) |
Copy constructor.
Definition at line 29 of file hit.cc.
00029 : data_base(original), 00030 fHitSignal(original.fHitSignal), 00031 fStartTime(original.fStartTime), 00032 fSigmaStartTime(original.fSigmaStartTime), 00033 fPeakTime(original.fPeakTime), 00034 fSigmaPeakTime(original.fSigmaPeakTime), 00035 fEndTime(original.fEndTime), 00036 fSigmaEndTime(original.fSigmaEndTime), 00037 fCharge(original.fCharge), 00038 fSigmaCharge(original.fSigmaCharge), 00039 fMaxCharge(original.fMaxCharge), 00040 fSigmaMaxCharge(original.fSigmaMaxCharge), 00041 fMultiplicity(original.fMultiplicity), 00042 fGoodnessOfFit(original.fGoodnessOfFit), 00043 fView(original.fView), 00044 fSignalType(original.fSignalType), 00045 fChannel(original.fChannel), 00046 fWire(original.fWire) 00047 //########################################################################## 00048 {};
virtual larlight::hit::~hit | ( | ) | [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 }
UInt_t larlight::hit::Channel | ( | ) | const [inline] |
Definition at line 66 of file hit.hh.
References fChannel.
Referenced by larutil::GeometryUtilities::GetPlaneAndTPC().
00066 { return fChannel; }
Double_t larlight::hit::Charge | ( | bool | max = false |
) | const [inline] |
Definition at line 68 of file hit.hh.
References fCharge, and fMaxCharge.
00068 { return ( max ? fMaxCharge : fCharge);}
void larlight::hit::clear_data | ( | ) | [virtual] |
Clear method.
Reimplemented from larlight::data_base.
Definition at line 51 of file hit.cc.
References fChannel, fCharge, fEndTime, fGoodnessOfFit, fHitSignal, fMaxCharge, fMultiplicity, fPeakTime, fSigmaCharge, fSigmaEndTime, fSigmaMaxCharge, fSigmaPeakTime, fSigmaStartTime, fSignalType, fStartTime, fView, fWire, larlight::GEO::kMysteryType, and larlight::GEO::kUnknown.
Referenced by hit().
00053 { 00054 data_base::clear_data(); 00055 fHitSignal.clear(); 00056 fStartTime = fPeakTime = fEndTime = -1; 00057 fSigmaStartTime = fSigmaPeakTime = fSigmaEndTime = -1; 00058 fCharge = fMaxCharge = -1; 00059 fSigmaCharge = fSigmaMaxCharge = -1; 00060 fMultiplicity = -1; 00061 fGoodnessOfFit = -1; 00062 fView = GEO::kUnknown; 00063 fSignalType = GEO::kMysteryType; 00064 fChannel = 0xffffffff; 00065 fWire = 0xffffffff; 00066 }
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::hit::EndTime | ( | ) | const [inline] |
Double_t larlight::hit::GoodnessOfFit | ( | ) | const [inline] |
const std::vector<Double_t>& larlight::hit::HitSignal | ( | ) | const [inline] |
Int_t larlight::hit::Multiplicity | ( | ) | const [inline] |
Double_t larlight::hit::PeakTime | ( | ) | const [inline] |
void larlight::hit::set_channel | ( | UInt_t | ch | ) | [inline] |
void larlight::hit::set_charge | ( | Double_t | q, | |
Double_t | q_max | |||
) | [inline] |
Definition at line 46 of file hit.hh.
References fCharge, and fMaxCharge.
00047 {fCharge=q; fMaxCharge = q_max;}
void larlight::hit::set_charge_err | ( | Double_t | q, | |
Double_t | q_max | |||
) | [inline] |
Definition at line 48 of file hit.hh.
References fSigmaCharge, and fSigmaMaxCharge.
00049 {fSigmaCharge=q; fSigmaMaxCharge=q_max;}
void larlight::hit::set_fit_goodness | ( | Double_t | v | ) | [inline] |
void larlight::hit::set_multiplicity | ( | Int_t | m | ) | [inline] |
void larlight::hit::set_sigtype | ( | GEO::SigType_t | t | ) | [inline] |
void larlight::hit::set_times | ( | Double_t | start, | |
Double_t | peak, | |||
Double_t | end | |||
) | [inline] |
Definition at line 42 of file hit.hh.
References fEndTime, fPeakTime, and fStartTime.
00043 {fStartTime = start; fPeakTime = peak; fEndTime = end;}
void larlight::hit::set_times_err | ( | Double_t | start, | |
Double_t | peak, | |||
Double_t | end | |||
) | [inline] |
Definition at line 44 of file hit.hh.
References fSigmaEndTime, fSigmaPeakTime, and fSigmaStartTime.
00045 {fSigmaStartTime = start; fSigmaPeakTime = peak; fSigmaEndTime = end;}
void larlight::hit::set_view | ( | GEO::View_t | v | ) | [inline] |
void larlight::hit::set_waveform | ( | const std::vector< Double_t > & | wf | ) | [inline] |
void larlight::hit::set_wire | ( | UInt_t | wire | ) | [inline] |
Double_t larlight::hit::SigmaCharge | ( | bool | max = false |
) | const [inline] |
Definition at line 69 of file hit.hh.
References fSigmaCharge, and fSigmaMaxCharge.
00069 { return ( max ? fSigmaMaxCharge : fSigmaCharge ); }
Double_t larlight::hit::SigmaEndTime | ( | ) | const [inline] |
Double_t larlight::hit::SigmaPeakTime | ( | ) | const [inline] |
Double_t larlight::hit::SigmaStartTime | ( | ) | const [inline] |
GEO::SigType_t larlight::hit::SignalType | ( | ) | 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::hit::StartTime | ( | ) | const [inline] |
GEO::View_t larlight::hit::View | ( | ) | const [inline] |
UInt_t larlight::hit::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(), 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(), 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().
UInt_t larlight::hit::fChannel [protected] |
channel number
Definition at line 91 of file hit.hh.
Referenced by Channel(), clear_data(), and set_channel().
Double_t larlight::hit::fCharge [protected] |
total charge deposited for hit
Definition at line 83 of file hit.hh.
Referenced by Charge(), clear_data(), and set_charge().
Double_t larlight::hit::fEndTime [protected] |
final tdc tick for hit
Definition at line 81 of file hit.hh.
Referenced by clear_data(), EndTime(), and set_times().
Double_t larlight::hit::fGoodnessOfFit [protected] |
how well do we believe we know this hit?
Definition at line 88 of file hit.hh.
Referenced by clear_data(), GoodnessOfFit(), and set_fit_goodness().
std::vector<Double_t> larlight::hit::fHitSignal [protected] |
vector of ADC values within the hit window
Definition at line 76 of file hit.hh.
Referenced by clear_data(), HitSignal(), and set_waveform().
Double_t larlight::hit::fMaxCharge [protected] |
maximum ADC value in hit window
Definition at line 85 of file hit.hh.
Referenced by Charge(), clear_data(), and set_charge().
Int_t larlight::hit::fMultiplicity [protected] |
how many hits could this one be shared with
Definition at line 87 of file hit.hh.
Referenced by clear_data(), Multiplicity(), and set_multiplicity().
Double_t larlight::hit::fPeakTime [protected] |
tdc for the peak charge deposition
Definition at line 79 of file hit.hh.
Referenced by clear_data(), PeakTime(), and set_times().
Double_t larlight::hit::fSigmaCharge [protected] |
uncertainty in total charge deposited
Definition at line 84 of file hit.hh.
Referenced by clear_data(), set_charge_err(), and SigmaCharge().
Double_t larlight::hit::fSigmaEndTime [protected] |
uncertainty on final tick
Definition at line 82 of file hit.hh.
Referenced by clear_data(), set_times_err(), and SigmaEndTime().
Double_t larlight::hit::fSigmaMaxCharge [protected] |
maximum ADC value in hit window
Definition at line 86 of file hit.hh.
Referenced by clear_data(), set_charge_err(), and SigmaCharge().
Double_t larlight::hit::fSigmaPeakTime [protected] |
uncertainty for tdc of the peak
Definition at line 80 of file hit.hh.
Referenced by clear_data(), set_times_err(), and SigmaPeakTime().
Double_t larlight::hit::fSigmaStartTime [protected] |
uncertainty on initial tick
Definition at line 78 of file hit.hh.
Referenced by clear_data(), set_times_err(), and SigmaStartTime().
GEO::SigType_t larlight::hit::fSignalType [protected] |
signal type for the plane of the hit
Definition at line 90 of file hit.hh.
Referenced by clear_data(), set_sigtype(), and SignalType().
Double_t larlight::hit::fStartTime [protected] |
initial tdc tick for hit
Definition at line 77 of file hit.hh.
Referenced by clear_data(), set_times(), and StartTime().
GEO::View_t larlight::hit::fView [protected] |
view for the plane of the hit
Definition at line 89 of file hit.hh.
Referenced by clear_data(), set_view(), and View().
UInt_t larlight::hit::fWire [protected] |
wire number
Definition at line 92 of file hit.hh.
Referenced by clear_data(), set_wire(), and Wire().