Jpp
19.1.0
the software that should make you happy
|
Monte Carlo detector (i.e. ".det" file). More...
#include <JMonteCarloDetector.hh>
Classes | |
class | LCM_logic |
Auxiliary class for LCM logic parameters. More... | |
class | LCM_reverse_logic |
Auxiliary class for LCM logic parameters. More... | |
class | OM |
Auxiliary class for OM. More... | |
class | OM_cluster |
Auxiliary class for OM cluster parameters. More... | |
class | OM_cluster_data |
Auxiliary class for OM cluster data. More... | |
class | OM_position |
Auxiliary class for OM position. More... | |
class | String |
Auxiliary class for string parameters. More... | |
Public Types | |
enum | start_of_comment_type { OLD_START_OF_COMMENT , NEW_START_OF_COMMENT } |
Enumeration for different lengths of start of comment in binary I/O. More... | |
enum | JVersion_t { V1 = 1 , V2 = 2 , V3 = 3 , V4 = 4 , V5 = 5 } |
Enumeration of version types. More... | |
typedef std::pair< T, T > | pair_type |
typedef JRange< T, JComparator_t > | range_type |
typedef JLANG::JClass< T >::argument_type | argument_type |
typedef T | key_type |
typedef T | mapped_type |
Public Member Functions | |
JMonteCarloDetector () | |
Default constructor. More... | |
JMonteCarloDetector (const bool useLogic) | |
Constructor. More... | |
void | setUseLogic (const bool useLogic) |
Set usage of logic. More... | |
void | setVersion (const JVersion &version) |
Set version. More... | |
bool | setVersion (const JDetectorVersion::JVersion_t &version, const bool force=false) |
Set version. More... | |
void | setVersion (const std::string &version) |
Set version. More... | |
bool | setToLatestVersion () |
Set to latest version. More... | |
void | setModuleStatus (const int bit) |
Set status of all modules. More... | |
void | resetModuleStatus (const int bit) |
Reset status of all modules. More... | |
void | setPMTStatus (const int bit) |
Set status of all PMTs. More... | |
void | resetPMTStatus (const int bit) |
Reset status of all PMTs. More... | |
JDetector & | operator+= (const JVector3D &pos) |
Move detector elements. More... | |
JDetector & | operator-= (const JVector3D &pos) |
Move detector elements. More... | |
const JModule & | getModule (const JModuleAddress &address) const |
Get module parameters. More... | |
JModule & | getModule (const JModuleAddress &address) |
Get module parameters. More... | |
const JModule & | getModule (const JLocation &location) const |
Get module parameters. More... | |
JModule & | getModule (const JLocation &location) |
Get module parameters. More... | |
bool | hasModule (const JLocation &location) const |
Check availability of module parameters. More... | |
const JPMT & | getPMT (const JPMTAddress &address) const |
Get PMT parameters. More... | |
JPMT & | getPMT (const JPMTAddress &address) |
Get PMT parameters. More... | |
virtual JReader & | read (JReader &in) override |
Read from input. More... | |
virtual JWriter & | write (JWriter &out) const override |
Write to output. More... | |
int | getID () const |
Get identifier. More... | |
int & | getID () |
Get identifier. More... | |
void | setID (const int id) |
Set identifier. More... | |
bool | less (const JObjectID &object) const |
Less than method. More... | |
bool | less (const int id) const |
Less than method. More... | |
bool | less (const JVersion &version) const |
Less-than method. More... | |
bool | more (const int id) const |
More than method. More... | |
bool | hasVersion () const |
Check validity of version. More... | |
const std::string & | getVersion () const |
Get version. More... | |
const JDetectorHeader & | getDetectorHeader () const |
Get detector header. More... | |
bool | equals (const JDetectorHeader &header, const double precision=std::numeric_limits< double >::min()) const |
Check equality. More... | |
bool | equals (const range_type &range) const |
Equal method. More... | |
bool | equals (const JUTMGrid &grid) const |
Check equality. More... | |
JProperties | getProperties (const JEquationParameters &equation=JDetectorHeader::getEquationParameters()) |
Get properties of this class. More... | |
JProperties | getProperties (const JEquationParameters &equation=JDetectorHeader::getEquationParameters()) const |
Get properties of this class. More... | |
const JUTCTimeRange & | getUTCTimeRange () const |
Get UTC time range. More... | |
JUTCTimeRange & | getUTCTimeRange () |
Get UTC time range. More... | |
void | setUTCTimeRange (const JRange< double > &timerange) |
Set UTC time range. More... | |
operator pair_type () const | |
Type conversion operator. More... | |
const range_type & | getRange () const |
Get range. More... | |
void | setRange (const range_type &range) |
Set range. More... | |
void | setRange (argument_type x, argument_type y) |
Set lower and upper limit. More... | |
template<class R > | |
void | setRange (R first, R second) |
Set range. More... | |
template<class JElement_t , class JAllocator_t > | |
void | setRange (const array_type< JElement_t, JAllocator_t > &buffer) |
Set lower and upper limit according to input data. More... | |
T | getLowerLimit () const |
Get lower limit. More... | |
T | getUpperLimit () const |
Get upper limit. More... | |
void | setLowerLimit (argument_type x) |
Set lower limit. More... | |
void | setUpperLimit (argument_type y) |
Set upper limit. More... | |
void | fixLowerLimit (argument_type x) |
Fix lower limit. More... | |
void | fixUpperLimit (argument_type y) |
Fix upper limit. More... | |
T | getLength () const |
Get length (difference between upper and lower limit). More... | |
void | setLength (argument_type length) |
Set length (difference between upper and lower limit). More... | |
bool | is_valid () const |
Check validity of range. More... | |
bool | in_range (argument_type x) const |
Test whether value is inside range. More... | |
bool | operator() (argument_type x) const |
Test whether value is inside range. More... | |
T | constrain (argument_type x) const |
Constrain value to range. More... | |
T | mod (argument_type x) const |
Modulo value with respect to range. More... | |
bool | overlap (const range_type &range) const |
Test overlap with given range. More... | |
range_type & | include (argument_type x) |
Include given value to range. More... | |
range_type & | join (const range_type &range) |
Join ranges. More... | |
range_type & | combine (const range_type &range) |
Combine ranges. More... | |
range_type & | add (argument_type x) |
Add offset. More... | |
range_type & | add (const range_type &range) |
Add offsets. More... | |
JUTMPosition & | add (const JUTMPosition &pos) |
Add UTM position. More... | |
range_type & | sub (argument_type x) |
Subtract offset. More... | |
range_type & | sub (const range_type &range) |
Subtract offsets. More... | |
JUTMPosition & | sub (const JUTMPosition &pos) |
Subtract UTM position. More... | |
range_type & | mul (const double factor) |
Multiply range. More... | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. More... | |
JUTMPosition & | mul (const double factor) |
Scale UTM position. More... | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. More... | |
range_type & | div (const double factor) |
Divide range. More... | |
JUTMPosition & | div (const double factor) |
Scale UTM position. More... | |
const key_type & | getKey () const |
const std::string & | getKey () const |
Get key. More... | |
const mapped_type & | getValue () const |
mapped_type & | getValue () |
const JUTMGrid & | getUTMGrid () const |
Get UTM grid. More... | |
void | setUTMGrid (const JUTMGrid &grid) |
Set UTM grid. More... | |
const std::string & | getWGS () const |
Get WGS. More... | |
const std::string & | getUTMZone () const |
Get UTM zone. More... | |
int | getUTMValue () const |
Get UTM zone by numerical value. More... | |
std::string | toString () const |
Convert UTM grid. More... | |
const JUTMPosition & | getUTMPosition () const |
Get UTM position. More... | |
void | setUTMPosition (const JUTMPosition &position) |
Set UTM position. More... | |
JPosition3D | getPosition () const |
Get position. More... | |
operator JPosition3D () const | |
Type conversion operator. More... | |
double | getUTMEast () const |
Get UTM east. More... | |
double | getUTMNorth () const |
Get UTM north. More... | |
double | getUTMZ () const |
Get UTM Z. More... | |
double | getX () const |
Get x. More... | |
double | getY () const |
Get y. More... | |
double | getZ () const |
Get z. More... | |
JUTMPosition & | negate () |
Negate UTM position. More... | |
double | getDisplacement (const JUTMPosition &position) const |
Get displacement to position. More... | |
Static Public Member Functions | |
static start_of_comment_type | getStartOfComment () |
Get option for short start of comment in binary I/O. More... | |
static void | setStartOfComment (const start_of_comment_type option) |
Set option for short start of comment in binary I/O. More... | |
static JEquationParameters & | getEquationParameters () |
Get equation parameters. More... | |
static void | setEquationParameters (const JEquationParameters &equation) |
Set equation parameters. More... | |
static T | getMinimum () |
Get minimum possible value. More... | |
static T | getMaximum () |
Get maximum possible value. More... | |
static JRange< T, JComparator_t > | DEFAULT_RANGE () |
Default range. More... | |
static JUTMGrid | valueOf (const std::string &buffer) |
Extract UTM grid. More... | |
Public Attributes | |
JComment | comment |
JComparator_t | compare |
Function object for comparisons. More... | |
T | first |
T | second |
Protected Member Functions | |
JDetector & | put (const int moduleID, const int pmtAddress, const JLocation &location, const JPMT &pmt) |
Set PMT. More... | |
void | setVersion () const |
Set version. More... | |
template<class R > | |
void | setRange (R first, R second, const JLANG::JBool< false > &option) |
Set range. More... | |
template<class R > | |
void | setRange (R first, R second, const JLANG::JBool< true > &option) |
Set range. More... | |
Static Protected Member Functions | |
template<class T > | |
static T | find (T __begin, T __end, const int id) |
Binary search method. More... | |
static bool | compare (const JModule &first, const JModule &second) |
Module comparator. More... | |
static start_of_comment_type & | get_start_of_comment () |
Get option for short start of comment in binary I/O. More... | |
Protected Attributes | |
int | __id |
std::string | version |
std::string | key |
std::string | wgs |
std::string | zone |
double | east |
double | north |
double | z |
Static Protected Attributes | |
static const size_t | LENGTH_START_OF_COMMENT = sizeof(JDetectorID) |
Length of start of comment in binary I/O. More... | |
Private Attributes | |
bool | use_logic |
Friends | |
std::istream & | operator>> (std::istream &in, JMonteCarloDetector &detector) |
Read detector from input. More... | |
Monte Carlo detector (i.e. ".det" file).
Definition at line 43 of file JMonteCarloDetector.hh.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Enumeration for different lengths of start of comment in binary I/O.
Enumerator | |
---|---|
OLD_START_OF_COMMENT | |
NEW_START_OF_COMMENT |
Definition at line 567 of file JDetector.hh.
|
inherited |
Enumeration of version types.
Note that additional version types should be included in JGetDetectorVersion::JGetDetectorVersion.
Definition at line 48 of file JDetectorVersion.hh.
|
inline |
|
inline |
Constructor.
useLogic | apply logic data in file |
Definition at line 267 of file JMonteCarloDetector.hh.
|
inline |
Set usage of logic.
useLogic | apply logic data in file |
Definition at line 527 of file JMonteCarloDetector.hh.
|
inlineprotected |
Set PMT.
moduleID | module identifier |
pmtAddress | PMT address |
location | module location |
pmt | JPMT |
Definition at line 543 of file JMonteCarloDetector.hh.
|
inlinestaticprotected |
Binary search method.
__begin | begin of data |
__end | end of data |
id | target value |
Definition at line 606 of file JMonteCarloDetector.hh.
|
inlinestaticprotected |
Module comparator.
The comparison is based on:
first | first module |
second | second module |
Definition at line 627 of file JMonteCarloDetector.hh.
|
inlineinherited |
Set version.
version | version |
Definition at line 135 of file JDetector.hh.
|
inlineinherited |
Set version.
Note that the version is only set to a higher version or when forced to set it.
version | version |
force | force setting of version |
Definition at line 152 of file JDetector.hh.
|
inlineprotectedinherited |
Set version.
This method should be called to set up the handling of detector version specific module and PMT I/O.
Definition at line 600 of file JDetector.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set status of all modules.
bit | bit |
Definition at line 181 of file JDetector.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Move detector elements.
pos | offset position |
Definition at line 238 of file JDetector.hh.
Move detector elements.
pos | offset position |
Definition at line 254 of file JDetector.hh.
|
inlineinherited |
Get module parameters.
address | module address |
Definition at line 270 of file JDetector.hh.
|
inlineinherited |
Get module parameters.
address | module address |
Definition at line 282 of file JDetector.hh.
Get module parameters.
location | module location |
Definition at line 312 of file JDetector.hh.
Get module parameters.
location | module location |
Definition at line 330 of file JDetector.hh.
|
inlineinherited |
Check availability of module parameters.
location | module location |
Definition at line 294 of file JDetector.hh.
|
inlineinherited |
Get PMT parameters.
address | JPMTAddress |
Definition at line 348 of file JDetector.hh.
|
inlineinherited |
Get PMT parameters.
address | JPMTAddress |
Definition at line 360 of file JDetector.hh.
Read from input.
in | reader |
Implements JIO::JSerialisable.
Definition at line 473 of file JDetector.hh.
Write to output.
out | writer |
Implements JIO::JSerialisable.
Definition at line 523 of file JDetector.hh.
|
inlinestaticinherited |
Get option for short start of comment in binary I/O.
Definition at line 578 of file JDetector.hh.
|
inlinestaticinherited |
Set option for short start of comment in binary I/O.
option | option |
Definition at line 589 of file JDetector.hh.
|
inlinestaticprotectedinherited |
Get option for short start of comment in binary I/O.
Definition at line 612 of file JDetector.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Less than method.
object | object identifier |
Definition at line 84 of file JObjectID.hh.
|
inlineinherited |
Less than method.
id | identifier |
Definition at line 96 of file JObjectID.hh.
|
inlineinherited |
Less-than method.
version | version |
Definition at line 73 of file JDetector/JVersion.hh.
|
inlineinherited |
More than method.
id | identifier |
Definition at line 108 of file JObjectID.hh.
|
inlineinherited |
Check validity of version.
Definition at line 80 of file JDetectorVersion.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Check equality.
header | header |
precision | precision |
Definition at line 89 of file JDetectorHeader.hh.
|
inlineinherited |
Equal method.
range | range |
Definition at line 275 of file JRange.hh.
|
inlineinherited |
Check equality.
grid | UTM grid |
Definition at line 151 of file JUTMGrid.hh.
|
inlinestaticinherited |
Get equation parameters.
Definition at line 173 of file JDetectorHeader.hh.
|
inlinestaticinherited |
Set equation parameters.
equation | equation parameters |
Definition at line 187 of file JDetectorHeader.hh.
|
inlineinherited |
Get properties of this class.
equation | equation parameters |
Definition at line 198 of file JDetectorHeader.hh.
|
inlineinherited |
Get properties of this class.
equation | equation parameters |
Definition at line 209 of file JDetectorHeader.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set UTC time range.
timerange | UTC time range |
Definition at line 85 of file JUTCTimeRange.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set range.
range | range |
|
inlineinherited |
|
inlineinherited |
Set range.
The arguments could be values or iterators.
first | first |
second | second |
Definition at line 173 of file JRange.hh.
|
inlineinherited |
Set lower and upper limit according to input data.
buffer | input data |
Definition at line 187 of file JRange.hh.
|
inlineprotectedinherited |
Set range.
first | first |
second | second |
option | false |
Definition at line 576 of file JRange.hh.
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get length (difference between upper and lower limit).
|
inlineinherited |
Set length (difference between upper and lower limit).
length | length |
Definition at line 300 of file JRange.hh.
|
inlineinherited |
Check validity of range.
|
inlineinherited |
Test whether value is inside range.
x | value |
|
inlineinherited |
Test whether value is inside range.
x | value |
Definition at line 336 of file JRange.hh.
|
inlineinherited |
|
inlineinherited |
Modulo value with respect to range.
x | value |
Definition at line 365 of file JRange.hh.
|
inlineinherited |
|
inlineinherited |
Include given value to range.
The new lower limit is the minimim of the original lower limit and given value and
the new upper limit is the maximum of the original upper limit and given value;
x | value |
Definition at line 397 of file JRange.hh.
|
inlineinherited |
Join ranges.
The new lower limit is the maximim of the two lower limits and
the new upper limit is the minimum of the two upper limits.
This operation results in an equal or smaller range and may result in an unphysical range (i.e. lower limit > upper limit).
range | range |
Definition at line 415 of file JRange.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Add offsets.
The new lower limit is the sum of the two lower limits and
the new upper limit is the sum of the two upper limits.
range | offset |
|
inlineinherited |
Add UTM position.
pos | UTM position |
Definition at line 210 of file JUTMPosition.hh.
|
inlineinherited |
|
inlineinherited |
Subtract offsets.
The new lower limit is the difference of the two lower limits and
the new upper limit is the difference of the two upper limits.
range | offset |
|
inlineinherited |
Subtract UTM position.
pos | UTM position |
Definition at line 226 of file JUTMPosition.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Scale UTM position.
factor | multiplication factor |
Definition at line 242 of file JUTMPosition.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Scale UTM position.
factor | division factor |
Definition at line 258 of file JUTMPosition.hh.
|
inlinestaticinherited |
|
inlinestaticinherited |
Get maximum possible value.
Definition at line 545 of file JRange.hh.
|
inlinestaticinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
Extract UTM grid.
buffer | WGS and UTM zone |
Definition at line 176 of file JUTMGrid.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Type conversion operator.
Definition at line 117 of file JUTMPosition.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get displacement to position.
The displacement corresponds to the 2D distance in the (East,North) plane.
position | position |
Definition at line 276 of file JUTMPosition.hh.
|
friend |
Read detector from input.
in | input stream |
detector | detector |
Definition at line 281 of file JMonteCarloDetector.hh.
|
private |
Definition at line 636 of file JMonteCarloDetector.hh.
|
inherited |
Definition at line 561 of file JDetector.hh.
|
staticprotectedinherited |
Length of start of comment in binary I/O.
Definition at line 623 of file JDetector.hh.
|
protectedinherited |
Definition at line 140 of file JObjectID.hh.
|
protectedinherited |
Definition at line 79 of file JDetector/JVersion.hh.
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
Definition at line 246 of file JUTMGrid.hh.
|
protectedinherited |
Definition at line 247 of file JUTMGrid.hh.
|
protectedinherited |
Definition at line 248 of file JUTMGrid.hh.
|
protectedinherited |
Definition at line 344 of file JUTMPosition.hh.
|
protectedinherited |
Definition at line 345 of file JUTMPosition.hh.
|
protectedinherited |
Definition at line 346 of file JUTMPosition.hh.