@@ -25,7 +25,6 @@ struct ATask {
2525 // / Construct a registry object with direct declaration
2626 HistogramRegistry registry{
2727 " registry" ,
28- true ,
2928 {
3029 {" eta" , " #eta" , {HistType::kTH1F , {{102 , -2.01 , 2.01 }}}}, //
3130 {" phi" , " #varphi" , {HistType::kTH1F , {{100 , 0 ., 2 . * M_PI}}}} //
@@ -45,7 +44,6 @@ struct BTask {
4544 // / Construct a registry object with direct declaration
4645 HistogramRegistry registry{
4746 " registry" ,
48- true ,
4947 {
5048 {" eta" , " #eta" , {HistType::kTH1F , {{102 , -2.01 , 2.01 }}}}, //
5149 {" ptToPt" , " #ptToPt" , {HistType::kTH2F , {{100 , -0.01 , 10.01 }, {100 , -0.01 , 10.01 }}}} //
@@ -63,34 +61,35 @@ struct CTask {
6361
6462 HistogramRegistry registry{
6563 " registry" ,
66- true ,
6764 {
6865 {" 1d" , " test 1d" , {HistType::kTH1I , {{100 , -10 .0f , 10 .0f }}}}, //
6966 {" 2d" , " test 2d" , {HistType::kTH2F , {{100 , -10 .0f , 10 .01f }, {100 , -10 .0f , 10 .01f }}}}, //
7067 {" 3d" , " test 3d" , {HistType::kTH3D , {{100 , -10 .0f , 10 .01f }, {100 , -10 .0f , 10 .01f }, {100 , -10 .0f , 10 .01f }}}}, //
7168 {" 4d" , " test 4d" , {HistType::kTHnC , {{100 , -10 .0f , 10 .01f }, {100 , -10 .0f , 10 .01f }, {100 , -10 .0f , 10 .01f }, {100 , -10 .0f , 10 .01f }}}}, //
7269 {" 5d" , " test 5d" , {HistType::kTHnSparseL , {{10 , -10 .0f , 10 .01f }, {10 , -10 .0f , 10 .01f }, {10 , -10 .0f , 10 .01f }, {10 , -10 .0f , 10 .01f }, {10 , -10 .0f , 10 .01f }}}}, //
73- } //
70+ },
71+ OutputObjHandlingPolicy::AnalysisObject,
72+ true //
7473 };
7574
7675 void init (o2::framework::InitContext&)
7776 {
78- registry.add ({ " 7d" , " test 7d" , {HistType::kTHnC , {{3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f } }}});
77+ registry.add (" 7d" , " test 7d" , {HistType::kTHnC , {{3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }}});
7978
80- registry.add ({ " 6d" , " test 6d" , {HistType::kTHnC , {{3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f } }}});
79+ registry.add (" 6d" , " test 6d" , {HistType::kTHnC , {{3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }, {3 , -10 .0f , 10 .01f }}});
8180
82- registry.add ({ " 1d-profile" , " test 1d profile" , {HistType::kTProfile , {{20 , 0 .0f , 10 .01f } }}});
83- registry.add ({ " 2d-profile" , " test 2d profile" , {HistType::kTProfile2D , {{20 , 0 .0f , 10 .01f }, {20 , 0 .0f , 10 .01f } }}});
84- registry.add ({ " 3d-profile" , " test 3d profile" , {HistType::kTProfile3D , {{20 , 0 .0f , 10 .01f }, {20 , 0 .0f , 10 .01f }, {20 , 0 .0f , 10 .01f } }}});
81+ registry.add (" 1d-profile" , " test 1d profile" , {HistType::kTProfile , {{20 , 0 .0f , 10 .01f }}});
82+ registry.add (" 2d-profile" , " test 2d profile" , {HistType::kTProfile2D , {{20 , 0 .0f , 10 .01f }, {20 , 0 .0f , 10 .01f }}});
83+ registry.add (" 3d-profile" , " test 3d profile" , {HistType::kTProfile3D , {{20 , 0 .0f , 10 .01f }, {20 , 0 .0f , 10 .01f }, {20 , 0 .0f , 10 .01f }}});
8584
86- registry.add ({ " 2d-weight" , " test 2d weight" , {HistType::kTH2C , {{2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }}}, true } );
85+ registry.add (" 2d-weight" , " test 2d weight" , {HistType::kTH2C , {{2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }}}, true );
8786
88- registry.add ({ " 3d-weight" , " test 3d weight" , {HistType::kTH3C , {{2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }}}, true } );
87+ registry.add (" 3d-weight" , " test 3d weight" , {HistType::kTH3C , {{2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }}}, true );
8988
90- registry.add ({ " 4d-weight" , " test 4d weight" , {HistType::kTHnC , {{2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }, {100 , -10 .0f , 10 .01f }}}, true } );
89+ registry.add (" 4d-weight" , " test 4d weight" , {HistType::kTHnC , {{2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }, {100 , -10 .0f , 10 .01f }}}, true );
9190
92- registry.add ({ " 1d-profile-weight" , " test 1d profile weight" , {HistType::kTProfile , {{2 , -10 .0f , 10 .01f }}}, true } );
93- registry.add ({ " 2d-profile-weight" , " test 2d profile weight" , {HistType::kTProfile2D , {{2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }}}, true } );
91+ registry.add (" 1d-profile-weight" , " test 1d profile weight" , {HistType::kTProfile , {{2 , -10 .0f , 10 .01f }}}, true );
92+ registry.add (" 2d-profile-weight" , " test 2d profile weight" , {HistType::kTProfile2D , {{2 , -10 .0f , 10 .01f }, {2 , -10 .0f , 10 .01f }}}, true );
9493 }
9594
9695 void process (aod::Tracks const & tracks)
@@ -126,8 +125,8 @@ struct CTask {
126125};
127126
128127struct DTask {
129- HistogramRegistry spectra{" spectra" , true , {}, OutputObjHandlingPolicy::AnalysisObject, true };
130- HistogramRegistry etaStudy{" etaStudy" , true , {}, OutputObjHandlingPolicy::AnalysisObject, true };
128+ HistogramRegistry spectra{" spectra" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
129+ HistogramRegistry etaStudy{" etaStudy" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
131130
132131 void init (o2::framework::InitContext&)
133132 {
@@ -158,6 +157,19 @@ struct DTask {
158157
159158 etaStudy.add (" positive" , " A side spectra" , kTH1I , {ptAxis});
160159 etaStudy.add (" negative" , " C side spectra" , kTH1I , {ptAxis});
160+
161+ spectra.add (" before_cuts/hist1" , " asdf" , defaultParticleHist);
162+ spectra.add (" before_cuts/hist2" , " asdf" , defaultParticleHist);
163+ spectra.add (" before_cuts/hist3" , " asdf" , defaultParticleHist);
164+ spectra.add (" before_cuts/hist4" , " asdf" , defaultParticleHist);
165+ spectra.add (" before_cuts/hist5" , " asdf" , defaultParticleHist);
166+
167+ // clone whole category / group
168+ spectra.addClone (" before_cuts/" , " after_cuts/" );
169+
170+ // clone single histograms
171+ spectra.addClone (" sigmas" , " cascades" );
172+ spectra.addClone (" neutral/pions" , " strange/funny/particles" );
161173 }
162174
163175 void process (aod::Tracks const & tracks)
@@ -175,6 +187,14 @@ struct DTask {
175187 spectra.fill (" one/two/three/four/kaons" , track.pt (), track.eta (), 50 ., 0 .);
176188 spectra.fill (" sigmas" , track.pt (), track.eta (), 50 ., 0 .);
177189 spectra.fill (" lambdas" , track.pt (), track.eta (), 50 ., 0 .);
190+
191+ spectra.fill (" before_cuts/hist2" , track.pt (), track.eta (), 50 ., 0 .);
192+ spectra.fill (" before_cuts/hist2" , track.pt (), track.eta (), 50 ., 0 .);
193+
194+ spectra.fill (" after_cuts/hist2" , track.pt (), track.eta (), 50 ., 0 .);
195+
196+ spectra.fill (" cascades" , track.pt (), track.eta (), 50 ., 0 .);
197+ spectra.fill (" strange/funny/particles" , track.pt (), track.eta (), 50 ., 0 .);
178198 }
179199 }
180200};
0 commit comments