@@ -21,6 +21,7 @@ namespace o2::aod
2121namespace extension
2222{
2323DECLARE_SOA_EXPRESSION_COLUMN (P2exp, p2exp, float , track::p* track::p);
24+ DECLARE_SOA_CONFIGURABLE_EXPRESSION_COLUMN (Cfg, cfg, float , " cfg" );
2425
2526DECLARE_SOA_COLUMN (mX , mx, float );
2627DECLARE_SOA_COLUMN (mY , my, float );
@@ -36,6 +37,8 @@ DECLARE_SOA_TABLE(DynTable, "AOD", "DYNTABLE",
3637
3738DECLARE_SOA_EXTENDED_TABLE_USER (ExTable, Tracks, " EXTABLE" ,
3839 extension::P2exp);
40+ DECLARE_SOA_CONFIGURABLE_EXTENDED_TABLE (CExTable, Tracks, " CTRK" ,
41+ extension::Cfg);
3942} // namespace o2::aod
4043
4144using namespace o2 ;
@@ -107,6 +110,14 @@ struct ExtendAndAttach {
107110struct SpawnDynamicColumns {
108111 Produces<aod::DynTable> dyntable;
109112 Spawns<aod::ExTable> extable;
113+ Defines<aod::CExTable> cextable;
114+
115+ Configurable<float > factor{" factor" , 1 .0f , " scale factor" };
116+
117+ void init (InitContext&)
118+ {
119+ cextable.projectors [0 ] = (float )factor * aod::track::p * aod::track::p;
120+ }
110121
111122 void process (aod::Tracks const & tracks)
112123 {
@@ -119,7 +130,7 @@ struct SpawnDynamicColumns {
119130// loop over the joined table <ExTable, DynTable>
120131struct ProcessExtendedTables {
121132 // join the table ExTable and DynTable
122- using allinfo = soa::Join<aod::ExTable , aod::DynTable>;
133+ using allinfo = soa::Join<aod::Tracks, aod::ExTableExtension, aod::CExTableCfgExtension , aod::DynTable>;
123134
124135 void process (aod::Collision const &, allinfo const & tracks)
125136 {
@@ -128,6 +139,7 @@ struct ProcessExtendedTables {
128139 if (row.trackType () != 3 ) {
129140 if (row.index () % 10000 == 0 ) {
130141 LOGF (info, " E: EXPRESSION P^2 = %.3f, DYNAMIC P^2 = %.3f R^2 = %.3f" , row.p2exp (), row.p2dyn (), row.r2dyn ());
142+ LOGF (info, " C: CONF EXPRESSION f * P^2 = %.3f" , row.cfg ());
131143 }
132144 }
133145 }
0 commit comments