@@ -56,6 +56,21 @@ using DetID = o2::detectors::DetID;
5656RecoContainer::RecoContainer () = default;
5757RecoContainer::~RecoContainer () = default ;
5858
59+ void DataRequest::setITSPerLayer (bool v)
60+ {
61+ if (requestMap.find (" clusITS" ) != requestMap.end ()) {
62+ LOGP (fatal, " setITSPerLayer must be called before request ITS clusters" );
63+ }
64+ ITSPerLayer = v;
65+ }
66+
67+ void DataRequest::setMFTPerLayer (bool v)
68+ {
69+ if (requestMap.find (" clusMFT" ) != requestMap.end ()) {
70+ LOGP (fatal, " setMFTPerLayer must be called before requesting MFT clusters" );
71+ }
72+ MFTPerLayer = v;
73+ }
5974void DataRequest::addInput (const InputSpec&& isp)
6075{
6176 if (std::find (inputs.begin (), inputs.end (), isp) == inputs.end ()) {
@@ -228,42 +243,51 @@ void DataRequest::requestTOFMatches(o2::dataformats::GlobalTrackID::mask_t src,
228243
229244void DataRequest::requestITSClusters (bool mc)
230245{
231- addInput ({" clusITS" , " ITS" , " COMPCLUSTERS" , 0 , Lifetime::Timeframe});
232- addInput ({" clusITSPatt" , " ITS" , " PATTERNS" , 0 , Lifetime::Timeframe});
233- addInput ({" clusITSROF" , " ITS" , " CLUSTERSROF" , 0 , Lifetime::Timeframe});
234- addInput ({" alpparITS" , " ITS" , " ALPIDEPARAM" , 0 , Lifetime::Condition, ccdbParamSpec (" ITS/Config/AlpideParam" )});
235- if (mc) {
236- addInput ({" clusITSMC" , " ITS" , " CLUSTERSMCTR" , 0 , Lifetime::Timeframe});
246+ uint16_t nInp = ITSPerLayer ? MaxITSLayers : 1 ;
247+ for (uint16_t il = 0 ; il < nInp; ++il) {
248+ addInput ({" clusITS" + std::to_string (il), " ITS" , " COMPCLUSTERS" , il, Lifetime::Timeframe});
249+ addInput ({" clusITSPatt" + std::to_string (il), " ITS" , " PATTERNS" , il, Lifetime::Timeframe});
250+ addInput ({" clusITSROF" + std::to_string (il), " ITS" , " CLUSTERSROF" , il, Lifetime::Timeframe});
251+ if (mc) {
252+ addInput ({" clusITSMC" + std::to_string (il), " ITS" , " CLUSTERSMCTR" , il, Lifetime::Timeframe});
253+ }
237254 }
255+ addInput ({" alpparITS" , " ITS" , " ALPIDEPARAM" , 0 , Lifetime::Condition, ccdbParamSpec (" ITS/Config/AlpideParam" )});
238256 addInput ({" cldictITS" , " ITS" , " CLUSDICT" , 0 , Lifetime::Condition, ccdbParamSpec (" ITS/Calib/ClusterDictionary" )});
239257 requestMap[" clusITS" ] = mc;
240258}
241259
242260#ifdef ENABLE_UPGRADES
243261void DataRequest::requestIT3Clusters (bool mc)
244262{
245- addInput ({" clusITS" , " ITS" , " COMPCLUSTERS" , 0 , Lifetime::Timeframe});
246- addInput ({" clusITSPatt" , " ITS" , " PATTERNS" , 0 , Lifetime::Timeframe});
247- addInput ({" clusITSROF" , " ITS" , " CLUSTERSROF" , 0 , Lifetime::Timeframe});
248- addInput ({" alpparITS" , " ITS" , " ALPIDEPARAM" , 0 , Lifetime::Condition, ccdbParamSpec (" ITS/Config/AlpideParam" )});
249- if (mc) {
250- addInput ({" clusITSMC" , " ITS" , " CLUSTERSMCTR" , 0 , Lifetime::Timeframe});
263+ uint16_t nInp = ITSPerLayer ? MaxITSLayers : 1 ;
264+ for (uint16_t il = 0 ; il < nInp; ++il) {
265+ addInput ({" clusITS" + std::to_string (il), " ITS" , " COMPCLUSTERS" , il, Lifetime::Timeframe});
266+ addInput ({" clusITSPatt" + std::to_string (il), " ITS" , " PATTERNS" , il, Lifetime::Timeframe});
267+ addInput ({" clusITSROF" + std::to_string (il), " ITS" , " CLUSTERSROF" , il, Lifetime::Timeframe});
268+ if (mc) {
269+ addInput ({" clusITSMC" + std::to_string (il), " ITS" , " CLUSTERSMCTR" , il, Lifetime::Timeframe});
270+ }
251271 }
272+ addInput ({" alpparITS" , " ITS" , " ALPIDEPARAM" , 0 , Lifetime::Condition, ccdbParamSpec (" ITS/Config/AlpideParam" )});
252273 addInput ({" cldictIT3" , " IT3" , " CLUSDICT" , 0 , Lifetime::Condition, ccdbParamSpec (" IT3/Calib/ClusterDictionary" )});
253274 requestMap[" clusIT3" ] = mc;
254275}
255276#endif
256277
257278void DataRequest::requestMFTClusters (bool mc)
258279{
259- addInput ({" clusMFT" , " MFT" , " COMPCLUSTERS" , 0 , Lifetime::Timeframe});
260- addInput ({" clusMFTPatt" , " MFT" , " PATTERNS" , 0 , Lifetime::Timeframe});
261- addInput ({" clusMFTROF" , " MFT" , " CLUSTERSROF" , 0 , Lifetime::Timeframe});
280+ uint16_t nInp = MFTPerLayer ? MaxMFTLayers : 1 ;
281+ for (uint16_t il = 0 ; il < nInp; ++il) {
282+ addInput ({" clusMFT" + std::to_string (il), " MFT" , " COMPCLUSTERS" , il, Lifetime::Timeframe});
283+ addInput ({" clusMFTPatt" + std::to_string (il), " MFT" , " PATTERNS" , il, Lifetime::Timeframe});
284+ addInput ({" clusMFTROF" + std::to_string (il), " MFT" , " CLUSTERSROF" , il, Lifetime::Timeframe});
285+ if (mc) {
286+ addInput ({" clusMFTMC" + std::to_string (il), " MFT" , " CLUSTERSMCTR" , il, Lifetime::Timeframe});
287+ }
288+ }
262289 addInput ({" cldictMFT" , " MFT" , " CLUSDICT" , 0 , Lifetime::Condition, ccdbParamSpec (" MFT/Calib/ClusterDictionary" )});
263290 addInput ({" alpparMFT" , " MFT" , " ALPIDEPARAM" , 0 , Lifetime::Condition, ccdbParamSpec (" MFT/Config/AlpideParam" )});
264- if (mc) {
265- addInput ({" clusMFTMC" , " MFT" , " CLUSTERSMCTR" , 0 , Lifetime::Timeframe});
266- }
267291 requestMap[" clusMFT" ] = mc;
268292}
269293
@@ -616,6 +640,9 @@ void RecoContainer::collectData(ProcessingContext& pc, const DataRequest& reques
616640{
617641 auto & reqMap = requests.requestMap ;
618642
643+ ITSPerLayer = requests.getITSPerLayer ();
644+ MFTPerLayer = requests.getMFTPerLayer ();
645+
619646 startIR = {0 , pc.services ().get <o2::framework::TimingInfo>().firstTForbit };
620647
621648 auto req = reqMap.find (" trackITS" );
@@ -1074,11 +1101,14 @@ void RecoContainer::addITSClusters(ProcessingContext& pc, bool mc)
10741101 pc.inputs ().get <o2::itsmft::TopologyDictionary*>(" cldictITS" ); // just to trigger the finaliseCCDB
10751102 pc.inputs ().get <o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS >*>(" alpparITS" ); // note: configurable param does not need finaliseCCDB
10761103 }
1077- commonPool[GTrackID::ITS ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::ROFRecord>>(" clusITSROF" ), CLUSREFS );
1078- commonPool[GTrackID::ITS ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::CompClusterExt>>(" clusITS" ), CLUSTERS );
1079- commonPool[GTrackID::ITS ].registerContainer (pc.inputs ().get <gsl::span<unsigned char >>(" clusITSPatt" ), PATTERNS );
1080- if (mc) {
1081- mcITSClusters = pc.inputs ().get <const dataformats::MCTruthContainer<MCCompLabel>*>(" clusITSMC" );
1104+ uint16_t nInp = ITSPerLayer ? MaxITSLayers : 1 ;
1105+ for (uint16_t il = 0 ; il < nInp; ++il) {
1106+ ITSClustersData[ITSMFT_ROF ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::ROFRecord>>(" clusITSROF" + std::to_string (il)), il);
1107+ ITSClustersData[ITSMFT_CLS ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::CompClusterExt>>(" clusITS" + std::to_string (il)), il);
1108+ ITSClustersData[ITSMFT_PAT ].registerContainer (pc.inputs ().get <gsl::span<unsigned char >>(" clusITSPatt" + std::to_string (il)), il);
1109+ if (mc) {
1110+ mcITSClusters[il] = pc.inputs ().get <const dataformats::MCTruthContainer<MCCompLabel>*>(" clusITSMC" + std::to_string (il));
1111+ }
10821112 }
10831113}
10841114
@@ -1089,11 +1119,14 @@ void RecoContainer::addIT3Clusters(ProcessingContext& pc, bool mc)
10891119 pc.inputs ().get <o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS >*>(" alpparITS" ); // note: configurable param does not need finaliseCCDB
10901120 pc.inputs ().get <o2::its3::TopologyDictionary*>(" cldictIT3" ); // just to trigger the finaliseCCDB
10911121 }
1092- commonPool[GTrackID::ITS ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::ROFRecord>>(" clusITSROF" ), CLUSREFS );
1093- commonPool[GTrackID::ITS ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::CompClusterExt>>(" clusITS" ), CLUSTERS );
1094- commonPool[GTrackID::ITS ].registerContainer (pc.inputs ().get <gsl::span<unsigned char >>(" clusITSPatt" ), PATTERNS );
1095- if (mc) {
1096- mcITSClusters = pc.inputs ().get <const dataformats::MCTruthContainer<MCCompLabel>*>(" clusITSMC" );
1122+ uint16_t nInp = ITSPerLayer ? MaxITSLayers : 1 ;
1123+ for (uint16_t il = 0 ; il < nInp; ++il) {
1124+ ITSClustersData[ITSMFT_ROF ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::ROFRecord>>(" clusITSROF" + std::to_string (il)), il);
1125+ ITSClustersData[ITSMFT_CLS ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::CompClusterExt>>(" clusITS" + std::to_string (il)), il);
1126+ ITSClustersData[ITSMFT_PAT ].registerContainer (pc.inputs ().get <gsl::span<unsigned char >>(" clusITSPatt" + std::to_string (il)), il);
1127+ if (mc) {
1128+ mcITSClusters[il] = pc.inputs ().get <const dataformats::MCTruthContainer<MCCompLabel>*>(" clusITSMC" + std::to_string (il));
1129+ }
10971130 }
10981131}
10991132#endif
@@ -1105,11 +1138,14 @@ void RecoContainer::addMFTClusters(ProcessingContext& pc, bool mc)
11051138 pc.inputs ().get <o2::itsmft::TopologyDictionary*>(" cldictMFT" ); // just to trigger the finaliseCCDB
11061139 pc.inputs ().get <o2::itsmft::DPLAlpideParam<o2::detectors::DetID::MFT >*>(" alpparMFT" ); // note: configurable param does not need finaliseCCDB
11071140 }
1108- commonPool[GTrackID::MFT ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::ROFRecord>>(" clusMFTROF" ), CLUSREFS );
1109- commonPool[GTrackID::MFT ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::CompClusterExt>>(" clusMFT" ), CLUSTERS );
1110- commonPool[GTrackID::MFT ].registerContainer (pc.inputs ().get <gsl::span<unsigned char >>(" clusMFTPatt" ), PATTERNS );
1111- if (mc) {
1112- mcITSClusters = pc.inputs ().get <const dataformats::MCTruthContainer<MCCompLabel>*>(" clusMFTMC" );
1141+ uint16_t nInp = MFTPerLayer ? MaxMFTLayers : 1 ;
1142+ for (uint16_t il = 0 ; il < nInp; ++il) {
1143+ MFTClustersData[ITSMFT_ROF ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::ROFRecord>>(" clusMFTROF" + std::to_string (il)), il);
1144+ MFTClustersData[ITSMFT_CLS ].registerContainer (pc.inputs ().get <gsl::span<o2::itsmft::CompClusterExt>>(" clusMFT" + std::to_string (il)), il);
1145+ MFTClustersData[ITSMFT_PAT ].registerContainer (pc.inputs ().get <gsl::span<unsigned char >>(" clusMFTPatt" + std::to_string (il)), il);
1146+ if (mc) {
1147+ mcMFTClusters[il] = pc.inputs ().get <const dataformats::MCTruthContainer<MCCompLabel>*>(" clusMFTMC" + std::to_string (il));
1148+ }
11131149 }
11141150}
11151151
0 commit comments