44 #include "TClonesArray.h"
46 #include "TObjString.h"
49 #include "reportingUtils.hpp"
50 #include "reportingUtilsRoot.hpp"
58 bool diffractiveDissVertex::_debug =
false;
61 diffractiveDissVertex::diffractiveDissVertex(
const particlePtr& beam,
71 printErr <<
"null pointer to beam particle. aborting." << endl;
75 printErr <<
"null pointer to target particle. aborting." << endl;
79 printErr <<
"null pointer to particle representing X system. aborting." << endl;
89 printWarn <<
"recoil not specified. assuming elastic scattering." << endl;
93 printDebug <<
"constructed " << *
this << endl;
122 const bool cloneOutParticles)
const
125 if (cloneInParticles)
127 if (cloneOutParticles)
130 printDebug <<
"cloned " << *
this <<
"; " <<
this <<
" -> " << vertexClone <<
" "
132 << ((
cloneOutParticles) ?
"in" :
"ex") <<
"cluding outgoing particles" << std::endl;
141 printWarn <<
"cannot add incoming particle to " << *
this << endl;
150 printWarn <<
"cannot add outgoing particle to " << *
this << endl;
180 const string partClassName = prodKinPartNames.GetClass()->GetName();
181 if (partClassName !=
"TObjString") {
182 printWarn <<
"production kinematics particle names are of type '" << partClassName
183 <<
"' and not TObjString." << endl;
188 printWarn <<
"array of production kinematics particle names has wrong size: "
189 <<
_nmbProdKinPart <<
". need at least beam (index 0); recoil (index 1) and "
190 <<
"target (index 2) are optional." << endl;
196 const string beamName = ((TObjString*)prodKinPartNames[0])->GetString().Data();
198 printWarn <<
"wrong particle at index 0 in production kinematics input data: "
199 <<
"read '" << beamName <<
"', "
200 <<
"expected beam particle '" <<
beam()->name() <<
"'" << endl;
206 const string recoilName = ((TObjString*)prodKinPartNames[1])->GetString().Data();
208 printWarn <<
"wrong particle at index 1 in production kinematics input data: "
209 <<
"read '" << recoilName <<
"', "
210 <<
"expected recoil particle '" <<
recoil()->name() <<
"'" << endl;
217 const string targetName = ((TObjString*)prodKinPartNames[2])->GetString().Data();
219 printWarn <<
"wrong particle at index 2 in production kinematics input data: "
220 <<
"read '" << targetName <<
"', "
221 <<
"expected target particle '" <<
target()->name() <<
"'" << endl;
238 const int nmbProdKinMom = prodKinMomenta.GetEntriesFast();
240 printWarn <<
"array of production kinematics particle momenta has wrong size: "
242 <<
"cannot read production kinematics." << endl;
248 TVector3* beamMom =
dynamic_cast<TVector3*
>(prodKinMomenta[0]);
251 printDebug <<
"setting momentum of beam particle '" <<
beam()->name()
252 <<
"' to " << *beamMom <<
" GeV" << endl;
253 beam()->setMomentum(*beamMom);
256 printWarn <<
"production kinematics data entry [0] is not of type TVector3. "
257 <<
"cannot read beam particle momentum." << endl;
263 TVector3* recoilMom =
dynamic_cast<TVector3*
>(prodKinMomenta[1]);
266 printDebug <<
"setting momentum of recoil particle '" <<
recoil()->name()
267 <<
"' to " << *recoilMom <<
" GeV" << endl;
268 recoil()->setMomentum(*recoilMom);
271 printWarn <<
"production kinematics data entry [1] is not of type TVector3. "
272 <<
"cannot read recoil particle momentum." << endl;
279 TVector3* targetMom =
dynamic_cast<TVector3*
>(prodKinMomenta[2]);
282 printDebug <<
"setting momentum of target particle '" <<
target()->name()
283 <<
"' to " << *targetMom <<
" GeV" << endl;
284 target()->setMomentum(*targetMom);
287 printWarn <<
"production kinematics data entry [2] is not of type TVector3. "
288 <<
"cannot read target particle momentum." << endl;
301 printDebug <<
"resetting beam momentum to " <<
_beamMomCache <<
" GeV" << endl
302 <<
" resetting recoil momentum to " <<
_recoilMomCache <<
" GeV" << endl
303 <<
" resetting target momentum to " <<
_targetMomCache <<
" GeV" << endl;
315 out <<
name() <<
": beam " <<
beam()->qnSummary() <<
" + target " <<
target()->qnSummary()
316 <<
" ---> " <<
XParticle()->qnSummary() <<
" + recoil " <<
recoil()->qnSummary();
324 out <<
name() <<
": " << endl
325 <<
" beam ..... " << *
beam() << endl
326 <<
" target ... " << *
target() << endl
327 <<
" X ........ " << *
XParticle() << endl
328 <<
" recoil ... " << *
recoil() << endl;
336 out <<
name() <<
" " <<
this <<
": "
337 <<
"beam particle = " <<
beam() <<
"; "
338 <<
"target particle = " <<
target() <<
"; "
339 <<
"X particle = " <<
XParticle() <<
"; "
340 <<
"recoil particle = " <<
recoil() << endl;