Warning, file /snippets/Tracking/particle_track_parameters.C was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #include <podio/Frame.h>
0002 #include <podio/ROOTFrameReader.h>
0003 #include <edm4eic/ReconstructedParticleCollection.h>
0004
0005 void test(std::string input_file="2024-01-10T21-11-08+00-00_0179803eb6f56c96c459a6af4f187d9d88205f56/rec_dis_18x275_minQ2=1000_craterlake.edm4eic.root") {
0006 auto reader = podio::ROOTFrameReader();
0007 reader.openFile(input_file);
0008 for (size_t i = 0; i < reader.getEntries(podio::Category::Event); i++) {
0009 auto frame = podio::Frame(reader.readNextEntry(podio::Category::Event));
0010 std::cerr << "event " << i << std::endl;
0011 auto &part_coll = frame.get<edm4eic::ReconstructedParticleCollection>("ReconstructedChargedParticles");
0012 for (auto part : part_coll) {
0013 std::cerr << "particle momentum magnitude " << part.getMomentum().x << std::endl;;
0014 std::cerr << "particle Loc-a " << part.getTracks()[0].getTrajectory().getTrackParameters()[0].getLoc()[0] << std::endl;;
0015 std::cerr << "particle Loc-b " << part.getTracks()[0].getTrajectory().getTrackParameters()[0].getLoc()[1] << std::endl;;
0016 }
0017 }
0018 }