Go to the documentation of this file.    1 #ifndef __SUPERMODULE__ 
    2 #define __SUPERMODULE__ 
   83     for (
auto & spm : ref_pmts){
 
   89     for (
auto & src : sources){
 
   91       for (
auto & spm : src.second){
 
  112     if (good_sources.size() > 0) has = 
true ;
 
  129     if (good_targets.size() > 0) has = 
true ;
 
  144     return mean_tot_refs ;
 
  157     return mean_tot_tgts ;
 
  170     return sigma_tot_refs ;
 
  183     return sigma_tot_tgts ;
 
  198     if (ref_pmts.size() == 0) 
return ;
 
  200     for (
auto & spm : ref_pmts){
 
  202       double tot = spm->getNBPulse()->getMeanToT() ;
 
  210     mean_tot_refs = sum / tots.size() ;
 
  215     for (
auto & t : tots){
 
  217       sigma_tot_refs += pow((t - mean_tot_refs) , 2) ;
 
  221     sigma_tot_refs = sqrt(sigma_tot_refs / tots.size());
 
  232     if (targets.size()==0) 
return ;
 
  242     for (
auto spm : targets[0].second){
 
  244       double tot = spm->getNBPulse()->getMeanToT() ;
 
  252     mean_tot_tgts = sum / tots.size() ;
 
  257     for (
auto & t : tots){
 
  259       sigma_tot_tgts += pow((t - mean_tot_tgts) , 2) ;
 
  263     sigma_tot_tgts= sqrt(sigma_tot_tgts / tots.size());
 
  277     return sources[sources.size() - 1];
 
  305     return good_sources[good_sources.size() - 1];
 
  319     return good_targets[0];
 
  330     for (
auto & src : sources){
 
  334       for (
auto & spm: src.second){
 
  336         if (spm->getNBPulse()->IsGood()==
true) good_pulses.push_back(spm) ;
 
  340       if(good_pulses.size()>0){
 
  344         good_sources.push_back (good_pair) ;
 
  358     for (
auto & spm : ref_pmts){
 
  360       if (spm->getNBPulse()->IsGood()==
true) good_ref_pmts.push_back(spm) ;
 
  373     for (
auto & tgt : targets){
 
  377       for (
auto & spm: tgt.second){
 
  379         if (spm->getNBPulse()->IsGood()==
true) good_pulses.push_back(spm) ;
 
  383       if(good_pulses.size()>0){
 
  387         good_targets.push_back (good_pair) ;
 
  432     for (
auto & spm : ref_pmts){
 
  447     for (
auto & spm : ref_pmts){
 
  462     for (
auto & src : sources){
 
  464       for (
auto & spm : src.second){
 
  481     for (
auto & src : sources){
 
  483       for (
auto & spm : src.second){
 
  500     for (
auto & tgt : targets){
 
  502       for (
auto & spm : tgt.second){
 
  519     for (
auto & tgt : targets){
 
  521       for (
auto & spm : tgt.second){
 
  566     return good_targets ;
 
  579     return good_sources ;
 
  590     targets.push_back(p) ;
 
  601     sources.push_back(p) ;
 
  679     return possible_tgts ;
 
  692     return possible_srcs ;
 
  718     ref_pmts.push_back(superPM) ;
 
  731     possible_srcs.push_back(super_m) ;
 
  744     possible_tgts.push_back(super_m) ;
 
 
pair< SuperModule *, vector< SuperPMT * > > get_closest_target()
Returns a pair containing a pointer to the closest target supermodule, and a vector of pointers to su...
 
double getSigmaToT_refs()
Get the standard deviation of ToT of the pulse of the nanobeacon in this supermodule detected by the ...
 
vector< SuperModule * > possible_tgts
 
vector< SuperModule * > get_possible_srcs()
Returns vector with pointers to all the supermodules below this one in the DU.
 
void analyzeAll()
Performs a fast analysis of all the SUPERPMTs related with this SUPERMODULE.
 
int getString()
Returns the string of this supermodule.
 
void compute_mean_tot_tgt()
Computes the mean and standard deviation of the ToT of the pulse of the nanobeacon in this supermodul...
 
void analyzeSrcs()
Performs a fast analysis of the NBPulses of the SUPERPMTs from this supermodule corresponding to the ...
 
vector< pair< SuperModule *, vector< SuperPMT * > > > get_targets()
Get a vector of targets.
 
void analyzeTgts()
Performs a fast analysis of the NBPulses of the SUPERPMTs from other supermodules corresponding to th...
 
void add_possible_src(SuperModule *super_m)
Adds a SUPERMODULE to the list of possible sources of this supermodule.
 
Class containing a JPMT and a NBPulse object.
 
vector< SuperModule * > get_possible_tgts()
Returns vector with pointers to all the supermodules above this one in the DU.
 
SuperModule()
Default constructor.
 
vector< pair< SuperModule *, vector< SuperPMT * > > > targets
 
vector< SuperPMT * > good_ref_pmts
 
void add_possible_tgt(SuperModule *super_m)
Adds a SUPERMODULE to the list of possible targets of this supermodule.
 
bool has_good_sources()
Checks if the SuperModule has good sources.
 
const JPMT & getPMT(const int index) const
Get PMT.
 
int getFloor()
Returns the floor of this supermodule.
 
void select_good_tgts()
Searches for target supermodules that have detected good pulses from this supermodule.
 
void fitRefs()
Performs a fit of the NBPulses of the SUPERPMTs from this supermodule.
 
pair< SuperModule *, vector< SuperPMT * > > get_closest_source()
Get a pair containing a pointer to the closest source supermodule, and a vector of pointers to superp...
 
void fitTgts()
Performs a fit of the NBPulses of the SUPERPMTs from other supermodules corresponding to the nanobeac...
 
vector< pair< SuperModule *, vector< SuperPMT * > > > get_good_sources()
Returns a vector of good sources.
 
Data structure for a composite optical module.
 
void add_ref_pmt(SuperPMT *superPM)
Adds a reference SUPERPMT to this supermodule.
 
pair< SuperModule *, vector< SuperPMT * > > get_closest_good_target()
Returns a pair containing a pointer to the closest target supermodule that detected pulses from this ...
 
Data structure for PMT geometry and calibration.
 
Class dedicated to the nanobeacon analyses, where the Modules in the detector are not regarded as sin...
 
vector< pair< SuperModule *, vector< SuperPMT * > > > get_good_targets()
Returns a vector of good targets.
 
vector< pair< SuperModule *, vector< SuperPMT * > > > good_targets
 
void select_good_refs()
Searches for sources that have produced pulses classified as good in this supermodule.
 
void fitSrcs()
Performs a fit of the NBPulses of the SUPERPMTs from this supermodule corresponding to the nanobeacon...
 
vector< pair< SuperModule *, vector< SuperPMT * > > > good_sources
 
void setDom(JModule dom_)
Sets the JModule from this supermodule.
 
double getMeanToT_refs()
Get the mean ToT of the pulse of the nanobeacon in this supermodule detected by the pmts of this supe...
 
double getMeanToT_tgts()
Get the mean ToT of the pulse of the nanobeacon in this supermodule detected by the pmts of the close...
 
bool has_good_targets()
Checks if the SuperModule has good targets.
 
JPMT getPMT(int i)
Returns a JPMT from this supermodule.
 
void add_tgt(pair< SuperModule *, vector< SuperPMT * > > p)
Adds a target.
 
void fitAll()
Performs a fit of the time distribution of all the SUPERPMTs related with this SUPERMODULE.
 
vector< pair< SuperModule *, vector< SuperPMT * > > > sources
 
vector< SuperPMT * > ref_pmts
 
void compute_mean_tot_ref()
Computes the mean and standard deviation of the ToT of the pulse of the nanobeacon in this supermodul...
 
int getFloor() const
Get floor number.
 
void add_src(pair< SuperModule *, vector< SuperPMT * > > p)
Adds a source.
 
double getSigmaToT_tgts()
Get the standard deviation of ToT of the pulse of the nanobeacon in this supermodule detected by the ...
 
vector< SuperPMT * > get_ref_pmts()
Returns a vector of SUPERPMTs with the pulses from the nanobeacon in this supermodule detected by the...
 
void analyzeRefs()
Performs a fast analysis of the NBPulses of the SUPERPMTs from this supermodule that detected the pul...
 
void select_good_srcs()
Searches for sources that have produced pulses classified as good in this supermodule.
 
~SuperModule()
Destructor.
 
pair< SuperModule *, vector< SuperPMT * > > get_closest_good_source()
Returns a pair containing a pointer to the closest source supermodule from which pulses classified as...
 
JModule getDom()
Returns the JModule corresponding to this supermodule.
 
Auxiliary classes and methods for detector calibration.
 
vector< pair< SuperModule *, vector< SuperPMT * > > > get_sources()
Get a vector of sources.
 
SuperModule(JModule dom_)
Constructor.
 
int getString() const
Get string number.
 
vector< SuperModule * > possible_srcs