2020// *
2121// *********************************************************
2222
23+
24+ #ifndef PWGJE_TASKS_JETFORMATIONTIMERECLUSTERING_H_
25+ #define PWGJE_TASKS_JETFORMATIONTIMERECLUSTERING_H_
26+
27+ #include " PWGDQ/DataModel/ReducedInfoTables.h"
28+ #include " PWGHF/DataModel/DerivedTables.h"
29+ #include " PWGJE/DataModel/Jet.h" // IWYU pragma: keep
30+ #include " PWGJE/DataModel/JetReducedData.h"
31+ #include " PWGJE/DataModel/JetReducedDataDQ.h"
32+
33+ #include " PWGJE/DataModel/JetSubstructure.h" // new
34+
35+ #include < Framework/ASoA.h>
36+
37+ #include < cmath>
38+ #include < cstdint>
39+ #include < vector>
40+
41+ namespace o2 ::aod
42+ {
43+ // new part
44+ namespace jetTFsubstructure
45+ { // !
46+ DECLARE_SOA_COLUMN (EnergyMother, energyMother, std::vector<float >); // !
47+ DECLARE_SOA_COLUMN (PtLeading, ptLeading, std::vector<float >); // !
48+ DECLARE_SOA_COLUMN (PtSubLeading, ptSubLeading, std::vector<float >); // !
49+ DECLARE_SOA_COLUMN (Theta, theta, std::vector<float >); // !
50+ DECLARE_SOA_COLUMN (PtLeadingConstituent, ptLeadingConstituent, float ); // !
51+ DECLARE_SOA_COLUMN (TauForm, tauForm, std::vector<float >); // !
52+
53+ DECLARE_SOA_COLUMN (Z, z, std::vector<float >); // !
54+ DECLARE_SOA_COLUMN (Ptg, ptg, std::vector<float >); // !
55+ DECLARE_SOA_COLUMN (Thetag, thetag, std::vector<float >); // !
56+ DECLARE_SOA_COLUMN (Zg, zg, std::vector<float >); // !
57+ DECLARE_SOA_COLUMN (TauFormg, tauFormg, std::vector<float >); // !
58+ // !
59+ } // namespace jetTFsubstructure
60+
61+ // all tbales have the same content (for now)
62+ DECLARE_SOA_TABLE (CJetTFSSs, " AOD" , " CJETTFSS" , jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetTFsubstructure::EnergyMother, jetTFsubstructure::PtLeading, jetTFsubstructure::PtSubLeading, jetTFsubstructure::Theta, jetTFsubstructure::PtLeadingConstituent, jetTFsubstructure::TauForm, jetTFsubstructure::Z, jetTFsubstructure::Ptg, jetTFsubstructure::Thetag, jetTFsubstructure::Zg, jetTFsubstructure::TauFormg); \
63+ DECLARE_SOA_TABLE (CMCDJetTFSSs, " AOD" , " CMCDJETTFSS" , jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetTFsubstructure::EnergyMother, jetTFsubstructure::PtLeading, jetTFsubstructure::PtSubLeading, jetTFsubstructure::Theta, jetTFsubstructure::PtLeadingConstituent, jetTFsubstructure::TauForm, jetTFsubstructure::Z, jetTFsubstructure::Ptg, jetTFsubstructure::Thetag, jetTFsubstructure::Zg, jetTFsubstructure::TauFormg); \
64+ DECLARE_SOA_TABLE (CMCPJetTFSSs, " AOD" , " CMCPJETTFSS" , jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetTFsubstructure::EnergyMother, jetTFsubstructure::PtLeading, jetTFsubstructure::PtSubLeading, jetTFsubstructure::Theta, jetTFsubstructure::PtLeadingConstituent, jetTFsubstructure::TauForm, jetTFsubstructure::Z, jetTFsubstructure::Ptg, jetTFsubstructure::Thetag, jetTFsubstructure::Zg, jetTFsubstructure::TauFormg); \
65+ DECLARE_SOA_TABLE (CEWSJetTFSSs, " AOD" , " CEWSJETTFSS" , jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetTFsubstructure::EnergyMother, jetTFsubstructure::PtLeading, jetTFsubstructure::PtSubLeading, jetTFsubstructure::Theta, jetTFsubstructure::PtLeadingConstituent, jetTFsubstructure::TauForm, jetTFsubstructure::Z, jetTFsubstructure::Ptg, jetTFsubstructure::Thetag, jetTFsubstructure::Zg, jetTFsubstructure::TauFormg); \
66+
67+ } // namespace o2::aod
68+
69+ #endif // PWGJE_DATAMODEL_JETFORMATIONTIMERECLUSTERING_H_
70+
71+
72+
73+ // *********************************************************
74+ // *
75+ // Table definitions old *
76+ // *
77+ // *********************************************************
78+
79+ /*
80+
2381#ifndef PWGJE_TASKS_JETFORMATIONTIMERECLUSTERING_H_
2482#define PWGJE_TASKS_JETFORMATIONTIMERECLUSTERING_H_
2583
@@ -56,7 +114,7 @@ DECLARE_SOA_COLUMN(XsectErr, xsectErr, float); //!
56114DECLARE_SOA_COLUMN(EventWeight, eventWeight, float); //!
57115} // namespace jetmccollision
58116
59- namespace jetsubstructure
117+ namespace jetTFsubstructure
60118{ //!
61119DECLARE_SOA_COLUMN(EnergyMother, energyMother, std::vector<float>); //!
62120DECLARE_SOA_COLUMN(PtLeading, ptLeading, std::vector<float>); //!
@@ -71,7 +129,7 @@ DECLARE_SOA_COLUMN(Thetag, thetag, std::vector<float>); //!
71129DECLARE_SOA_COLUMN(Zg, zg, std::vector<float>); //!
72130DECLARE_SOA_COLUMN(TauFormg, tauFormg, std::vector<float>); //!
73131 //!
74- } // namespace jetsubstructure
132+ } // namespace jetTFsubstructure
75133
76134namespace splitting
77135{ //!
@@ -158,8 +216,8 @@ DECLARE_SOA_COLUMN(JetNConstituents, jetNConstituents, int); //!
158216 DECLARE_SOA_INDEX_COLUMN_CUSTOM(_jet_type_##O, outputTable, _jet_description_ "OS"); \
159217 DECLARE_SOA_DYNAMIC_COLUMN(Dummy##_jet_type_, dummy##_jet_type_, []() -> int { return 0; }); \
160218 } \
161- DECLARE_SOA_TABLE (_jet_type_##SSs, " AOD" , _jet_description_ " SS" , jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetsubstructure ::EnergyMother, jetsubstructure ::PtLeading, jetsubstructure ::PtSubLeading, jetsubstructure ::Theta, jetsubstructure ::PtLeadingConstituent, jetsubstructure ::TauForm, jetsubstructure ::Z, jetsubstructure ::Ptg, jetsubstructure ::Thetag, jetsubstructure ::Zg, jetsubstructure ::TauFormg, _name_##substructure::Dummy##_jet_type_<>); \
162- DECLARE_SOA_TABLE (_jet_type_##SSOs, " AOD" , _jet_description_ " SSO" , _name_##substructure::_jet_type_##OId, jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetsubstructure ::EnergyMother, jetsubstructure ::PtLeading, jetsubstructure ::PtSubLeading, jetsubstructure ::Theta, jetsubstructure ::PtLeadingConstituent, jetsubstructure ::TauForm, jetsubstructure ::Z, jetsubstructure ::Ptg, jetsubstructure ::Thetag, jetsubstructure ::Zg, jetsubstructure ::TauFormg); \
219+ DECLARE_SOA_TABLE(_jet_type_##SSs, "AOD", _jet_description_ "SS", jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetTFsubstructure ::EnergyMother, jetTFsubstructure ::PtLeading, jetTFsubstructure ::PtSubLeading, jetTFsubstructure ::Theta, jetTFsubstructure ::PtLeadingConstituent, jetTFsubstructure ::TauForm, jetTFsubstructure ::Z, jetTFsubstructure ::Ptg, jetTFsubstructure ::Thetag, jetTFsubstructure ::Zg, jetTFsubstructure ::TauFormg, _name_##substructure::Dummy##_jet_type_<>); \
220+ DECLARE_SOA_TABLE(_jet_type_##SSOs, "AOD", _jet_description_ "SSO", _name_##substructure::_jet_type_##OId, jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetTFsubstructure ::EnergyMother, jetTFsubstructure ::PtLeading, jetTFsubstructure ::PtSubLeading, jetTFsubstructure ::Theta, jetTFsubstructure ::PtLeadingConstituent, jetTFsubstructure ::TauForm, jetTFsubstructure ::Z, jetTFsubstructure ::Ptg, jetTFsubstructure ::Thetag, jetTFsubstructure ::Zg, jetTFsubstructure ::TauFormg); \
163221 \
164222 using _jet_type_##O = _jet_type_##Os::iterator; \
165223 using _jet_type_##SSO = _jet_type_##SSOs::iterator;
@@ -181,14 +239,16 @@ JETSUBSTRUCTURE_TABLES_DEF(C, "C", Charged, charged, JTracks, CJetCOs, "CJETCO",
181239
182240#endif // PWGJE_DATAMODEL_JETFORMATIONTIMERECLUSTERING_H_
183241
242+ */
243+
184244// *********************************************************
185245// *
186246// Begin of the task *
187247// *
188248// *********************************************************
189249
190250#include " PWGJE/Core/FastJetUtilities.h"
191- #include " PWGJE/Core/JetFinder.h"
251+ // #include "PWGJE/Core/JetFinder.h"
192252#include " PWGJE/Core/JetSubstructureUtilities.h"
193253#include " PWGJE/Core/JetUtilities.h"
194254
@@ -218,11 +278,17 @@ using namespace o2::framework::expressions;
218278
219279struct FormationTimeReclustering {
220280
281+ Produces<aod::CJetTFSSs> jetSubstructureDataTable;
282+ Produces<aod::CMCDJetTFSSs> jetSubstructureMCDTable;
283+ Produces<aod::CMCPJetTFSSs> jetSubstructureMCPTable;
284+ Produces<aod::CEWSJetTFSSs> jetSubstructureDataSubTable;
285+ /*
286+
221287 Produces<aod::CJetSSs> jetSubstructureDataTable;
222288 Produces<aod::CMCDJetSSs> jetSubstructureMCDTable;
223289 Produces<aod::CMCPJetSSs> jetSubstructureMCPTable;
224290 Produces<aod::CEWSJetSSs> jetSubstructureDataSubTable;
225-
291+ */
226292 Produces<aod::ChargedSPs> jetSplittingsDataTable;
227293 Produces<aod::ChargedMCDetectorLevelSPs> jetSplittingsMCDTable;
228294 Produces<aod::ChargedMCParticleLevelSPs> jetSplittingsMCPTable;
@@ -320,7 +386,7 @@ struct FormationTimeReclustering {
320386 }
321387 splittingTable (jet.globalIndex (), tracks, clusters, candidates, parentSubJet2.perp (), parentSubJet2.eta (), parentSubJet2.phi (), 0 );
322388 auto z = parentSubJet2.perp () / (parentSubJet1.perp () + parentSubJet2.perp ());
323- auto theta = parentSubJet1.delta_R (parentSubJet2);
389+ auto theta = parentSubJet1.delta_R (parentSubJet2); // this is deltaR - divide by R in postprocessing
324390 auto tau = (parentSubJet1.perp () + parentSubJet2.perp ()) / (parentSubJet1.perp () * parentSubJet2.perp () * theta * theta); // as in run2 aliphysics
325391 energyMotherVec.push_back (daughterSubJet.e ());
326392 ptLeadingVec.push_back (parentSubJet1.pt ());
0 commit comments