Skip to content

Commit 180105b

Browse files
authored
Merge 594818a into sapling-pr-archive-ehellbar
2 parents 61b288c + 594818a commit 180105b

99 files changed

Lines changed: 3215 additions & 1235 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ bazel-*
8282
# direnv
8383
.envrc
8484

85+
# git wrappers
86+
.sl
87+
8588
# LSP support on macOS with vim
8689
.clangd
8790
DataFormats/Detectors/CTP/include/DataFormatsCTP/Scalers.h

DataFormats/Detectors/TOF/include/DataFormatsTOF/Cluster.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,19 @@ class Cluster : public o2::BaseCluster<float>
4949
kDownRight = 4, // 2^4, 5th bit
5050
kDown = 5, // 2^5, 6th bit
5151
kDownLeft = 6, // 2^6, 7th bit
52-
kLeft = 7 }; // 2^7, 8th bit
52+
kLeft = 7, // 2^7, 8th bit
53+
//
54+
FrameBit = 6 }; // this bit set means that the cluster is in the nominal (alpha=20*sector+10 deg.) sector frame rather than aligned
5355

5456
Cluster() = default;
5557

5658
Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, double timeRaw, double time, float tot, int L0L1latency, int deltaBC, float geanttime = 0.0, double t0 = 0.0);
5759

5860
~Cluster() = default;
5961

62+
bool isInNominalSector() const { return isBitSet(FrameBit); }
63+
void setInNominalSector() { setBit(FrameBit); }
64+
6065
std::int8_t getSector() const { return getCount(); }
6166
void setSector(std::int8_t value) { setCount(value); }
6267

DataFormats/Detectors/TPC/include/DataFormatsTPC/LtrCalibData.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ struct LtrCalibData {
4242
std::vector<uint16_t> matchedLtrIDs; ///< matched laser track IDs
4343
std::vector<uint16_t> nTrackTF; ///< number of laser tracks per TF
4444
std::vector<float> dEdx; ///< dE/dx of each track
45+
float tp{0.f}; ///< temperature over pressure ratio
4546

4647
bool isValid() const
4748
{
@@ -138,7 +139,7 @@ struct LtrCalibData {
138139
dEdx.clear();
139140
}
140141

141-
ClassDefNV(LtrCalibData, 4);
142+
ClassDefNV(LtrCalibData, 5);
142143
};
143144

144145
} // namespace o2::tpc

DataFormats/Detectors/TPC/include/DataFormatsTPC/VDriftCorrFact.h

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,35 @@ namespace o2::tpc
2626
{
2727

2828
struct VDriftCorrFact {
29-
long firstTime{}; ///< first time stamp of processed TFs
30-
long lastTime{}; ///< last time stamp of processed TFs
31-
long creationTime{}; ///< time of creation
32-
float corrFact{1.0}; ///< drift velocity correction factor (multiplicative)
33-
float corrFactErr{0.0}; ///< stat error of correction factor
34-
float refVDrift{0.}; ///< reference vdrift for which factor was extracted
29+
long firstTime{}; ///< first time stamp of processed TFs
30+
long lastTime{}; ///< last time stamp of processed TFs
31+
long creationTime{}; ///< time of creation
32+
float corrFact{1.0}; ///< drift velocity correction factor (multiplicative)
33+
float corrFactErr{0.0}; ///< stat error of correction factor
34+
float refVDrift{0.}; ///< reference vdrift for which factor was extracted
3535
float refTimeOffset{0.}; ///< additive time offset reference (\mus)
3636
float timeOffsetCorr{0.}; ///< additive time offset correction (\mus)
37+
float refTP{0.}; ///< reference temperature / pressure for which refVDrift was extracted
3738

3839
float getVDrift() const { return refVDrift * corrFact; }
3940
float getVDriftError() const { return refVDrift * corrFactErr; }
4041

4142
float getTimeOffset() const { return refTimeOffset + timeOffsetCorr; }
4243

4344
// renormalize VDrift reference and correction either to provided new reference (if >0) or to correction 1 wrt current reference
44-
void normalize(float newVRef = 0.f)
45+
void normalize(float newVRef = 0.f, float tp = 0.f)
4546
{
47+
float normVDrift = newVRef;
4648
if (newVRef == 0.f) {
47-
newVRef = refVDrift * corrFact;
49+
normVDrift = refVDrift * corrFact;
50+
newVRef = normVDrift;
51+
if ((tp > 0) && (refTP > 0)) {
52+
// linear scaling based on relative change of T/P
53+
normVDrift *= refTP / tp;
54+
refTP = tp; // update reference T/P
55+
}
4856
}
49-
float fact = refVDrift / newVRef;
57+
float fact = refVDrift / normVDrift;
5058
refVDrift = newVRef;
5159
corrFactErr *= fact;
5260
corrFact *= fact;
@@ -66,7 +74,7 @@ struct VDriftCorrFact {
6674
}
6775
}
6876

69-
ClassDefNV(VDriftCorrFact, 2);
77+
ClassDefNV(VDriftCorrFact, 3);
7078
};
7179

7280
} // namespace o2::tpc

DataFormats/Detectors/ZDC/include/DataFormatsZDC/Hit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class Hit : public o2::BasicXYZEHit<Float_t, Float_t>
5858
float getPMCLightYield() const { return mNphePMC; }
5959
float getPMQLightYield() const { return mNphePMQ; }
6060
int getNumContributingSteps() const { return mNoContributingSteps; }
61+
bool getSecFlag() const { return mSecFlag; }
6162

6263
private:
6364
Int_t mParentID;

Detectors/CTP/workflowScalers/src/ctp-ccdb-orbit.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,9 @@ int main(int argc, char** argv)
125125
} else {
126126
std::cout << "Storing:" << ccdbPath << " tmin:" << tmin << " tmax:" << tmax << " ts:" << tt << std::endl;
127127
std::string filename = "orbitReset.root";
128-
TClass* tcls = TClass::GetClass(typeid(vect));
129-
auto ti = tcls->GetTypeInfo();
130128
auto classname = "std::vector<int64_t>";
131129
metadata["adjustableEOV"] = "true";
132-
ret = api.storeAsTFile_impl(&(vect), *ti, ccdbPath, metadata, tmin, tmax);
130+
ret = api.storeAsTFileAny(&(vect), ccdbPath, metadata, tmin, tmax);
133131
o2::ccdb::CcdbObjectInfo oi(ccdbPath, classname, filename, metadata, tmin, tmax);
134132
adjustOverriddenEOV(api, oi);
135133
}

Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,14 @@ int ctpCCDBManager::saveOrbitReset(long timeStamp)
157157
o2::ccdb::CcdbApi api;
158158
std::map<std::string, std::string> metadata; // can be empty
159159
api.init(mCCDBHost.c_str()); // or http://localhost:8080 for a local installation
160-
161-
// store abitrary user object in strongly typed manner
162-
int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
160+
// int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
161+
std::cout << "Storing:" << mCCDBPathOrbitReset << " tmin:" << tmin << " tmax:" << tmax << " ts:" << timeStamp << std::endl;
162+
std::string filename = "orbitReset.root";
163+
auto classname = "std::vector<int64_t>";
164+
metadata["adjustableEOV"] = "true";
165+
int ret = api.storeAsTFileAny(&(vect), mCCDBPathOrbitReset, metadata, tmin, tmax);
166+
o2::ccdb::CcdbObjectInfo oi(mCCDBPathOrbitReset, classname, filename, metadata, tmin, tmax);
167+
adjustOverriddenEOV(api, oi);
163168
if (ret == 0) {
164169
LOG(info) << "Orbit reset saved in ccdb:" << mCCDBHost << " tmin:" << tmin << " tmax:" << tmax;
165170
} else {

Detectors/Calibration/include/DetectorsCalibration/IntegratedClusterCalibrator.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ struct TimeSeriesdEdx {
331331
};
332332

333333
struct TimeSeriesITSTPC {
334+
float mVDrift = 0; ///< drift velocity in cm/us
335+
float mPressure = 0; ///< pressure
336+
float mTemperature = 0; ///< temperature
334337
TimeSeries mTSTPC; ///< TPC standalone DCAs
335338
TimeSeries mTSITSTPC; ///< ITS-TPC standalone DCAs
336339
ITSTPC_Matching mITSTPCAll; ///< ITS-TPC matching efficiency for ITS standalone + afterburner
@@ -499,7 +502,7 @@ struct TimeSeriesITSTPC {
499502
nVertexContributors_Quantiles.resize(nTotalQ);
500503
}
501504

502-
ClassDefNV(TimeSeriesITSTPC, 5);
505+
ClassDefNV(TimeSeriesITSTPC, 6);
503506
};
504507

505508
} // end namespace tpc

Detectors/GlobalTracking/src/MatchTPCITS.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void MatchTPCITS::run(const o2::globaltracking::RecoContainer& inp,
101101
break;
102102
}
103103
if (mVDriftCalibOn) { // in the beginning of the output vector we send the full and reference VDrift used for this TF
104-
calib.emplace_back(mTPCVDrift, mTPCDrift.refVDrift, -999.);
104+
calib.emplace_back(mTPCVDrift, mTPCDrift.refVDrift, mTPCDrift.refTP);
105105
calib.emplace_back(mTPCDriftTimeOffset, mTPCDrift.refTimeOffset, -999.);
106106
}
107107

Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCInterpolationSpec.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ namespace tpc
3838
class TPCInterpolationDPL : public Task
3939
{
4040
public:
41-
TPCInterpolationDPL(std::shared_ptr<o2::globaltracking::DataRequest> dr, o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap, std::shared_ptr<o2::base::GRPGeomRequest> gr, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput) : mDataRequest(dr), mSources(src), mSourcesMap(srcMap), mGGCCDBRequest(gr), mUseMC(useMC), mProcessITSTPConly(processITSTPConly), mSendTrackData(sendTrackData), mDebugOutput(debugOutput) {}
41+
TPCInterpolationDPL(std::shared_ptr<o2::globaltracking::DataRequest> dr, o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap, std::shared_ptr<o2::base::GRPGeomRequest> gr, bool useMC,
42+
bool processITSTPConly, bool sendTrackData, bool debugOutput, bool extDetResid) : mDataRequest(dr), mSources(src), mSourcesMap(srcMap), mGGCCDBRequest(gr), mUseMC(useMC), mProcessITSTPConly(processITSTPConly), mSendTrackData(sendTrackData), mDebugOutput(debugOutput), mExtDetResid(extDetResid) {}
4243
~TPCInterpolationDPL() override = default;
4344
void init(InitContext& ic) final;
4445
void run(ProcessingContext& pc) final;
@@ -58,14 +59,16 @@ class TPCInterpolationDPL : public Task
5859
bool mProcessITSTPConly{false}; ///< should also tracks without outer point (ITS-TPC only) be processed?
5960
bool mProcessSeeds{false}; ///< process not only most complete track, but also its shorter parts
6061
bool mDebugOutput{false}; ///< add more information to the output (track points of ITS, TRD and TOF)
62+
bool mExtDetResid{true}; ///< produce unbinned residuals for external detectors
6163
bool mSendTrackData{false}; ///< if true, not only the clusters but also corresponding track data will be sent
6264
uint32_t mSlotLength{600u}; ///< the length of one calibration slot required to calculate max number of tracks per TF
6365
int mMatCorr{2}; ///< the material correction to be used for track interpolation
6466
TStopwatch mTimer;
6567
};
6668

6769
/// create a processor spec
68-
framework::DataProcessorSpec getTPCInterpolationSpec(o2::dataformats::GlobalTrackID::mask_t srcCls, o2::dataformats::GlobalTrackID::mask_t srcVtx, o2::dataformats::GlobalTrackID::mask_t srcTrk, o2::dataformats::GlobalTrackID::mask_t srcTrkMap, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput);
70+
framework::DataProcessorSpec getTPCInterpolationSpec(o2::dataformats::GlobalTrackID::mask_t srcCls, o2::dataformats::GlobalTrackID::mask_t srcVtx, o2::dataformats::GlobalTrackID::mask_t srcTrk,
71+
o2::dataformats::GlobalTrackID::mask_t srcTrkMap, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput, bool extDetResid);
6972

7073
} // namespace tpc
7174
} // namespace o2

0 commit comments

Comments
 (0)