1 #ifndef __JAANET__JHEAD__
2 #define __JAANET__JHEAD__
24 namespace JPP {
using namespace JAANET; }
61 inline std::string
getTag(
const std::string& tag)
67 if (pos != string::npos) {
69 for (string::size_type i = pos + 1; i != tag.size(); ++i) {
70 if (!isdigit(tag[i])) {
75 return tag.substr(0, pos);
118 return buffer ==
object.buffer;
201 return cosTmax <
object.cosTmin;
203 return Emax <
object.Emin;
293 return program ==
object.program;
476 const double z = 0.0)
481 volume *= factor * factor * factor;
530 return (
x ==
object.
x &&
704 return (
z ==
object.
z);
792 return type <
object.type;
847 static const std::string
KM3;
883 return static_cast<const JHead&
>(*this);
894 return static_cast<JHead&
>(*this);
905 static_cast<JHead&
>(*this) = header;
920 return (this->
pull(pd) != this->end());
972 if (p != this->end()) {
991 inline bool match(
const JHead& header,
const bool option =
true)
const
1037 if (
match(header)) {
1063 const JHead& second)
1065 return first.
match(second);
1077 const JHead& second)
1079 return first.
less(second);
1144 std::istream&
read(std::istream&
in);
1153 std::ostream&
write(std::ostream& out)
const;
1162 std::ostream&
print(std::ostream& out)
const;
1179 return first.match(second);
1194 if (!first.empty() && !second.empty()) {
1200 if (
match(*ix, *iy)) {
1206 return ns == first.size() || ns == second.size();
1210 return first.empty() && second.empty();
1228 const JHead& second,
1232 if (option || second.
pull(pd) != second.end())
1233 return match(first.*pd, second.*pd);
1280 return header.
read(in);
1293 return header.
write(out);
norma & add(const norma &object)
Addition.
bool match(const cut &object) const
Test match.
JAANET::genhencut genhencut
Phase space of incident neutrino.
static const std::string GSEAGEN
livetime & mul(const double factor)
Scale.
static const std::string KM3
genvol & mul(const double factor, const double z=0.0)
Scale.
double volume
Volume [m^3].
seabottom()
Default constructor.
livetime & add(const livetime &object)
Addition.
friend bool operator<(const JHead &first, const JHead &second)
Less than operator.
void setHeader(const JHead &header)
Set header.
const JHead & getHeader() const
Get header.
Phase space of incoming particle.
Generator for simulation.
bool operator<(const Head &first, const Head &second)
Less than operator.
double alpha
Energy spectrum: .
const TDataMember * getDataMember(const JRootClass &parent, const JRootClass &member)
Get ROOT data member for given parent and member class.
Phase space for incident neutrino.
double numberOfEvents
Number of events.
std::string program
program name
Neutrino cross section file.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
static const std::string KM3SIM
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
livetime()
Default constructor.
Normlisation of CORSIKA events.
JAANET::cut_primary cut_primary
double errorOfSeconds
Uncertainty on live time [s].
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
std::vector< JAANET::physics > physics
Simple data structure to support I/O of equations (see class JLANG::JEquation).
bool match(const generator &object) const
Test match.
double Emax
Maximal energy [GeV].
static void setEquationParameters(const JLANG::JEquationParameters &equation)
Set equation parameters.
ClassDefNV(coord_origin, 1)
std::vector< JAANET::simul > simul
double livetime_s
Live time [s].
JHead & add(const JHead &header)
Addition of headers.
genhencut()
Default constructor.
General purpose class of phase space generation.
bool match(const spectrum &object) const
Test match.
DAQ & add(const DAQ &object)
Addition.
bool match(const can &object) const
Test match.
ClassDefNV(cut_primary, 1)
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Generator for neutrino interaction.
ClassDefNV(cut_seamuon, 1)
Description of Monte Carlo event generation applications.
double ycenter
y-center [m]
genvol & add(const genvol &object)
Addition.
static bool match(const JHead &first, const JHead &second, const bool option, T JHead::*pd)
Test match of given data member of headers.
spectrum()
Default constructor.
JAANET::end_event end_event
bool less(const JHead &header) const
Comparison of headers.
JAANET::fixedcan fixedcan
std::string buffer
General purpose name.
double xcenter
x-center [m]
bool operator==(Packet const &p, ID const &id)
The Vec class is a straightforward 3-d vector, which also works in pyroot.
void push(T JHead::*pd)
Push given data member to Head.
bool match(const fixedcan &object) const
Test match.
JAANET::cut_seamuon cut_seamuon
generator()
Default constructor.
double numberOfPrimaries
Number of primaries.
JAANET::livetime livetime
static JLANG::JEquationParameters & getEquationParameters()
Get equation parameters corresponding to Monte Carlo ASCII format, i.e:
JHead()
Default constructor.
flux()
Default constructor.
static const std::string MUPAGE
std::istream & read(std::istream &in)
Read header from input.
bool less(const primary &object) const
Comparison.
void erase(T JHead::*pd)
Remove given data member from Head.
JAANET::seabottom seabottom
cut()
Default constructor.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
static const std::string GENIE
JAANET::start_run start_run
friend bool operator==(const JHead &first, const JHead &second)
Equal operator.
std::ostream & print(std::ostream &out) const
Print header to output.
std::string version
program version
Scaling time of neutrino interaction generators.
JAANET::spectrum spectrum
std::string file_2
File name.
bool match(const norma &object) const
Test match.
static const std::string JSIRENE
DAQ()
Default constructor.
ClassDefNV(muon_desc_file, 1)
bool match(const livetime &object) const
Test match.
genvol()
Default constructor.
double Emin
Minimal energy [GeV].
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
can()
Default constructor.
static bool match(const std::vector< T > &first, const std::vector< T > &second)
Test one container is subset of other container or vice versa.
JAANET::muon_desc_file muon_desc_file
norma()
Default constructor.
virtual ~JHead()
Virtual destructor.
bool match(const coord_origin &object) const
Test match.
coord_origin(const double x, const double y, const double z)
Constructor.
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
bool match(const genvol &object) const
Test match.
Normalisation of MUPAGE events.
bool match(const seabottom &object) const
Test match.
iterator pull(T JHead::*pd)
Pull given data member from Head.
std::string date
processing date
primary()
Default constructor.
JHead & getHeader()
Get header.
bool less(const cut &object) const
Comparison.
General purpose string class.
start_run()
Default constructor.
double primaryFlux
Primary flux.
double cosTmax
Maximal cosine zenith angle.
bool match(const DAQ &object) const
Test match.
void copy(const Head &from, JHead &to)
Copy header from from to to.
fixedcan()
Default constructor.
The fixe cylinder used for photon tracking.
static bool match(const T &first, const T &second)
Test match.
static const std::string GENHEN
Generators.
end_event()
Default constructor.
Phase space of atmospheric muon generation.
JAANET::detector detector
double numberOfSeconds
Time in seconds.
std::string time
processing time
tgen()
Default constructor.
Phase space of primary particle.
JAANET::coord_origin coord_origin
static const char AANET_TAG_SEPARATOR
Separator for AAnet tag extension for multiple tags ("_<counter>").
bool is_valid(T JHead::*pd) const
Check validity of given data member in Head.
JAANET::XSecFile XSecFile
bool match(const JHead &header, const bool option=true) const
Test match of headers.
double Emin
Minimal energy [GeV].
double numberOfSeconds
Live time [s].
bool match(const primary &object) const
Test match.
double cosTmin
Minimal cosine zenith angle.
Vec coord_origin() const
Get coordinate origin.
JHead(const Head &header)
Copy constructor.
bool match(const String &object) const
Test match.
Neutrino energy spectrum.
std::ostream & write(std::ostream &out) const
Write header to output.
String()
Default constructor.
const_iterator pull(T JHead::*pd) const
Pull given data member from Head.
The cylinder used for photon tracking.
std::string file_1
File name.
coord_origin()
Default constructor.