29using Duration = std::chrono::duration<double, std::ratio<1, 1>>;
39 mVerbose = ic.
options().
get<
bool>(
"use-verbose-mode");
40 LOG(info) <<
" ************************* Verbose?" << mVerbose;
47 auto configBuff = pc.
inputs().
get<gsl::span<char>>(
"inputConfig");
48 auto configFileName = pc.
inputs().
get<std::string>(
"inputConfigFileName");
49 auto timer = std::chrono::duration_cast<std::chrono::milliseconds>(HighResClock::now().time_since_epoch()).count();
50 LOG(info) <<
"got input file " << configFileName <<
" of size " << configBuff.size();
52 std::vector<std::pair<long, std::vector<int32_t>>> beamEnergy;
53 std::vector<std::pair<long, std::vector<std::string>>> injScheme;
54 std::vector<std::pair<long, std::vector<std::string>>> fillNb;
55 std::vector<std::pair<long, std::vector<int32_t>>> atomicNbB1;
56 std::vector<std::pair<long, std::vector<int32_t>>> atomicNbB2;
57 std::vector<std::pair<long, std::vector<o2::units::AngleRad_t>>> crossAngle;
58 std::vector<std::pair<long, std::vector<int32_t>>> bunchConfigB1;
59 std::vector<std::pair<long, std::vector<int32_t>>> bunchConfigB2;
70 LOG(warn) <<
"Beam energy not present/empty";
72 if (nEle > 1 || nMeas > 1) {
73 LOGP(warn,
"More than one value/measurement {}/{} found for Beam Energy, keeping the last one", nEle, nMeas);
75 if (!beamEnergy.empty()) {
79 mReader.
readValue<std::string>(
"INJECTION_SCHEME",
type, nEle, nMeas, injScheme);
81 LOG(warn) <<
"Injection scheme not present/empty";
83 if (nEle > 1 || nMeas > 1) {
84 LOGP(warn,
"More than one value/measurement {}/{} found for Injection Scheme, keeping the last one", nEle, nMeas);
86 if (!injScheme.empty()) {
91 mReader.
readValue<std::string>(
"FILL_NUMBER",
type, nEle, nMeas, fillNb);
93 LOG(warn) <<
"Fill Number not present/empty";
95 if (nEle > 1 || nMeas > 1) {
96 LOG(warn) <<
"More than one value/measurement found for Fill Number, keeping the last one";
98 if (!fillNb.empty()) {
105 LOG(warn) <<
"Atomic Number Beam 1 (clockwise) not present/empty";
107 if (nEle > 1 || nMeas > 1) {
108 LOGP(warn,
"More than one value/measurement {}/{} found for Atomic Number Beam 1 (clockwise), keeping the last one", nEle, nMeas);
110 if (!atomicNbB1.empty()) {
117 LOG(warn) <<
"Atomic Number Beam 2 (anticlockwise) not present/empty";
119 if (nEle > 1 || nMeas > 1) {
120 LOGP(warn,
"More than one value/measurement {}/{} found for Atomic Number Beam 2 (anticlockwise), keeping the last one", nEle, nMeas);
122 if (!atomicNbB2.empty()) {
127 mReader.
readValue<
float>(
"IP2_XING_V_MURAD",
type, nEle, nMeas, crossAngle);
129 LOG(warn) <<
"Crossing Angle not present/empty";
131 if (nEle > 1 || nMeas > 1) {
132 LOGP(warn,
"More than one value/measurement {}/{} found for Crossing Angle, keeping the last one", nEle, nMeas);
134 if (!crossAngle.empty()) {
139 mReader.
readValue<
int>(
"CIRCULATING_BUNCH_CONFIG_BEAM1",
type, nEle, nMeas, bunchConfigB1);
141 LOG(warn) <<
"Bunch Config Beam 1 not present/empty";
144 LOGP(warn,
"More than one measurement {} found for Bunch Config Beam 1, keeping the last one", nMeas);
148 mReader.
readValue<
int>(
"CIRCULATING_BUNCH_CONFIG_BEAM2",
type, nEle, nMeas, bunchConfigB2);
150 LOG(warn) <<
"Bunch Config Beam 2 not present/empty";
153 LOGP(warn,
"More than one measurement {} found for Bunch Config Beam 2, keeping the last one", nMeas);
157 if (!bunchConfigB1.empty() && !bunchConfigB2.empty()) {
162 lhcifdata.
setBunchFillingWithTime((bunchConfigB1.back().first + bunchConfigB2.back().first) / 2, bunchFilling);
168 LOG(info) <<
" **** Beam Energy ****";
169 for (
auto& el : beamEnergy) {
170 for (
auto elVect : el.second) {
171 std::cout << el.first <<
" --> " << elVect << std::endl;
174 LOG(info) <<
" **** Injection Scheme ****";
175 for (
auto& el : injScheme) {
176 for (
auto elVect : el.second) {
177 std::cout << el.first <<
" --> " << elVect << std::endl;
180 LOG(info) <<
" **** Fill Number ****";
181 for (
auto& el : fillNb) {
182 for (
auto elVect : el.second) {
183 std::cout << el.first <<
" --> " << elVect << std::endl;
186 LOG(info) <<
" **** Atomic Number Beam 1 (clockwise) ****";
187 for (
auto& el : atomicNbB1) {
188 for (
auto elVect : el.second) {
189 std::cout << el.first <<
" --> " << elVect << std::endl;
192 LOG(info) <<
" **** Atomic Number B2 (anticlockwise) ****";
193 for (
auto& el : atomicNbB2) {
194 for (
auto elVect : el.second) {
195 std::cout << el.first <<
" --> " << elVect << std::endl;
198 LOG(info) <<
" **** Crossing Angle ****";
199 for (
auto& el : crossAngle) {
200 for (
auto elVect : el.second) {
201 std::cout << el.first <<
" --> " << elVect << std::endl;
206 sendOutput(pc.
outputs(), timer, lhcifdata);
224 std::map<std::string, std::string> md;
225 md.emplace(
"created_by",
"dpl");
227 md.emplace(
"fillNumber", fmt::format(
"{}", lhcifdata.
getFillNumber()));
231 LOG(info) <<
"Sending object " << info.getPath() <<
"/" << info.getFileName() <<
" of size " <<
image->size()
232 <<
" bytes, valid for " << info.getStartValidityTimestamp() <<
" : " << info.getEndValidityTimestamp();
243 std::vector<OutputSpec> outputs;
247 "grp-lhc-if-file-processor",
248 Inputs{{
"inputConfig",
"GRP",
"DCS_CONFIG_FILE", Lifetime::Sporadic},
249 {
"inputConfigFileName",
"GRP",
"DCS_CONFIG_NAME", Lifetime::Sporadic}},
251 AlgorithmSpec{adaptFromTask<o2::grp::GRPLHCIFfileProcessor>()},
Utils and constants for calibration and related workflows.
std::chrono::duration< double, std::ratio< 1, 1 > > Duration
std::chrono::high_resolution_clock HighResClock
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
Header to collect definitions for different units.
void setInteractingBCsFromBeams()
void buckets2BeamPattern(const std::vector< int > &buckets, int ibeam)
static std::string generateFileName(const std::string &inp)
static std::unique_ptr< std::vector< char > > createObjectImage(const T *obj, CcdbObjectInfo *info=nullptr)
static constexpr long MONTH
T get(const char *key) const
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 run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void readValue(const std::string &alias, std::string &type, int &nel, int &nmeas, std::vector< std::pair< long, std::vector< T > > > &meas)
void loadLHCIFfile(const std::string &fileName)
void setBeamAZ(int a, int z, beamDirection beam)
void setBunchFillingWithTime(std::pair< long, o2::BunchFilling > p)
void setBeamEnergyPerZWithTime(std::pair< long, int32_t > p)
void setCrossingAngleWithTime(std::pair< long, o2::units::AngleRad_t > p)
long getFillNumberTime() const
void setAtomicNumberB1WithTime(std::pair< long, int32_t > p)
void setFillNumberWithTime(std::pair< long, int32_t > p)
int32_t getFillNumber() const
void setInjectionSchemeWithTime(std::pair< long, std::string > p)
void setAtomicNumberB2WithTime(std::pair< long, int32_t > p)
GLint GLint GLsizei GLint GLenum GLenum type
Defining ITS Vertex explicitly as messageable.
std::vector< InputSpec > Inputs
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static constexpr o2::header::DataOrigin gDataOriginCDBWrapper
static constexpr o2::header::DataOrigin gDataOriginCDBPayload
static std::string getClassName(const T &obj)
get the class name of the object
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"