175 def reconstruct(self) -> pybasf2.Path:
176 """
177 Returns pybasf2.Path which loads the FSP Particles
178 """
179 path = basf2.create_path()
180
182 ma.fillParticleLists([('K+:FSP', ''), ('pi+:FSP', ''), ('e+:FSP', ''),
183 ('mu+:FSP', ''), ('p+:FSP', '')], writeOut=True, path=path)
184 for outputList, inputList in [('gamma:FSP', 'gamma:mdst'), ('K_S0:V0', 'K_S0:mdst'),
185 ('Lambda0:V0', 'Lambda0:mdst'), ('K_L0:FSP', 'K_L0:mdst'),
186 ('pi0:FSP', 'pi0:mdst'), ('gamma:V0', 'gamma:v0mdst')]:
187 ma.copyParticles(outputList, inputList, writeOut=True, path=path)
188 else:
189 ma.fillParticleLists([('K+:FSP', ''), ('pi+:FSP', ''), ('e+:FSP', ''),
190 ('mu+:FSP', ''), ('gamma:FSP', ''),
191 ('p+:FSP', ''), ('K_L0:FSP', '')], writeOut=True, path=path)
192 ma.fillParticleList('K_S0:V0 -> pi+ pi-', '', writeOut=True, path=path)
193 ma.fillParticleList('Lambda0:V0 -> p+ pi-', '', writeOut=True, path=path)
194 ma.fillConvertedPhotonsList('gamma:V0 -> e+ e-', '', writeOut=True, path=path)
195
196 if self.config.monitor:
197 names = ['e+', 'K+', 'pi+', 'mu+', 'gamma', 'K_S0', 'p+', 'K_L0', 'Lambda0', 'pi0']
198 filename = os.path.join(self.config.monitoring_path, 'Monitor_FSPLoader.root')
200 variables = [(f'NumberOfMCParticlesInEvent({pdg})', 100, -0.5, 99.5) for pdg in pdgs]
201 ma.variablesToHistogram('', variables=variables, filename=filename, ignoreCommandLineOverride=True, path=path)
202 return path
203
204