Class for neutrino interaction categories.
More...
#include <JNeutrinoInteractionCategory.hh>
Class for neutrino interaction categories.
Definition at line 134 of file JNeutrinoInteractionCategory.hh.
◆ JRange_t
◆ clone_type
◆ JNeutrinoInteractionCategory() [1/6]
| JAANET::JNeutrinoInteractionCategory::JNeutrinoInteractionCategory |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 143 of file JNeutrinoInteractionCategory.hh.
143 :
150 {}
static const JRange< double > DEFAULT_NEUTRINO_ENERGY_RANGE
Default neutrino energy range [GeV].
static const JRange< double > DEFAULT_NEUTRINO_COSINE_ZENITH_ANGLE_RANGE
Default neutrino cosine zenith angle range [-].
JParameter< int > interactionType
interaction type
JRange_t coszRange
cosine zenith range
JParameter< int > targetZ
target atomic number
JRange_t Erange
neutrino energy range
JParameter< int > targetA
target mass number
JParameter< int > scatteringType
scattering type
◆ JNeutrinoInteractionCategory() [2/6]
| JAANET::JNeutrinoInteractionCategory::JNeutrinoInteractionCategory |
( |
const int | neutrinoType | ) |
|
|
inline |
Constructor.
- Parameters
-
| neutrinoType | neutrino PDG type |
Definition at line 158 of file JNeutrinoInteractionCategory.hh.
158 :
165 {
166 this->primaryType = neutrinoType;
167
168 check_validity();
169 }
◆ JNeutrinoInteractionCategory() [3/6]
Constructor.
- Parameters
-
| neutrinoType | neutrino PDG type |
| Erange | neutrino energy range |
| coszRange | zenith-angle range |
Definition at line 179 of file JNeutrinoInteractionCategory.hh.
181 :
188 {
189 this->primaryType = neutrinoType;
190
191 check_validity();
192 }
◆ JNeutrinoInteractionCategory() [4/6]
Constructor.
- Parameters
-
| neutrinoType | neutrino PDG type |
| interactionType | interaction type |
| scatteringType | scattering type |
| targetZ | target atomic number |
| targetA | target mass number |
| Erange | neutrino energy range |
| coszRange | zenith-angle range |
Definition at line 206 of file JNeutrinoInteractionCategory.hh.
212 :
219 {
220 this->primaryType = neutrinoType;
221
222 check_validity();
223 }
◆ JNeutrinoInteractionCategory() [5/6]
| JAANET::JNeutrinoInteractionCategory::JNeutrinoInteractionCategory |
( |
const JHead & | header, |
|
|
const int | primaryType ) |
|
inline |
Constructor.
- Parameters
-
| header | MC header |
| primaryType | primary PDG type |
Definition at line 232 of file JNeutrinoInteractionCategory.hh.
233 :
235 {
238
240
243
244 if (primaryType == header.primary.type || i != header.flux.cend()) {
245 this->primaryType = primaryType;
246 } else {
247 THROW(
JValueOutOfRange,
"JNeutrinoInteractionCategory::JNeutrinoInteractionCategory(): Given header does not match with given primary type " << primaryType <<
".");
248 }
249
251
254 }
255
258
261
262 if (header.cut_nu.E.is_valid() &&
263 header.cut_nu.E !=
cut().E) {
265 }
266
267 if (header.cut_nu.cosT.is_valid() &&
268 header.cut_nu.cosT !=
cut().cosT) {
270 }
271 }
272
273 check_validity();
274 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Exception for accessing a value in a collection that is outside of its range.
Template definition of a multi-dimensional oscillation probability interpolation table.
std::pair< JParameter< int >, JParameter< int > > getTargetInfo(const JHead &header)
Auxiliary function to retrieve the target atomic number and mass number.
JInteractionTypeGENIE_t getInteractionType(const int intType)
Auxiliary function to convert interaction types.
JInteractionTypeGENIE_t
Enumeration of GENIE interaction types.
@ UNDEFINED
Unknown interaction type.
bool is_gseagen(const JHead &header)
Check for generator.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JNeutrinoInteractionCategory()
Default constructor.
General purpose class of phase space generation.
◆ JNeutrinoInteractionCategory() [6/6]
| JAANET::JNeutrinoInteractionCategory::JNeutrinoInteractionCategory |
( |
const JHead & | header | ) |
|
|
inline |
Constructor.
N.B.: In this method, the neutrino PDG type is taken from JAANET::JHead::primary::type.
- Parameters
-
Definition at line 284 of file JNeutrinoInteractionCategory.hh.
◆ is_valid()
| bool JAANET::JNeutrinoInteractionCategory::is_valid |
( |
| ) |
const |
|
inlinefinaloverride |
Check if neutrino interaction categories is valid.
- Returns
- true if neutrino interaction category is valid; else false
Definition at line 294 of file JNeutrinoInteractionCategory.hh.
295 {
297 return false;
298 }
299
303 return false;
304 }
305
311 return false;
312 }
313
315 return false;
316 }
317
320 return false;
321 }
322
324 }
const value_type getValue() const
Get value of parameter.
const bool isDefined() const
Get status of parameter.
@ DARK_MATTER_SCATTERING_TYPES_END
End of dark matter scattering types.
@ NEUTRINO_SCATTERING_TYPES_END
End of standard scattering types.
@ DARK_MATTER_SCATTERING_TYPES_START
Start of dark matter scattering types.
@ NEUTRINO_SCATTERING_TYPES_START
Start of standard scattering types.
@ INTERACTION_TYPES_END
End of interaction types.
@ INTERACTION_TYPES_START
Start of interaction types.
bool is_neutrino_primary(const int type)
Auxiliary function to check if given PDG code corresponds to a neutrino.
◆ match() [1/2]
| bool JAANET::JNeutrinoInteractionCategory::match |
( |
const JHead & | header | ) |
const |
|
inlinefinaloverride |
Check whether this event category matches with the given MC header.
- Parameters
-
- Returns
- true if matching; else false
Definition at line 333 of file JNeutrinoInteractionCategory.hh.
334 {
336
338
339 return (this->primaryType == cat.primaryType &&
340 this->interactionType == cat.interactionType &&
341 this->scatteringType == cat.scatteringType &&
342 this->targetZ == cat.targetZ &&
343 this->targetA == cat.targetA &&
344 this->Erange .overlap(cat.Erange) &&
345 this->coszRange .overlap(cat.coszRange));
346
347 } else {
348
349 return false;
350 }
351 }
◆ match() [2/2]
| bool JAANET::JNeutrinoInteractionCategory::match |
( |
const Evt & | event | ) |
const |
|
inlinefinaloverride |
Check whether given event matches with this event category.
- Parameters
-
- Returns
- true if matching; else false
Definition at line 360 of file JNeutrinoInteractionCategory.hh.
361 {
364
366
368
372 return false;
373 }
374
378 return false;
379 }
380
384 return false;
385 }
386
390 return false;
391 }
392
394 }
const Trk & get_primary(const Evt &evt)
Auxiliary function to retrieve the primary track of an event.
bool is_neutrino(const Trk &track)
Test whether given track is a neutrino.
std::vector< double > w2list
MC: factors that make up w[1]=w2 (see e.g. Tag list or km3net-dataformat/definitions)
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
static const int W2LIST_GSEAGEN_CC
Charged current interaction flag.
static const int W2LIST_GSEAGEN_TARGETZ
number of protons in the target
static const int W2LIST_GSEAGEN_TARGETA
number of nuclons in the target
static const int W2LIST_GSEAGEN_ICHAN
Interaction channel.
◆ less()
Less-than method.
Note: The energy and cosine zenith-angle ranges are compared based on the lower limit first.
If the lower limits are equal, the upper limits are compared.
- Parameters
-
- Returns
- true if first this event category less than given event category; else false
Definition at line 406 of file JNeutrinoInteractionCategory.hh.
407 {
408#define RETURN_IF_DIFFERENT(A, B) \
409 if (A != B) { return A < B; }
410
412
414
415 if (p == NULL) { return false; }
416
421
422 if (p->Erange != this->Erange) {
424 this->Erange.getUpperLimit() < p->Erange.getUpperLimit() :
425 this->
Erange.getLowerLimit() < p->
Erange.getLowerLimit());
426 } else {
428 this->coszRange.getUpperLimit() < p->coszRange.getUpperLimit() :
430 }
431#undef RETURN_IF_DIFFERENT
432 }
#define RETURN_IF_DIFFERENT(A, B)
◆ getProperties() [1/2]
Get properties of this class.
- Parameters
-
| eqpars | equation parameters |
Definition at line 440 of file JNeutrinoInteractionCategory.hh.
441 {
442 return JNeutrinoInteractionCategoryHelper(*this, eqpars);
443 }
◆ getProperties() [2/2]
Get properties of this class.
- Parameters
-
| eqpars | equation parameters |
Definition at line 451 of file JNeutrinoInteractionCategory.hh.
452 {
453 return JNeutrinoInteractionCategoryHelper(*this, eqpars);
454 }
◆ clone()
|
|
inlineoverridevirtualinherited |
Get clone of this object.
- Returns
- pointer to newly created object
Reimplemented in JLANG::JClonable< JMatch< hit_type > >, JLANG::JClonable< JMatch< hit_type >, JMatch1D >, JLANG::JClonable< JMatch< hit_type >, JMatch3D >, JLANG::JClonable< JMatch< JTRIGGER::JHitR1 > >, JLANG::JClonable< JMatch< JTRIGGER::JHitR1 >, JMatch3G< JTRIGGER::JHitR1 > >, JPHYSICS::JPDFTransformer_t< JArgument_t >, JPHYSICS::JPD0Transformer_t< JArgument_t >, JPHYSICS::JPDGTransformer_t< JArgument_t >, JPHYSICS::JPDFTransformer< 2, JArgument_t >, JPHYSICS::JPDFTransformer< 3, JArgument_t >, JPHYSICS::JPDFTransformer< 4, JArgument_t >, JPHYSICS::JPDFTransformer< 5, JArgument_t >, and JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer.
Definition at line 69 of file JClonable.hh.
70 {
71 return new JDerived_t(static_cast<const JDerived_t&>(*this));
72 }
◆ interactionType
| JParameter<int> JAANET::JNeutrinoInteractionCategory::interactionType |
|
private |
◆ scatteringType
| JParameter<int> JAANET::JNeutrinoInteractionCategory::scatteringType |
|
private |
◆ targetZ
◆ targetA
◆ Erange
| JRange_t JAANET::JNeutrinoInteractionCategory::Erange |
|
private |
◆ coszRange
| JRange_t JAANET::JNeutrinoInteractionCategory::coszRange |
|
private |
The documentation for this struct was generated from the following file: