Go to the source code of this file.
JDetector loadDetector |
( |
string |
detectorFile | ) |
|
|
inline |
Loads the content of a detector file in a JDetector object.
- Author
- rgruiz
- Parameters
-
detectorFile | The name of a .detx |
- Returns
- a JDetector object with the information of the file name
Definition at line 28 of file Detector.hh.
34 load(detectorFile, detector);
40 cerr <<
"FATAL ERROR. Could not open detector file '" << detectorFile <<
"'." << endl ;
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
vector<double> getDetFile_t0_differences |
( |
int |
strNr, |
|
|
JDetector |
detector, |
|
|
int |
ref_pmt, |
|
|
int |
tgt_pmt |
|
) |
| |
|
inline |
Loops over the floors in the string chosen by the user.
At each iteration "i" this function calculates: dt = t0_tgt[i+1] - t0_ref[i] where t0_tgt is the t0 of the target PMT and t0_ref is the t0 of the reference PMT (the closest to the nanobeacon). The result is stored in a vector of dimension nFloors - 1 and this vector is returned.
- Parameters
-
detector | The name of a .detx |
strNr | String number |
ref_pmt | number of reference pmt |
tgt_pmt | number of target pmt |
- Returns
- a JDetector object with the information of the file name
Definition at line 66 of file Detector.hh.
72 for (
int i=1 ; i< nFloors ; i++) {
int getNumberOfFloors(const JDetector &detector)
Get number of floors.
const JPMT & getPMT(const int index) const
Get PMT.
const JModule & getModule(const JModuleAddress &address) const
Get module parameters.
Logical location of module.
double getT0() const
Get time offset.
vector< tuple <double , double , double> > get_t0_offsets_vs_depth |
( |
int |
strNr, |
|
|
const JDetector & |
detector |
|
) |
| |
|
inline |
Definition at line 83 of file Detector.hh.
91 for (
int i = 1 ; i<nFloors+1 ; i++){
107 tuple < double , double , double > t (depth , q.getMean() , q.getSTDev()) ;
109 t0_vs_depth[i-1] = t ;
115 for (
auto & t: t0_vs_depth){
117 get<1>(t) -= Q.getMean() ;
Data structure for a composite optical module.
int getNumberOfPMTs(const JModule &module)
Get number of PMTs.
Data structure for PMT geometry and calibration.
int getNumberOfFloors(const JDetector &detector)
Get number of floors.
const JPosition3D & getPosition() const
Get position.
const JPMT & getPMT(const int index) const
Get PMT.
const JModule & getModule(const JModuleAddress &address) const
Get module parameters.
double getZ() const
Get z position.
Logical location of module.
double getT0() const
Get time offset.
double get_PMT_distance |
( |
JPMT |
src_pmt, |
|
|
JPMT |
tgt_pmt |
|
) |
| |
|
inline |
Calculate the distance between two JPMTs in the detector.
- Parameters
-
src_pmt | One pmt |
tgt_pmt | Other pmt |
- Returns
- distance between both JPMTs
Definition at line 133 of file Detector.hh.
139 const JVector3D dist(pmt1_pos - pmt2_pos) ;
141 return dist.getLength() ;
Data structure for vector in three dimensions.
const JPosition3D & getPosition() const
Get position.
Data structure for position in three dimensions.
void Print_Detector |
( |
JDetector & |
detector, |
|
|
int |
strNr |
|
) |
| |
|
inline |
Prints the t0 of all the PMTs in a DU.
- Parameters
-
detector | A JDetector |
strNr | The DU number |
Definition at line 152 of file Detector.hh.
160 for(
int i=1 ; i < nFloors ; i++){
164 for(
int j=0 ; j < nPMTs ; j++){
Data structure for a composite optical module.
Router for direct addressing of module data in detector data structure.
const JPMT & getPMT(const int index) const
Get PMT.
const JModule & getModule(const JModuleAddress &address) const
Get module parameters.
Logical location of module.
double getT0() const
Get time offset.