6 #include "PhotosValidationTool.h"
11 PhotosValidationTool::PhotosValidationTool():m_more_photons_added(0),m_timer(
"Photos++ processing time") {
12 memset(m_photons_added,0,
sizeof(
int)*MAX_PHOTONS_TO_KEEP_TRACK_OF);
16 Photospp::Photos::initialize();
17 Photospp::Photos::setInfraredCutOff(0.001/200);
19 HEPMC2CODE( Photospp::Photos::createHistoryEntries(
false,3); )
20 HEPMC3CODE( Photospp::Photos::createHistoryEntries(
false,3); )
25 HEPMC2CODE(
int buf = -hepmc.particles_size(); )
33 HEPMC2CODE( Photospp::PhotosHepMCEvent *p_event =
new Photospp::PhotosHepMCEvent (&hepmc); )
42 HEPMC2CODE( buf += hepmc.particles_size(); )
48 if(buf<MAX_PHOTONS_TO_KEEP_TRACK_OF) ++m_photons_added[buf];
49 else ++m_more_photons_added;
55 Photospp::Log::Summary();
57 int sum = m_more_photons_added;
58 for(
int i=0; i<MAX_PHOTONS_TO_KEEP_TRACK_OF; ++i) sum += m_photons_added[i];
60 if( sum == 0 ) sum = 1;
62 printf(
"---------------------------------------------------\n");
63 printf(
" Number of photons added by Photos++ (per event):\n");
64 printf(
"---------------------------------------------------\n");
65 for(
int i=0; i<MAX_PHOTONS_TO_KEEP_TRACK_OF; ++i) {
66 printf(
"%5i: %7i events (%6.2f%%)\n",i,m_photons_added[i],m_photons_added[i]*100./sum );
68 printf(
" more: %7i events (%6.2f%%)\n",m_more_photons_added,m_more_photons_added*100./sum );
69 printf(
"total: %7i events\n",sum );
70 printf(
"---------------------------------------------------\n");
Stores event-related information.
const std::vector< ConstGenParticlePtr > & particles() const
Get list of particles (const)