Simplified version of MCParticle data container. More...
#include <mcnu.hh>
Public Member Functions | |
mcnu (DATA::DATA_TYPE type=DATA::MCNeutrino) | |
Default constructor. | |
mcnu (mcpart &nu, mcpart &lep, Int_t CCNC, Int_t mode, Int_t interactionType, Int_t target, Int_t nucleon, Int_t quark, Double_t w, Double_t x, Double_t y, Double_t qsqr) | |
Alternative constructor. | |
virtual | ~mcnu () |
Default destructor. | |
mcnu (const mcnu &origin) | |
Copy constructor. | |
virtual void | clear_data () |
Clear method. | |
const mcpart & | Nu () const |
--- Getters ---/// | |
const mcpart & | Lepton () const |
Int_t | CCNC () const |
Int_t | Mode () const |
Int_t | InteractionType () const |
Int_t | Target () const |
Int_t | HitNuc () const |
Int_t | HitQuark () const |
Double_t | W () const |
Double_t | X () const |
Double_t | Y () const |
Double_t | QSqr () 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 | |
mcpart | fNu |
the incoming neutrino | |
mcpart | fLepton |
the outgoing lepton | |
Int_t | fMode |
Interaction mode (QE/1-pi/DIS...) see enum list. | |
Int_t | fInteractionType |
More detailed interaction type, see enum list below kNuanceOffset. | |
Int_t | fCCNC |
CC or NC interaction? see enum list. | |
Int_t | fTarget |
Nuclear target, as PDG code. | |
Int_t | fHitNuc |
Hit nucleon (2212 (proton) or 2112 (neutron)). | |
Int_t | fHitQuark |
For DIS events only, as PDG code. | |
Double_t | fW |
Hadronic invariant mass, in GeV. | |
Double_t | fX |
Bjorken x=Q^2/(2M*(E_neutrino-E_lepton)), unitless. | |
Double_t | fY |
Inelasticity y=1-(E_lepton/E_neutrino), unitless. | |
Double_t | fQSqr |
Momentum transfer Q^2, in GeV^2. |
Simplified version of MCParticle data container.
Definition at line 25 of file mcnu.hh.
larlight::mcnu::mcnu | ( | DATA::DATA_TYPE | type = DATA::MCNeutrino |
) |
Default constructor.
Definition at line 9 of file mcnu.cc.
References larlight::data_base::_type, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, larlight::DATA::MCNeutrino, and larlight::Message::send().
00009 : data_base(type), 00010 fNu(DATA::MCParticle), 00011 fLepton(DATA::MCParticle) 00012 //*********************************************************** 00013 { 00014 if(_type!=DATA::MCNeutrino) { 00015 00016 Message::send(MSG::ERROR,__FUNCTION__, 00017 Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str())); 00018 00019 _type=DATA::MCNeutrino; 00020 } 00021 00022 clear_data(); 00023 }
larlight::mcnu::mcnu | ( | mcpart & | nu, | |
mcpart & | lep, | |||
Int_t | CCNC, | |||
Int_t | mode, | |||
Int_t | interactionType, | |||
Int_t | target, | |||
Int_t | nucleon, | |||
Int_t | quark, | |||
Double_t | w, | |||
Double_t | x, | |||
Double_t | y, | |||
Double_t | qsqr | |||
) |
Alternative constructor.
Definition at line 26 of file mcnu.cc.
00030 : data_base(DATA::MCNeutrino), 00031 fNu(nu), 00032 fLepton(lep), 00033 fMode(mode), 00034 fInteractionType(interactionType), 00035 fCCNC(CCNC), 00036 fTarget(target), 00037 fHitNuc(nucleon), 00038 fHitQuark(quark), 00039 fW(w), 00040 fX(x), 00041 fY(y), 00042 fQSqr(qsqr) 00043 //*********************************************************** 00044 {}
virtual larlight::mcnu::~mcnu | ( | ) | [inline, virtual] |
larlight::mcnu::mcnu | ( | const mcnu & | origin | ) | [inline] |
Copy constructor.
Definition at line 50 of file mcnu.hh.
00050 : data_base(origin), 00051 fNu(origin.fNu), 00052 fLepton(origin.fLepton), 00053 fMode(origin.fMode), 00054 fInteractionType(origin.fInteractionType), 00055 fCCNC(origin.fCCNC), 00056 fTarget(origin.fTarget), 00057 fHitNuc(origin.fHitNuc), 00058 fHitQuark(origin.fHitQuark), 00059 fW(origin.fW), 00060 fX(origin.fX), 00061 fY(origin.fY), 00062 fQSqr(origin.fQSqr) 00063 {}
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 }
Int_t larlight::mcnu::CCNC | ( | ) | const [inline] |
void larlight::mcnu::clear_data | ( | ) | [virtual] |
Clear method.
Reimplemented from larlight::data_base.
Definition at line 47 of file mcnu.cc.
References larlight::mcpart::clear_data(), fCCNC, fHitNuc, fHitQuark, fInteractionType, fLepton, fMode, fNu, fQSqr, fTarget, fW, fX, fY, larlight::DATA::INVALID_DOUBLE, and larlight::DATA::INVALID_INT.
Referenced by larlight::mctruth::clear_data(), and mcnu().
00049 { 00050 data_base::clear_data(); 00051 fNu.clear_data(); 00052 fLepton.clear_data(); 00053 00054 fMode = DATA::INVALID_INT; 00055 fInteractionType = DATA::INVALID_INT; 00056 fCCNC = DATA::INVALID_INT; 00057 fTarget = DATA::INVALID_INT; 00058 fHitNuc = DATA::INVALID_INT; 00059 fHitQuark = DATA::INVALID_INT; 00060 fW = DATA::INVALID_DOUBLE; 00061 fX = DATA::INVALID_DOUBLE; 00062 fY = DATA::INVALID_DOUBLE; 00063 fQSqr = DATA::INVALID_DOUBLE; 00064 }
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; }
Int_t larlight::mcnu::HitNuc | ( | ) | const [inline] |
Int_t larlight::mcnu::HitQuark | ( | ) | const [inline] |
Int_t larlight::mcnu::InteractionType | ( | ) | const [inline] |
Definition at line 73 of file mcnu.hh.
References fInteractionType.
00073 { return fInteractionType; }
const mcpart& larlight::mcnu::Lepton | ( | ) | const [inline] |
Int_t larlight::mcnu::Mode | ( | ) | const [inline] |
const mcpart& larlight::mcnu::Nu | ( | ) | const [inline] |
Double_t larlight::mcnu::QSqr | ( | ) | 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().
Int_t larlight::mcnu::Target | ( | ) | const [inline] |
Double_t larlight::mcnu::W | ( | ) | const [inline] |
Double_t larlight::mcnu::X | ( | ) | const [inline] |
Double_t larlight::mcnu::Y | ( | ) | 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(), 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().
Int_t larlight::mcnu::fCCNC [private] |
CC or NC interaction? see enum list.
Definition at line 88 of file mcnu.hh.
Referenced by CCNC(), and clear_data().
Int_t larlight::mcnu::fHitNuc [private] |
Hit nucleon (2212 (proton) or 2112 (neutron)).
Definition at line 90 of file mcnu.hh.
Referenced by clear_data(), and HitNuc().
Int_t larlight::mcnu::fHitQuark [private] |
For DIS events only, as PDG code.
Definition at line 91 of file mcnu.hh.
Referenced by clear_data(), and HitQuark().
Int_t larlight::mcnu::fInteractionType [private] |
More detailed interaction type, see enum list below kNuanceOffset.
Definition at line 87 of file mcnu.hh.
Referenced by clear_data(), and InteractionType().
mcpart larlight::mcnu::fLepton [private] |
the outgoing lepton
Definition at line 85 of file mcnu.hh.
Referenced by clear_data(), and Lepton().
Int_t larlight::mcnu::fMode [private] |
Interaction mode (QE/1-pi/DIS...) see enum list.
Definition at line 86 of file mcnu.hh.
Referenced by clear_data(), and Mode().
mcpart larlight::mcnu::fNu [private] |
Double_t larlight::mcnu::fQSqr [private] |
Momentum transfer Q^2, in GeV^2.
Definition at line 95 of file mcnu.hh.
Referenced by clear_data(), and QSqr().
Int_t larlight::mcnu::fTarget [private] |
Nuclear target, as PDG code.
Definition at line 89 of file mcnu.hh.
Referenced by clear_data(), and Target().
Double_t larlight::mcnu::fW [private] |
Hadronic invariant mass, in GeV.
Definition at line 92 of file mcnu.hh.
Referenced by clear_data(), and W().
Double_t larlight::mcnu::fX [private] |
Bjorken x=Q^2/(2M*(E_neutrino-E_lepton)), unitless.
Definition at line 93 of file mcnu.hh.
Referenced by clear_data(), and X().
Double_t larlight::mcnu::fY [private] |
Inelasticity y=1-(E_lepton/E_neutrino), unitless.
Definition at line 94 of file mcnu.hh.
Referenced by clear_data(), and Y().