1616// / \author Nicolò Jacazio, Universita del Piemonte Orientale (IT)
1717// /
1818
19+ #include " ALICE3/DataModel/OTFTracks.h"
1920#include " ALICE3/DataModel/collisionAlice3.h"
2021#include " ALICE3/DataModel/tracksAlice3.h"
2122#include " Common/DataModel/TrackSelectionTables.h"
@@ -67,6 +68,9 @@ struct Alice3TrackingTranslator {
6768 o2::framework::Produces<o2::aod::TrackSelectionExtension> tableTrackSelectionExtension;
6869 o2::framework::Produces<o2::aod::StoredMcParticles> tableStoredMcParticles;
6970 o2::framework::Produces<o2::aod::McCollisions> tableMcCollisions;
71+ o2::framework::Produces<o2::aod::OTFLUTConfigId> tableOTFLUTConfigId;
72+
73+ o2::framework::Configurable<int > maxCollisions{" maxCollisions" , 1000 , " Nsigma for TOF PID (if enabled)" };
7074
7175 void init (o2::framework::InitContext&)
7276 {
@@ -80,6 +84,7 @@ struct Alice3TrackingTranslator {
8084 if (mTree ->SetBranchAddress (branchname, &branchvar)) { \
8185 LOG (fatal) << " Could not set branch address for " << branchname; \
8286 }
87+
8388 struct FileStruct {
8489 FileStruct (std::string filename, std::string treename) : mFile (filename.c_str(), " READ" )
8590 {
@@ -252,6 +257,10 @@ struct Alice3TrackingTranslator {
252257
253258 const Long64_t kEvents = fileParticles.getEntries ();
254259 for (Long64_t iEvent = 0 ; iEvent < kEvents ; ++iEvent) {
260+ if (iEvent > 0 && iEvent % maxCollisions) {
261+ LOG (info) << " Processing event " << iEvent << " /" << kEvents ;
262+ break ;
263+ }
255264 fileParticles.setEventEntry (iEvent);
256265 // fileVertices.setEventEntry(iEvent);
257266 fileTracksummary.setEventEntry (iEvent);
@@ -265,6 +274,7 @@ struct Alice3TrackingTranslator {
265274 float collisionY = 0 .0f ;
266275 float collisionZ = 0 .0f ;
267276
277+ tableOTFLUTConfigId (0 ); // dummy for the moment
268278 tableCollisions (0 , // bcId
269279 collisionX, // posX
270280 collisionY, // posY
@@ -326,6 +336,7 @@ struct Alice3TrackingTranslator {
326336 fileTracksummary.m_t_vx ->at (iParticle),
327337 fileTracksummary.m_t_vy ->at (iParticle),
328338 fileTracksummary.m_t_vz ->at (iParticle)});
339+
329340 tableStoredMcParticles (tableMcCollisions.lastIndex (), // mcCollisionId
330341 fileTracksummary.m_majorityParticlePDG ->at (iParticle), // pdgCode
331342 0 , // statusCode
0 commit comments