11 , m_fn_lumi_tot (fn_lumi_tot )
12 , m_fn_lumi_info(fn_lumi_info)
13 , m_fn_lumi_list(fn_lumi_list)
33 mi_evt = findNode::getClass<SQEvent >(topNode,
"SQEvent");
34 mi_gen_inte = findNode::getClass<PHGenIntegral>(topNode,
"PHGenIntegral");
35 if (mi_evt && mi_gen_inte) {
36 if (m_fn_lumi_list.length() > 0) ofs_lumi_list.open(m_fn_lumi_list.c_str());
38 cout <<
"AnaSimRunInfo will do nothing since cannot find SQEvent/PHGenIntegral." << endl;
51 static int run_id_pre = -1;
52 static int evt_id_pre = -1;
55 if (run_id != run_id_pre || evt_id < evt_id_pre) {
60 cout <<
"AnaSimRunInfo: Integrated luminosity = " << lumi_inte <<
" /pb\n"
61 <<
" N of generator-accepted events = " << n_evt_gen <<
"\n"
62 <<
" N of processed events = " << n_evt_pro << endl;
64 if (ofs_lumi_list.is_open()) ofs_lumi_list << lumi_inte <<
"\t" << n_evt_gen <<
"\t" << n_evt_pro <<
"\n";
65 lumi_inte_tot += lumi_inte;
66 n_evt_gen_tot += n_evt_gen;
67 n_evt_pro_tot += n_evt_pro;
79 if (ofs_lumi_list.is_open()) ofs_lumi_list.close();
82 oss <<
"Integrated luminosity = " << lumi_inte_tot <<
" /pb\n"
83 <<
"N of generator-accepted events = " << n_evt_gen_tot <<
"\n"
84 <<
"N of processed events = " << n_evt_pro_tot <<
"\n"
85 <<
"N of input runs = " << n_run << endl;
87 cout <<
"AnaSimRunInfo::End():\n"
91 if (m_fn_lumi_info.length() > 0) {
92 ofstream ofs(m_fn_lumi_info);
97 ofstream ofs(m_fn_lumi_tot);
98 ofs << lumi_inte_tot <<
"\n";
AnaSimRunInfo(const char *fn_lumi_tot="lumi_tot.txt", const char *fn_lumi_info="lumi_info.txt", const char *fn_lumi_list="lumi_list.txt")
int InitRun(PHCompositeNode *topNode)
int Init(PHCompositeNode *topNode)
int process_event(PHCompositeNode *topNode)
int End(PHCompositeNode *topNode)
Called at the end of all processing.
virtual int Verbosity() const
Gets the verbosity of this module.
virtual ULong64_t get_N_Processed_Event() const
Number of processed events in the Fun4All cycles.
virtual ULong64_t get_N_Generator_Accepted_Event() const
Number of accepted events in the event generator. This can be higher than fNProcessedEvent depending ...
virtual Double_t get_Integrated_Lumi() const
Integrated luminosity in pb^-1.
virtual int get_run_id() const =0
Return the run ID.
virtual int get_event_id() const =0
Return the event ID, which is unique per run.