Class dedicated to the nanobeacon analyses, where the Modules in the detector are not regarded as single entities.
More...
#include <NBRun.hh>
|
| NBRun () |
| Default constructor. More...
|
|
| NBRun (string filename_, JDetector detector_, int string_, int pmt_top, int pmt_bottom, int max_distance_) |
| Constructor. More...
|
|
| ~NBRun () |
| Destructor. More...
|
|
void | computeMeanToTs () |
| Loops over all the SUPERMODULES to compute the mean ToT of the hits from the different nanobeacon pulses recorded by the different PMTs. More...
|
|
void | find_good_couples () |
| Loops over all the SUPERMODULES. More...
|
|
void | analyze (int option) |
| Loops over all the SUPERMODULES. More...
|
|
void | readFile () |
| Reads a .root file containing the nanobeacon pulses observed by the different PMTs in the detector. More...
|
|
void | findSrcs (SuperModule *sm, TFile *file) |
| Searches in the .root file for histograms corresponding to pulses produced in one target supermodule, by all the possible sources. More...
|
|
void | setSrcs (TFile *file) |
| Loops over all the SuoperModules in the DU. More...
|
|
void | setRefs (TFile *file) |
| Loops over all the SuoperModules in the DU. More...
|
|
void | findRefs (SuperModule *sm, TFile *file) |
| Searches in the .root file for histograms corresponding to pulses produced in one supermodule, by its own nanobeacon. More...
|
|
vector< SuperModule * > | getSuperModules () |
| Get the SuperModules in the DU. More...
|
|
void | setPMTs (int top_option, int bottom_option) |
| Select the PMTs in the upper and lower hemispheres of a DOM. More...
|
|
void | initializeSuperModules () |
| Sets the references between the different SuperModules in the DU. More...
|
|
void | setDetector (JDetector detector_) |
| Sets the detector. More...
|
|
JDetector | getDetector () |
| Get the detector. More...
|
|
void | readBasicInfo (TFile *file) |
| Reads the basic info from the .root file such as the run number and the nanobeacon voltage. More...
|
|
int | getRunNumber () |
| Get run number. More...
|
|
double | getVoltage () |
| Get nanobeacon voltage. More...
|
|
Class dedicated to the nanobeacon analyses, where the Modules in the detector are not regarded as single entities.
- Author
- rgruiz Instead, they are related to the rest of the DOMs in a DU through the emission of the nanobeacon pulses. A DOM can be emitter (source) of light that is detected by other DOMS, and it can also be a receiver (target) of the light emitted by the other DOMS. The SUPERRUN class is meant to own the different SUPERMODULEs in a DU, to coherently set their mutual rerefences and to analyze the signal produced by the different nanobeacons in the different PMTs of the DU.
Definition at line 24 of file NBRun.hh.
◆ NBRun() [1/2]
Default constructor.
Definition at line 50 of file NBRun.hh.
◆ NBRun() [2/2]
NBRun::NBRun |
( |
string |
filename_, |
|
|
JDetector |
detector_, |
|
|
int |
string_, |
|
|
int |
pmt_top, |
|
|
int |
pmt_bottom, |
|
|
int |
max_distance_ |
|
) |
| |
|
inline |
Constructor.
It initializes the Structure of SuperModules and leaves it ready for analyzing it.
- Parameters
-
filename_ | The name of a .root file containing the time vs ToT hit distributions for different PMTs in the DU |
detector_ | A detector file with the DU that is going to be analyzed. |
string_ | String number of the string to be analyzed (as it appears in the detector file) |
pmt_top | Integer number representing the user's choice |
pmt_bottom | Integer number representing the user's choice |
max_distance_ | Integer number representing the maximum number of neighbors to for each module. |
Definition at line 65 of file NBRun.hh.
79 setPMTs (pmt_top , pmt_bottom) ;
◆ ~NBRun()
Destructor.
Definition at line 90 of file NBRun.hh.
◆ computeMeanToTs()
void NBRun::computeMeanToTs |
( |
| ) |
|
|
inline |
Loops over all the SUPERMODULES to compute the mean ToT of the hits from the different nanobeacon pulses recorded by the different PMTs.
Definition at line 105 of file NBRun.hh.
109 sm->compute_mean_tot_ref() ;
111 sm->compute_mean_tot_tgt() ;
◆ find_good_couples()
void NBRun::find_good_couples |
( |
| ) |
|
|
inline |
Loops over all the SUPERMODULES.
For each of them, it searches for good sources and good targets .
Definition at line 122 of file NBRun.hh.
126 sm->select_good_srcs() ;
128 sm->select_good_tgts() ;
◆ analyze()
void NBRun::analyze |
( |
int |
option | ) |
|
|
inline |
Loops over all the SUPERMODULES.
Analyzes the nanobeacon pulses detected by the different PMTs. After they have been analyzed, the method find_good_couples is called.
- Parameters
-
option | Level of analysis of the nanobeacon pulses. 0 for a fast analysis 1 for a fit to a model |
Definition at line 140 of file NBRun.hh.
◆ readFile()
Reads a .root file containing the nanobeacon pulses observed by the different PMTs in the detector.
Definition at line 170 of file NBRun.hh.
172 TFile* file = TFile::Open(
filename.c_str()) ;
◆ findSrcs()
void NBRun::findSrcs |
( |
SuperModule * |
sm, |
|
|
TFile * |
file |
|
) |
| |
|
inline |
Searches in the .root file for histograms corresponding to pulses produced in one target supermodule, by all the possible sources.
- Parameters
-
sm | supermodule |
file | root file |
Definition at line 190 of file NBRun.hh.
198 for (
auto & src : possible_srcs){
200 int thatfloor = src->getFloor () ;
202 int thatstring = src->getString () ;
210 sprintf(name ,
"S%dF%d/S%dF%dPMT%d_beaconS%dF%d" , thisstring , thisfloor, thisstring , thisfloor , pm , thatstring , thatfloor);
212 if (file -> Get (name) ){
214 TH2D* h = (TH2D*)file -> Get(name) ;
236 src->add_tgt (tgt_pair) ;
◆ setSrcs()
void NBRun::setSrcs |
( |
TFile * |
file | ) |
|
|
inline |
Loops over all the SuoperModules in the DU.
For each supermodule, it calls the findSrcs method.
- Parameters
-
Definition at line 251 of file NBRun.hh.
◆ setRefs()
void NBRun::setRefs |
( |
TFile * |
file | ) |
|
|
inline |
Loops over all the SuoperModules in the DU.
For each supermodule, it calls the findRefs method.
- Parameters
-
Definition at line 268 of file NBRun.hh.
◆ findRefs()
void NBRun::findRefs |
( |
SuperModule * |
sm, |
|
|
TFile * |
file |
|
) |
| |
|
inline |
Searches in the .root file for histograms corresponding to pulses produced in one supermodule, by its own nanobeacon.
- Parameters
-
sm | supermodule |
file | root file |
Definition at line 286 of file NBRun.hh.
296 sprintf(name ,
"S%dF%d/S%dF%dPMT%d_beaconS%dF%d" ,
string , floor,
string , floor , pm ,
string , floor);
298 if (file -> Get (name) ){
300 TH2D* h = (TH2D*)file -> Get(name) ;
◆ getSuperModules()
Get the SuperModules in the DU.
- Returns
- Vector of SuperModules
Definition at line 323 of file NBRun.hh.
◆ setPMTs()
void NBRun::setPMTs |
( |
int |
top_option, |
|
|
int |
bottom_option |
|
) |
| |
|
inline |
Select the PMTs in the upper and lower hemispheres of a DOM.
- Parameters
-
top_option | user choice |
bottom_option | user choice |
Definition at line 337 of file NBRun.hh.
◆ initializeSuperModules()
void NBRun::initializeSuperModules |
( |
| ) |
|
|
inline |
Sets the references between the different SuperModules in the DU.
Definition at line 349 of file NBRun.hh.
353 for (
int i = 0 ; i < (int)
SuperMods.size() ; i++){
◆ setDetector()
void NBRun::setDetector |
( |
JDetector |
detector_ | ) |
|
|
inline |
Sets the detector.
- Parameters
-
Definition at line 384 of file NBRun.hh.
◆ getDetector()
Get the detector.
- Returns
- a JDetector
Definition at line 396 of file NBRun.hh.
◆ readBasicInfo()
void NBRun::readBasicInfo |
( |
TFile * |
file | ) |
|
|
inline |
Reads the basic info from the .root file such as the run number and the nanobeacon voltage.
- Parameters
-
Definition at line 409 of file NBRun.hh.
413 TVectorD* run_info = (TVectorD*)file->Get(
"Run_Info") ;
◆ getRunNumber()
int NBRun::getRunNumber |
( |
| ) |
|
|
inline |
Get run number.
- Returns
- run number
Definition at line 427 of file NBRun.hh.
◆ getVoltage()
double NBRun::getVoltage |
( |
| ) |
|
|
inline |
Get nanobeacon voltage.
- Returns
- nanobeacon voltage
Definition at line 439 of file NBRun.hh.
◆ topPMTs
◆ bottomPMTs
◆ srcPMTs
◆ tgtPMTs
◆ nSuperModules
◆ max_distance
◆ string_number
◆ filename
◆ run_number
◆ voltage
◆ detector
◆ SuperMods
The documentation for this class was generated from the following file:
void setSrcs(TFile *file)
Loops over all the SuoperModules in the DU.
vector< SuperModule * > get_possible_srcs()
Returns vector with pointers to all the supermodules below this one in the DU.
int getString()
Returns the string of this supermodule.
vector< int > setTopPMTs(int option)
Select the PMTs in the upper hemisphere of a DOM.
vector< int > setBottomPMTs(int option)
Select the PMTs in the lower hemisphere of a DOM.
vector< SuperModule * > SuperMods
void initializeSuperModules()
Sets the references between the different SuperModules in the DU.
void add_possible_src(SuperModule *super_m)
Adds a SUPERMODULE to the list of possible sources of this supermodule.
void readFile()
Reads a .root file containing the nanobeacon pulses observed by the different PMTs in the detector.
Class containing a JPMT and a NBPulse object.
const JModule & getModule(const JModuleAddress &address) const
Get module parameters.
void findRefs(SuperModule *sm, TFile *file)
Searches in the .root file for histograms corresponding to pulses produced in one supermodule,...
int getNumberOfFloors(const JDetector &detector)
Get number of floors.
Logical location of module.
void setPMTs(int top_option, int bottom_option)
Select the PMTs in the upper and lower hemispheres of a DOM.
void add_possible_tgt(SuperModule *super_m)
Adds a SUPERMODULE to the list of possible targets of this supermodule.
void readBasicInfo(TFile *file)
Reads the basic info from the .root file such as the run number and the nanobeacon voltage.
int getFloor()
Returns the floor of this supermodule.
void find_good_couples()
Loops over all the SUPERMODULES.
Data structure for a composite optical module.
void add_ref_pmt(SuperPMT *superPM)
Adds a reference SUPERPMT to this supermodule.
Data structure for PMT geometry and calibration.
Class dedicated to the nanobeacon analyses, where the Modules in the detector are not regarded as sin...
void setRefs(TFile *file)
Loops over all the SuoperModules in the DU.
void setDetector(JDetector detector_)
Sets the detector.
JPMT getPMT(int i)
Returns a JPMT from this supermodule.
void findSrcs(SuperModule *sm, TFile *file)
Searches in the .root file for histograms corresponding to pulses produced in one target supermodule,...
void add_src(pair< SuperModule *, vector< SuperPMT * > > p)
Adds a source.