8 if(configfile!=
"") m_variables.Initialise(configfile);
15 bool use_stopwatch =
false;
16 m_variables.Get(
"use_stopwatch", use_stopwatch);
27 int flower_verbose = 0;
28 m_variables.Get(
"flower_verbose", flower_verbose);
29 WCSimRootGeom * geo = 0;
30 m_data->
WCSimGeomTree->SetBranchAddress(
"wcsimrootgeom", &geo);
31 m_data->WCSimGeomTree->GetEntry(0);
33 Log(
"TODO: detector_name should come from the geometry, rather than the parameter file",
WARN,
m_verbose);
39 m_flower->SetDarkRate(m_data->IDPMTDarkRate);
47 <<
" is more than the total number of PMTs " << m_data->IDNPMTs
48 <<
". Setting the number of working PMTs to the total number of PMTs";
98 for(std::vector<SubSample>::iterator is = m_data->IDSamples.begin(); is != m_data->IDSamples.end(); ++is){
100 const size_t nhits_in_subsample = is->m_time.size();
103 for(
size_t ihit = is->m_first_unique; ihit < nhits_in_subsample; ihit++) {
105 if(std::find(is->m_trigger_readout_windows[ihit].begin(),
106 is->m_trigger_readout_windows[ihit].end(),
107 trigger_num) == is->m_trigger_readout_windows[ihit].end())
111 m_ss <<
"DEBUG: Hit " << ihit <<
" at time " << is->m_time[ihit];
114 m_in_Ts ->push_back(is->m_time[ihit]);
122 if(m_in_nhits < m_nhits_min || m_in_nhits >
m_nhits_max) {
123 m_ss <<
"INFO: " <<
m_in_nhits <<
" hits in current trigger. Not running FLOWER";
134 m_ss <<
"INFO: FLOWER reconstructed energy " << energy;
std::string Result(std::string method_name, std::string output_file="")
Pos3D GetVertex(int irecon)
WCSimFLOWER * m_flower
Instance of FLOWER.
util::Stopwatch * m_stopwatch
The stopwatch, if we're using one.
int m_n_working_pmts
Number of working PMTs, taken from config file (defaults to NPMTs in geometry)
void Start()
Start the stopwatch.
unsigned int m_nhits_min
Number of hits must be greater than this, else FLOWER won't be run on this trigger.
std::vector< float > * m_in_Ts
Read in the times of all hits in the given trigger.
StopwatchTimes Stop()
Stop the stopwatch, returning the CPU time.
bool Initialise(std::string configfile, DataModel &data)
ReconInfo * m_input_filter
Holds reconstructed vertex information.
void StreamToLog(int level)
TChain * WCSimGeomTree
The WCSimRootGeom tree from input WCSim file(s)
std::stringstream m_ss
For easy formatting of Log messages.
int m_verbose
Verbosity level, as defined in tool parameter file.
int GetTriggerNum(int irecon)
unsigned int m_nhits_max
Number of hits must be less than this, else FLOWER won't be run on this trigger.
int m_in_nhits
Read in the total number of hits in the given trigger.
void SetEnergy(int irecon, double energy)
std::string m_input_filter_name
Which named filter to use? For preselecting which reconstructed vertices will be used by FLOWER...
std::string m_stopwatch_file
Image filename to save the histogram to, if required.
bool m_overwrite_nearest
Overwrite the precalculated nearest neighbours ROOT file that FLOWER uses?
void Log(const std::string &message, const int message_level)
Format messages in the same way as for tools.
std::string m_detector_name
Name of the detector, used to set default FLOWER parameters.
float m_vertex[3]
x,y,z of input reconstructed vertex
std::vector< int > * m_in_PMTIDs
Read in the PMT IDs of all hits in the given trigger.