Project
Loading...
Searching...
No Matches
GRPECSObject.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef ALICEO2_DATA_GRPECSOBJECT_H_
17#define ALICEO2_DATA_GRPECSOBJECT_H_
18
19#include <Rtypes.h>
20#include <cstdint>
21#include <ctime>
24
25namespace o2
26{
27namespace parameters
28{
29/*
30 * Collects parameters describing the run that come from ECS only.
31 */
32
34{
36
37 public:
40
41 enum ROMode : int { ABSENT = 0,
42 PRESENT = 0x1,
43 CONTINUOUS = PRESENT + (0x1 << 1),
44 TRIGGERING = PRESENT + (0x1 << 2) };
45 GRPECSObject() = default;
46 ~GRPECSObject() = default;
47
49 timePoint getTimeStart() const { return mTimeStart; }
50 void setTimeStart(timePoint t) { mTimeStart = t; }
51
52 timePoint getTimeEnd() const { return mTimeEnd; }
53 void setTimeEnd(timePoint t) { mTimeEnd = t; }
54
55 timePoint getTimeStartCTPasSet() const { return mTimeStartCTP; }
56 timePoint getTimeStartCTP() const { return mTimeStartCTP ? mTimeStartCTP : mTimeStart; }
57 void setTimeStartCTP(timePoint t) { mTimeStartCTP = t; }
58
59 timePoint getTimeEndCTPasSet() const { return mTimeEndCTP; }
60 timePoint getTimeEndCTP() const { return mTimeEndCTP ? mTimeEndCTP : mTimeEnd; }
61 void setTimeEndCTP(timePoint t) { mTimeEndCTP = t; }
62
63 void setNHBFPerTF(uint32_t n) { mNHBFPerTF = n; }
64 uint32_t getNHBFPerTF() const { return mNHBFPerTF; }
65
67 const std::string& getDataPeriod() const { return mDataPeriod; }
68 void setDataPeriod(const std::string v) { mDataPeriod = v; }
69 // getter/setter for run identifier
70 void setRun(int r) { mRun = r; }
71 int getRun() const { return mRun; }
73 DetID::mask_t getDetsReadOut() const { return mDetsReadout; }
74 void setDetsReadOut(DetID::mask_t mask) { mDetsReadout = mask; }
76 DetID::mask_t getDetsContinuousReadOut() const { return mDetsContinuousRO; }
77 void setDetsContinuousReadOut(DetID::mask_t mask) { mDetsContinuousRO = mask; }
79 DetID::mask_t getDetsTrigger() const { return mDetsTrigger; }
80 void setDetsTrigger(DetID::mask_t mask) { mDetsTrigger = mask; }
82 void addDetReadOut(DetID id) { mDetsReadout |= id.getMask(); }
85 {
86 mDetsReadout &= ~id.getMask();
88 remDetTrigger(id);
89 }
91 void addDetContinuousReadOut(DetID id) { mDetsContinuousRO |= id.getMask(); }
93 void remDetContinuousReadOut(DetID id) { mDetsContinuousRO &= ~id.getMask(); }
95 void addDetTrigger(DetID id) { mDetsTrigger |= id.getMask(); }
97 void remDetTrigger(DetID id) { mDetsTrigger &= ~id.getMask(); }
99 bool isDetReadOut(DetID id) const { return (mDetsReadout & id.getMask()) != 0; }
101 bool isDetContinuousReadOut(DetID id) const { return (mDetsContinuousRO & id.getMask()) != 0; }
103 bool isDetTriggers(DetID id) const { return (mDetsTrigger & id.getMask()) != 0; }
105 void setDetROMode(DetID id, ROMode status);
106 ROMode getDetROMode(DetID id) const;
107
108 void setRunType(RunType t) { mRunType = t; }
109 auto getRunType() const { return mRunType; }
110
111 bool isMC() const { return mIsMC; }
112 void setIsMC(bool v = true) { mIsMC = v; }
113
116 DetID::mask_t getDetsReadOut(DetID::mask_t only, DetID::mask_t skip = 0) const { return only.any() ? (mDetsReadout & only) : (mDetsReadout ^ skip); }
118 DetID::mask_t getDetsReadOut(const std::string& only, const std::string& skip = "") const { return getDetsReadOut(DetID::getMask(only), DetID::getMask(skip)); }
119
120 // methods to manipulate the list of FLPs in the run
121 const std::vector<unsigned short>& getListOfFLPs() const { return mFLPs; }
122 void addFLP(unsigned short flp) { mFLPs.push_back(flp); }
123 void setListOfFLPs(const std::vector<unsigned short>& listFLPs) { mFLPs = listFLPs; }
124 bool getFLPStatus(unsigned short flp) const
125 {
126 return std::find(mFLPs.begin(), mFLPs.end(), flp) == mFLPs.end() ? false : true;
127 }
128 bool listOfFLPsSet() const
129 {
130 return mFLPs.size() > 0 ? true : false;
131 }
132
134 void print() const;
135
136 static GRPECSObject* loadFrom(const std::string& grpecsFileName = "");
137 static constexpr bool alwaysTriggeredRO(DetID::ID det) { return DefTriggeredDets[det]; }
138
139 private:
140 timePoint mTimeStart = 0;
141 timePoint mTimeEnd = 0;
142 timePoint mTimeStartCTP = 0;
143 timePoint mTimeEndCTP = 0;
144
145 uint32_t mNHBFPerTF = 128;
146
147 DetID::mask_t mDetsReadout;
148 DetID::mask_t mDetsContinuousRO;
149 DetID::mask_t mDetsTrigger;
150 bool mIsMC = false;
151 int mRun = 0;
152 RunType mRunType = RunType::NONE;
153 std::string mDataPeriod{};
154 std::vector<unsigned short> mFLPs;
155
156 // detectors which are always readout in triggered mode. Others are continuous by default but exceptionally can be triggered
157 static constexpr DetID::mask_t DefTriggeredDets = DetID::getMask(DetID::TRD) | DetID::getMask(DetID::PHS) | DetID::getMask(DetID::CPV) | DetID::getMask(DetID::EMC) | DetID::getMask(DetID::HMP);
158
159 ClassDefNV(GRPECSObject, 6);
160};
161
162} // namespace parameters
163} // namespace o2
164
165#endif
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 Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
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 false
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 true
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:60
int ID
Detector identifiers: continuous, starting from 0.
Definition DetID.h:63
static mask_t getMask(const std::string_view detList)
detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)
Definition DetID.cxx:43
timePoint getTimeStart() const
getters/setters for Start and Stop times according to logbook
static constexpr bool alwaysTriggeredRO(DetID::ID det)
bool isDetTriggers(DetID id) const
test if detector is triggering
void setListOfFLPs(const std::vector< unsigned short > &listFLPs)
void setDetsContinuousReadOut(DetID::mask_t mask)
bool isDetContinuousReadOut(DetID id) const
test if detector is read out
bool getFLPStatus(unsigned short flp) const
timePoint getTimeEndCTP() const
o2::parameters::GRPECS::RunType RunType
const std::string & getDataPeriod() const
getter/setter for data taking period name
timePoint getTimeStartCTP() const
DetID::mask_t getDetsReadOut(DetID::mask_t only, DetID::mask_t skip=0) const
void addDetTrigger(DetID id)
add specific detector to the list of triggering detectors
ROMode getDetROMode(DetID id) const
void addFLP(unsigned short flp)
void setDetsReadOut(DetID::mask_t mask)
DetID::mask_t getDetsContinuousReadOut() const
getter/setter for masks of detectors with continuos readout
const std::vector< unsigned short > & getListOfFLPs() const
void setTimeEnd(timePoint t)
DetID::mask_t getDetsReadOut(const std::string &only, const std::string &skip="") const
same with comma-separate list of detector names
void remDetTrigger(DetID id)
remove specific detector from the list of triggering detectors
void setTimeStart(timePoint t)
void setTimeEndCTP(timePoint t)
void setNHBFPerTF(uint32_t n)
bool isDetReadOut(DetID id) const
test if detector is read out
timePoint getTimeEndCTPasSet() const
void setTimeStartCTP(timePoint t)
void setDetROMode(DetID id, ROMode status)
set detector readout mode status
timePoint getTimeStartCTPasSet() const
DetID::mask_t getDetsReadOut() const
getter/setter for masks of detectors in the readout
void addDetReadOut(DetID id)
add specific detector to the list of readout detectors
timePoint getTimeEnd() const
void addDetContinuousReadOut(DetID id)
add specific detector to the list of continuously readout detectors
void print() const
print itself
uint32_t getNHBFPerTF() const
void setDataPeriod(const std::string v)
void setDetsTrigger(DetID::mask_t mask)
void remDetReadOut(DetID id)
remove specific detector from the list of readout detectors
static GRPECSObject * loadFrom(const std::string &grpecsFileName="")
void remDetContinuousReadOut(DetID id)
remove specific detector from the list of continuouslt readout detectors
DetID::mask_t getDetsTrigger() const
getter/setter for masks of detectors providing the trigger
GLdouble n
Definition glcorearb.h:1982
const GLdouble * v
Definition glcorearb.h:832
GLboolean r
Definition glcorearb.h:1233
GLint GLuint mask
Definition glcorearb.h:291
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...