32 #ifndef KFParticleStandalone
37 static const char *vn[14] = {
"x",
"y",
"z",
"px",
"py",
"pz",
"E",
"S",
"M",
"t",
"p",
"Q",
"Chi2",
"NDF"};
39 for (Int_t
i = 0;
i < 8;
i++) {
46 os <<
" " << vn[
i] <<
": " << std::setw(8) << particle.
GetParameter(
i);
48 float Mtp[3], MtpErr[3];
49 particle.
GetMass(Mtp[0], MtpErr[0]);
if (MtpErr[0] < 1
e-7 || MtpErr[0] > 1e10) MtpErr[0] = -13;
50 particle.
GetLifeTime(Mtp[1], MtpErr[1]);
if (MtpErr[1] <= 0 || MtpErr[1] > 1e10) MtpErr[1] = -13;
51 particle.
GetMomentum(Mtp[2], MtpErr[2]);
if (MtpErr[2] <= 0 || MtpErr[2] > 1e10) MtpErr[2] = -13;
52 for (Int_t
i = 8;
i < 11;
i++) {
53 if (
i == 9 && Mtp[
i-8] <= 0.0)
continue;
54 if (MtpErr[
i-8] > 0 && MtpErr[
i-8] < 1e10) os <<
" " << vn[
i] <<
": " << std::setw(8) << Mtp[
i-8] <<
" +/-" << std::setw(7) << MtpErr[
i-8];
55 else os <<
" " << vn[
i] <<
": " << std::setw(8) << Mtp[
i-8];
57 os <<
" pdg:" << std::setw(5) << particle.
GetPDG() <<
" Q: "<< std::setw(2) << int(particle.
GetQ()) <<
" chi2/NDF: " << std::setw(8) << particle.
GetChi2() <<
"/" << std::setw(2) << particle.
GetNDF();
81 std::cout.setf(std::ios::fixed);
82 std::cout.setf(std::ios::showpoint);
83 std::cout.precision(3);
85 std::cout <<
"Try different constructors" << std::endl<< std::endl;
86 std::cout <<
"1. Construction from Vertex" << std::endl<< std::endl;
88 vert.
SetXYZ(0.0, 0.0, 10.0);
96 std::cout <<
"Vertex Particle p1" << std::endl <<
" " << p1 << std::endl;
100 #ifdef HomogeneousField
101 KFParticle::SetField(4.9797992706298828);
103 float point[3]={0.f};
106 std::cout <<
"Set Field " << std::setw(6) << b[2] << std::endl;
108 std::cout << std::endl <<
"2. Construction from Track" << std::endl<< std::endl;
111 track.
SetParameters(-0.061996019110347252, -1.3579236865955473, 27.147283554077148,
112 0.62539337626870062, -0.028552340672283318, -0.18467358509984011);
113 float C[21]= {3.3055800809774214e-05,
114 0.00098316976438185002, 0.04740889543423539,
115 -8.5596097466772512e-05, -0.0037516094381694971, 0.032156504690647125,
116 -2.2812597903705375e-05, -0.0012121012247057524, 3.0646383360925928e-05, 6.1388628418184652e-05,
117 -4.4071909055788304e-06,-0.00048870318030618627, 3.8062554692505919e-05, 1.2177141510445709e-05, 7.6900178535210476e-06,
118 6.6224441962932268e-06, 0.00034363110217286891, -0.00031520420397528146,-1.6277704753223909e-05,-3.4322154557097545e-06, 1.027411488502718e-05};
126 std::cout <<
"Track Particle p2" << std::endl <<
" "<< p2 << std::endl;
130 std::cout << std::endl <<
"3. Now we will create one more particle from track and call the construction from these 2 particles" << std::endl<< std::endl;
133 track2.
SetParameters(-0.20371287092090862, 3.0678058943547839, -19.93988037109375,
134 0.37533048135363339, 0.024923235867488316, 0.19031024520542122);
136 { 0.00022312908970259721,
137 -0.00064291160449645151, 0.089331037457232143,
138 0.00047880877483649206, -0.045478494677353445, 0.11199165135622025,
139 4.6362085390124077e-07, 0.00070978326424729935, -0.00014164977426380486, 1.7553871209443515e-05,
140 -2.2044831998838091e-05,-0.00059994741249631909, 0.00030148707952079015,-4.6574515272730461e-06, 7.2618497455845866e-06,
141 -1.2427988441207971e-06, 0.00030830063771211896, -0.00061853865528922161, 5.4390968700069889e-06,-1.9914477627292868e-06, 8.9837108094398403e-06};
148 std::cout <<
"Track Particle p3 " << std::endl <<
" "<< p3 << std::endl;
151 std::cout <<
"Particle p4(p2,p3)" << std::endl <<
" " << p4 << std::endl;
154 std::cout << std::endl <<
"4. Construction with constrained Mass or (and) vertex position values" << std::endl<< std::endl;
166 Double_t Mass = 0.497614;
168 std::cout <<
"4.1 Construction with constrained Mass, without vertex hypothesis " << std::endl<< std::endl;
171 K0.
Construct(vDaughters,NDaughters,0,Mass);
172 std::cout <<
"Dauthers" << std::endl
173 <<
" " << *vDaughters[0] << std::endl
174 <<
" " << *vDaughters[1] << std::endl
175 <<
"Mass " << Mass << std::endl;
176 std::cout <<
"Particle K0" << std::endl << K0 << std::endl;
178 std::cout <<
" Add parent Vertex" << std::endl;
179 std::cout <<
" K0 with vertex " << K0 << std::endl;
180 std::cout << std::endl <<
"4.2 Construction without constrained Mass, with vertex hypothesis " << std::endl<< std::endl;
183 K0_1.
Construct(vDaughters,NDaughters,&pVertex,-1);
185 std::cout <<
"Dauthers" << std::endl
186 <<
" " << *vDaughters[0] << std::endl
187 <<
" " << *vDaughters[1] << std::endl
188 <<
"PV " << std::endl <<
" " << pVertex << std::endl;
189 std::cout <<
"K0_1" << std::endl <<
" " << K0_1 << std::endl;
190 std::cout << std::endl <<
"4.3 Construction with constrained Mass, with vertex hypothesis " << std::endl<< std::endl;
193 K0_2.
Construct(vDaughters,NDaughters,&pVertex,Mass);
195 std::cout <<
"Dauthers" << std::endl
196 <<
" " << *vDaughters[0] << std::endl
197 <<
" " << *vDaughters[1] << std::endl
198 <<
"PV " << std::endl <<
" " << pVertex << std::endl
199 <<
"Mass " << Mass << std::endl;
200 std::cout <<
"K0_2" << std::endl <<
" " << K0_2 << std::endl;
202 std::cout << std::endl <<
"4.4 Construction K0_3(p2,p3) without constrained Mass, without vertex hypothesis " << std::endl<< std::endl;
205 K0_3.
Construct(vDaughters,NDaughters,0,-1);
207 std::cout <<
"Dauthers" << std::endl
208 <<
" " << *vDaughters[0] << std::endl
209 <<
" " << *vDaughters[1] << std::endl;
210 std::cout <<
"K0_3" << std::endl <<
" " << K0_3 << std::endl;