#include <iostream>
#include "TH2D.h"
#include "NBRun.hh"
 
Go to the source code of this file.
 | 
| struct   | event | 
|   | Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a source and target modules.  More...
  | 
|   | 
◆ optimize_voltage()
Optimizes the voltage of each nanobeacon. 
- Parameters
 - 
  
    | max_tot | maximum allowed ToT value  | 
    | evt_table | table of event structures for each nanobeacon and run  | 
  
   
- Returns
 - vector of pairs with optimal voltage and corresponding run number 
 
Definition at line 49 of file JVoltageOptimizer_utils.hh.
   51   int Nbeacons = evt_table.size() ;
 
   53   int Nruns = evt_table[0].size() ;
 
   57   for (
int i=0 ; i<Nbeacons ; i++){
 
   59     for(
int j=Nruns-1 ; 
j>=0 ; 
j--){
 
   61       if(evt_table[i][
j].meanToT_ref < max_tot){
 
   63         cout << evt_table[i][
j].meanToT_ref << 
"\t " << evt_table[i][
j].V << endl ;
 
   65         optimal_voltages[i] = make_pair(evt_table[i][
j].V , 
j);
 
   75   return optimal_voltages ;