16 m_positionAtScoringPlane(),
17 m_directionalCosines(),
20 m_positionAtPrimary() {
50 if(!eventAsStringVector) {
51 std::cerr <<
"ERROR: string vector passed to FlukaParticle::read is null." << std::endl;
56 if(eventAsStringVector->size() != 15) {
57 std::cerr <<
"ERROR: there are " << eventAsStringVector->size() <<
" data words, which is out of range. This particle will be null." << std::endl;
62 if(eventAsStringVector->size() < 10 || eventAsStringVector->size() > 11 ) {
63 std::cerr <<
"ERROR: there are " << eventAsStringVector->size() <<
" data words, which is out of range. This particle will be null." << std::endl;
68 std::cerr <<
"ERROR: unknown input Fluka record type. This particle will be null." << std::endl;
77 for(;itr!=itr_end;++itr,++wordNumber) {
78 if((*itr).length() == 0) {
79 std::cerr <<
"ERROR: string word has zero length." << std::endl;
82 std::istringstream inStr((*itr));
104 for(;itr!=itr_end;++itr,++wordNumber) {
105 std::istringstream inStr((*itr));
106 switch (wordNumber) {
136 case -6 : pdgID = 1000020040;
break;
137 case -5 : pdgID = 1000020030;
break;
138 case -4 : pdgID = 1000010030;
break;
139 case -3 : pdgID = 1000010020;
break;
140 case 1 : pdgID = 2212;
break;
141 case 2 : pdgID = -2212;
break;
142 case 3 : pdgID = 11;
break;
143 case 4 : pdgID = -11;
break;
144 case 5 : pdgID = 12;
break;
145 case 6 : pdgID = -12;
break;
146 case 7 : pdgID = 22;
break;
147 case 8 : pdgID = 2112;
break;
148 case 9 : pdgID = -2112;
break;
149 case 10 : pdgID = -13;
break;
150 case 11 : pdgID = 13;
break;
151 case 12 : pdgID = 130;
break;
152 case 13 : pdgID = 211;
break;
153 case 14 : pdgID = -211;
break;
154 case 15 : pdgID = 321;
break;
155 case 16 : pdgID = -321;
break;
156 case 17 : pdgID = 3122;
break;
157 case 18 : pdgID = -3122;
break;
158 case 19 : pdgID = 310;
break;
159 case 20 : pdgID = 3112;
break;
160 case 21 : pdgID = 3222;
break;
161 case 22 : pdgID = 3212;
break;
162 case 23 : pdgID = 111;
break;
163 case 24 : pdgID = 311;
break;
164 case 25 : pdgID = -311;
break;
165 case 27 : pdgID = 14;
break;
166 case 28 : pdgID = -14;
break;
167 case 31 : pdgID = -3222;
break;
168 case 32 : pdgID = -3212;
break;
169 case 33 : pdgID = -3112;
break;
170 case 34 : pdgID = 3322;
break;
171 case 35 : pdgID = -3322;
break;
172 case 36 : pdgID = 3312;
break;
173 case 37 : pdgID = -3312;
break;
174 case 38 : pdgID = 3334;
break;
175 case 39 : pdgID = -3334;
break;
176 case 41 : pdgID = -15;
break;
177 case 42 : pdgID = 15;
break;
178 case 43 : pdgID = 16;
break;
179 case 44 : pdgID = -16;
break;
180 case 45 : pdgID = 411;
break;
181 case 46 : pdgID = -411;
break;
182 case 47 : pdgID = 421;
break;
183 case 48 : pdgID = -421;
break;
184 case 49 : pdgID = 431;
break;
185 case 50 : pdgID = -431;
break;
186 case 51 : pdgID = 4122;
break;
187 case 52 : pdgID = 4232;
break;
188 case 53 : pdgID = 4112;
break;
189 case 54 : pdgID = 4322;
break;
190 case 55 : pdgID = 4312;
break;
191 case 56 : pdgID = 4332;
break;
192 case 57 : pdgID = -4122;
break;
193 case 58 : pdgID = -4232;
break;
194 case 59 : pdgID = -4132;
break;
195 case 60 : pdgID = -4322;
break;
196 case 61 : pdgID = -4312;
break;
197 case 62 : pdgID = -4332;
break;
209 std::cout.width(6); std::cout <<
m_eventId <<
" ";
211 std::cout.width(6); std::cout <<
m_flukaId <<
" ";
212 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_kineticEnergy <<
" ";
213 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_weight <<
" ";
216 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_directionalCosines.x() <<
" ";
217 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_directionalCosines.y() <<
" ";
219 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_totalEnergy <<
" ";
220 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_positionAtPrimary.x() <<
" ";
221 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_positionAtPrimary.y() <<
" ";
222 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_positionAtPrimary.z() <<
" ";
223 std::cout.width(13); std::cout.precision(6); std::cout << std::scientific <<
m_positionAtPrimary.t() <<
" ";
224 std::cout.precision(6);
225 std::cout << std::endl;
229 std::cout.width(7); std::cout <<
m_eventId <<
" ";
230 std::cout.width(2); std::cout <<
m_flukaId <<
" ";
232 std::cout.width(19); std::cout.precision(12); std::cout << std::scientific <<
m_kineticEnergy <<
" ";
236 std::cout.width(19); std::cout.precision(12); std::cout << std::scientific <<
m_directionalCosines.x() <<
" ";
237 std::cout.width(19); std::cout.precision(12); std::cout << std::scientific <<
m_directionalCosines.y() <<
" ";
238 std::cout.width(19); std::cout.precision(12); std::cout << std::scientific <<
m_directionalCosines.z() <<
" ";
240 std::cout.precision(6);
241 std::cout << std::endl;