Skip to content

Commit fdf7432

Browse files
Benedikt Volkelnoferini
authored andcommitted
Force digitisation when not in GRP
The reco workflow in data taking is agnostic, meaning that empty reco files are written for detectors that were not readout in data taking. To be able to resemble this in simulation, it should be possible to always run the digitisation workflow for desired detectors (--onlyDet, --skipDet) even if they are not in the GRP file which has previously been created by the transport code. This will open up the possibility to implicitly modularies our simulation workflow in the following sense: Digits will be present for all detectors that produced a hit file. On the other hand, empty digi files will be produced for ALL detectors such that the reco->match->AOD files will end up with the correct content derived from detectors that actually produced hit files. This will drastically reduce the need of specialising our simulation workflow graphs. In particular, this is a step forward to more resilient anchored simulation.
1 parent 2ab538b commit fdf7432

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
158158
workflowOptions.push_back(
159159
ConfigParamSpec{"skipDet", VariantType::String, "none", {skiphelp}});
160160

161+
// especially useful if digit files are required later on in a simulation chain.
162+
// so if --onlyDet <detlist> is set, one can then be sure to find all those digi files, especially those for which the detector
163+
// hit files do not exist (e.g. because the detector was not readout during data taking)
164+
std::string forceaccepthelp("Whether or not to always rely on accept/skip filters for detectors, independent of GRP content");
165+
workflowOptions.push_back(
166+
ConfigParamSpec{"forceSelectedDets", VariantType::Bool, false, {forceaccepthelp}});
167+
161168
std::string onlyctxhelp("Produce only the digitization context; Don't actually digitize");
162169
workflowOptions.push_back(ConfigParamSpec{"only-context", o2::framework::VariantType::Bool, false, {onlyctxhelp}});
163170

@@ -547,13 +554,20 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
547554
return false;
548555
}
549556
auto accepted = accept(id);
557+
558+
// always comply with the filter choice?
559+
auto forceAccepted = configcontext.options().get<bool>("forceSelectedDets");
550560
bool is_ingrp = isInGRPReadout(id);
561+
// final decision on whether or not this detector will be digitized
562+
auto isRun = accepted && (forceAccepted || is_ingrp);
551563
if (gIsMaster) {
552564
LOG(info) << id.getName()
553565
<< " is in grp? " << (is_ingrp ? "yes" : "no") << ";"
554-
<< " is skipped? " << (!accepted ? "yes" : "no");
566+
<< " is taken although not in grp? " << (!is_ingrp && (accepted && forceAccepted) ? "yes" : "no") << ";"
567+
<< " is skipped? " << (!accepted ? "yes" : "no") << ";"
568+
<< " is run? " << (isRun ? "yes" : "no");
555569
}
556-
return accepted && is_ingrp;
570+
return isRun;
557571
};
558572

559573
std::vector<o2::detectors::DetID> detList; // list of participating detectors

0 commit comments

Comments
 (0)