29{
30
33 TLorentzVector pnu(0,0,8,8);
35
36 init_state.SetProbeP4(pnu);
37
38
40
41
43
44 LOG(
"test",
pINFO) <<
"Printing an interaction object";
46
47
48
49
50
52
53 interaction.InitStatePtr()->TgtPtr()->SetHitNucP4(pnucl);
54 interaction.InitStatePtr()->TgtPtr()->SetHitNucPdg(
kPdgProton);
55 interaction.InitStatePtr()->TgtPtr()->SetHitQrkPdg(
kPdgUQuark);
56
57
58
59
60
62
63 LOG(
"test",
pINFO) <<
"Printing initial state after setting struck nucl/qrk";
65
66
67
68 LOG(
"test",
pINFO) <<
"Printing target after setting struck nucl/qrk";
69 const Target & ctgt = interaction.InitState().Tgt();
71
72
73
74
75 Target * wtgt = interaction.InitStatePtr()->TgtPtr();
77
78 LOG(
"test",
pINFO) <<
"Printing target after changing struck nucl";
80
81
82
84
88
89 LOG(
"test",
pINFO) <<
"Printing kinematics after setting x,y,Q2";
91
92
96
97 LOG(
"test",
pINFO) <<
"Printing kinematics after modifying x,y and adding W";
98 LOG(
"test",
pINFO) <<
"\n" << *wkine;
99
100
101 wkine->
Setx(0.25,
true);
102 wkine->
Sety(0.21,
true);
103 wkine->
SetW(2.89,
true);
104
105 LOG(
"test",
pINFO) <<
"Printing kinematics after setting 'selected'";
106 LOG(
"test",
pINFO) <<
"\n" << *wkine;
107
108
110
111 LOG(
"test",
pINFO) <<
"Printing kinematics after deleting 'running'";
112 LOG(
"test",
pINFO) <<
"\n" << *wkine;
113
114
116
117 LOG(
"test",
pINFO) <<
"Printing kinematics after copying 'selected'";
118 LOG(
"test",
pINFO) <<
"\n" << *wkine;
119
120
121
122 LOG(
"test",
pINFO) <<
"Printing the interaction object after all changes";
124}
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Initial State information.
Summary information for an interaction.
Generated/set kinematical variables for an event.
void Setx(double x, bool selected=false)
void SetQ2(double Q2, bool selected=false)
void ClearRunningValues(void)
void Sety(double y, bool selected=false)
void SetW(double W, bool selected=false)
void UseSelectedKinematics(void)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
void SetHitNucPdg(int pdgc)
static const double kNucleonMass