56 LOG(info) <<
"initializing track fitter";
57 auto l3Current = ic.
options().
get<
float>(
"l3Current");
58 auto dipoleCurrent = ic.
options().
get<
float>(
"dipoleCurrent");
59 mTrackFitter.
initField(l3Current, dipoleCurrent);
70 auto rofsIn = pc.
inputs().
get<gsl::span<ROFRecord>>(
"rofsin");
71 auto tracksIn = pc.
inputs().
get<gsl::span<TrackMCH>>(
"tracksin");
72 auto clustersIn = pc.
inputs().
get<gsl::span<Cluster>>(
"clustersin");
79 rofsOut.reserve(rofsIn.size());
80 for (
const auto& rof : rofsIn) {
83 int trackOffset(tracksOut.size());
84 for (
const auto& mchTrack : tracksIn.subspan(rof.getFirstIdx(), rof.getNEntries())) {
87 auto trackClusters = clustersIn.subspan(mchTrack.getFirstClusterIdx(), mchTrack.getNClusters());
91 for (
const auto& cluster : trackClusters) {
92 track.createParamAtCluster(cluster);
97 mTrackFitter.
fit(track);
98 }
catch (exception
const&
e) {
99 LOG(
error) <<
"Track fit failed: " <<
e.what();
106 LOG(
error) <<
"propagation to MID failed --> track discarded";
111 const auto&
param = track.first();
112 tracksOut.emplace_back(
param.getZ(),
param.getParameters(),
param.getCovariances(),
113 param.getTrackChi2(), clustersOut.size(), track.getNClusters(),
115 mchTrack.getTimeMUS());
116 clustersOut.insert(clustersOut.end(), trackClusters.begin(), trackClusters.end());
120 rofsOut.emplace_back(rof.getBCData(), trackOffset, tracksOut.size() - trackOffset, rof.getBCWidth());
133 Inputs{
InputSpec{
"rofsin",
"MCH",
"TRACKROFSIN", 0, Lifetime::Timeframe},
134 InputSpec{
"tracksin",
"MCH",
"TRACKSIN", 0, Lifetime::Timeframe},
135 InputSpec{
"clustersin",
"MCH",
"TRACKCLUSTERSIN", 0, Lifetime::Timeframe}},
140 Options{{
"l3Current", VariantType::Float, -30000.0f, {
"L3 current"}},
141 {
"dipoleCurrent", VariantType::Float, -6000.0f, {
"Dipole current"}}}};
Definition of the MCH track for internal use.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
char error[CURL_ERROR_SIZE]
Definition of a class to fit a track to a set of clusters.
Definition of a data processor to read, refit and send tracks with attached clusters.
Definition of the MCH track.
Definition of the MCH track parameters for internal use.
T get(const char *key) const
decltype(auto) make(const Output &spec, Args... args)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
void init(framework::InitContext &ic)
void run(framework::ProcessingContext &pc)
Class to fit a track to a set of clusters.
void initField(float l3Current, float dipoleCurrent)
void smoothTracks(bool smooth)
Enable/disable the smoother (and the saving of related parameters)
void fit(Track &track, bool smooth=true, bool finalize=true, std::list< TrackParam >::reverse_iterator *itStartingParam=nullptr, bool skipLocalChi2Calculation=false)
track parameters for internal use
Double_t getZ() const
return Z coordinate (cm)
const TMatrixD & getParameters() const
return track parameters
const TMatrixD & getCovariances() const
Defining ITS Vertex explicitly as messageable.
std::vector< InputSpec > Inputs
std::vector< OutputSpec > Outputs
o2::framework::DataProcessorSpec getTrackFitterSpec(const char *specName)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"