116 int mo1 = 0, mo2 = 0, da1 = 0, da2 = 0,
status = 0, pid = 0;
117 if (
evt_ !=
nullptr) {
118 cout <<
"---#-------pid--st---Mo1---Mo2---Da1---Da2------px------py------pz-------E-";
119 cout <<
"------m---------x---------y---------z---------t-";
121 cout.setf(ios::right, ios::adjustfield);
122 for (
int n = 1;
n <=
evt_->particles_size();
n++) {
125 cout << setw(4) <<
n << setw(8) << pid << setw(5) <<
status << setw(6) << mo1 << setw(6) << mo2 << setw(6) << da1
128 cout.setf(ios::right, ios::adjustfield);
129 cout << setw(10) << setprecision(2) << g->momentum().x();
130 cout << setw(8) << setprecision(2) << g->momentum().y();
131 cout << setw(10) << setprecision(2) << g->momentum().z();
132 cout << setw(8) << setprecision(2) << g->momentum().t();
133 cout << setw(8) << setprecision(2) << g->generatedMass();
135 if (g->production_vertex() !=
nullptr && g->end_vertex() !=
nullptr &&
status == 2) {
136 cout << setw(10) << setprecision(2) << g->production_vertex()->position().x();
137 cout << setw(10) << setprecision(2) << g->production_vertex()->position().y();
138 cout << setw(10) << setprecision(2) << g->production_vertex()->position().z();
140 double xm = g->production_vertex()->position().x();
141 double ym = g->production_vertex()->position().y();
142 double zm = g->production_vertex()->position().z();
143 double xd = g->end_vertex()->position().x();
144 double yd = g->end_vertex()->position().y();
145 double zd = g->end_vertex()->position().z();
146 double decl =
sqrt((xd - xm) * (xd - xm) + (yd - ym) * (yd - ym) + (zd - zm) * (zd - zm));
147 double labTime = decl / c_light;
149 double properTime = labTime / g->momentum().rho() * (g->generatedMass());
151 cout << setw(8) << setprecision(2) << properTime;
153 cout << setw(10) << setprecision(2) << 0.0;
154 cout << setw(10) << setprecision(2) << 0.0;
155 cout << setw(10) << setprecision(2) << 0.0;
156 cout << setw(8) << setprecision(2) << 0.0;
161 cout <<
" HepMCFileReader: No event available !" << endl;
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
std::vector< HepMC::GenParticle * > index_to_particle
edm::propagate_const< HepMC::GenEvent * > evt_
virtual void getStatsFromTuple(int &mo1, int &mo2, int &da1, int &da2, int &status, int &pid, int j) const