Skip to content

Commit c6d03aa

Browse files
committed
discard code for Q vector correction in DQ framework
1 parent 6c76cd4 commit c6d03aa

4 files changed

Lines changed: 2 additions & 75 deletions

File tree

PWGDQ/Core/VarManager.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ int VarManager::fgCalibrationType = 0; // 0 - no calibration, 1 -
7676
bool VarManager::fgUseInterpolatedCalibration = true; // use interpolated calibration histograms (default: true)
7777
int VarManager::fgEfficiencyType = 0; // type of efficiency to be applied, default is no efficiency
7878
TObject* VarManager::fgEfficiencyHist = nullptr; // histogram for efficiency
79-
TH3F* VarManager::fgObjQvec = nullptr;
80-
bool VarManager::fgApplyQVectorCorrection = false;
8179

8280
//__________________________________________________________________
8381
VarManager::VarManager() : TObject()

PWGDQ/Core/VarManager.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,12 +1549,6 @@ class VarManager : public TObject
15491549
fgEOR = eor;
15501550
}
15511551

1552-
static void SetEventQVectorCorrection(TH3F* qvec)
1553-
{
1554-
fgObjQvec = qvec;
1555-
fgApplyQVectorCorrection = true;
1556-
}
1557-
15581552
public:
15591553
VarManager();
15601554
~VarManager() override;
@@ -1615,8 +1609,6 @@ class VarManager : public TObject
16151609

16161610
static int fgEfficiencyType; // type of efficiency correction to apply
16171611
static TObject* fgEfficiencyHist; // histogram for efficiency correction
1618-
static TH3F* fgObjQvec;
1619-
static bool fgApplyQVectorCorrection;
16201612

16211613
VarManager& operator=(const VarManager& c);
16221614
VarManager(const VarManager& c);
@@ -6085,18 +6077,10 @@ void VarManager::FillPairVn(T1 const& t1, T2 const& t2, float* values)
60856077
float Q2Y0A = values[kQ2Y0A] * values[kMultA];
60866078
float nNorm = values[kMultA];
60876079

6088-
int centBin = static_cast<int>(values[kCentFT0C]) + 1; // centrality bin
6089-
int detIdx = 6; // TPC all
6090-
EventPlaneHelper epHelper;
60916080
// checkTrack(t1);
60926081
if (isSelectedinTPC(t1) && values[kAmbi1] > 0) {
60936082
float qx1 = t1.pt() * TMath::Cos(2. * t1.phi());
60946083
float qy1 = t1.pt() * TMath::Sin(2. * t1.phi());
6095-
if (fgApplyQVectorCorrection) {
6096-
epHelper.DoRecenter(qx1, qy1, fgObjQvec->GetBinContent(centBin, 1, detIdx + 1), fgObjQvec->GetBinContent(centBin, 2, detIdx + 1));
6097-
epHelper.DoTwist(qx1, qy1, fgObjQvec->GetBinContent(centBin, 3, detIdx + 1), fgObjQvec->GetBinContent(centBin, 4, detIdx + 1));
6098-
epHelper.DoRescale(qx1, qy1, fgObjQvec->GetBinContent(centBin, 5, detIdx + 1), fgObjQvec->GetBinContent(centBin, 6, detIdx + 1));
6099-
}
61006084
Q2X0A = Q2X0A - qx1;
61016085
Q2Y0A = Q2Y0A - qy1;
61026086
nNorm = nNorm - 1.;
@@ -6105,11 +6089,6 @@ void VarManager::FillPairVn(T1 const& t1, T2 const& t2, float* values)
61056089
if (isSelectedinTPC(t2) && values[kAmbi2] > 0) {
61066090
float qx2 = t2.pt() * TMath::Cos(2. * t2.phi());
61076091
float qy2 = t2.pt() * TMath::Sin(2. * t2.phi());
6108-
if (fgApplyQVectorCorrection) {
6109-
epHelper.DoRecenter(qx2, qy2, fgObjQvec->GetBinContent(centBin, 1, detIdx + 1), fgObjQvec->GetBinContent(centBin, 2, detIdx + 1));
6110-
epHelper.DoTwist(qx2, qy2, fgObjQvec->GetBinContent(centBin, 3, detIdx + 1), fgObjQvec->GetBinContent(centBin, 4, detIdx + 1));
6111-
epHelper.DoRescale(qx2, qy2, fgObjQvec->GetBinContent(centBin, 5, detIdx + 1), fgObjQvec->GetBinContent(centBin, 6, detIdx + 1));
6112-
}
61136092
Q2X0A = Q2X0A - qx2;
61146093
Q2Y0A = Q2Y0A - qy2;
61156094
nNorm = nNorm - 1.;

PWGDQ/Tasks/tableReader_withAssoc.cxx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,6 @@ struct AnalysisSameEventPairing {
13051305
o2::base::MatLayerCylSet* fLUT = nullptr;
13061306
TH1D* ResoFlowSP = nullptr;
13071307
TH1D* ResoFlowEP = nullptr;
1308-
TH3F* qvecObj = nullptr;
13091308
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
13101309

13111310
OutputObj<THashList> fOutputList{"output"};
@@ -1340,8 +1339,6 @@ struct AnalysisSameEventPairing {
13401339
Configurable<std::string> GrpLhcIfPath{"grplhcif", "GLO/Config/GRPLHCIF", "Path on the CCDB for the GRPLHCIF object"};
13411340
Configurable<std::string> efficiencyPath{"effHistPath", "Users/z/zhxiong/efficiency", "Path on the CCDB for the efficiency histograms"};
13421341
Configurable<std::string> flowPath{"flowPath", "Users/y/yiping/FlowResolution", "Path to the flow resolution object"};
1343-
Configurable<std::string> flowPathLocal{"flowPathLocal", "/lustre/alice/users/ywang/calib/FlowReso.root", "Path to the flow resolution object in the local cache"};
1344-
Configurable<std::string> QvecCalibPath{"cfgQvecCalibPath", "Users/j/junlee/Qvector/Pass5/QvecCalib/v2", "Path to the q vector calibration object"};
13451342
} fConfigCCDB;
13461343

13471344
struct : ConfigurableGroup {
@@ -1361,8 +1358,6 @@ struct AnalysisSameEventPairing {
13611358
Configurable<bool> useEfficiencyWeighting{"cfgUseEfficiencyWeighting", false, "Apply efficiency weighting to the pairs from CCDB"};
13621359
Configurable<int> efficiencyType{"cfgEfficiencyType", 0, "Type of efficiency to apply from CCDB: 0 no efficiency, 1 pt-cent-costhetastar"};
13631360
Configurable<bool> useFlowReso{"cfgUseFlowReso", false, "Use remote flow information from CCDB"};
1364-
Configurable<bool> useQvecCalib{"cfgUseQvecCalib", false, "Use flow correction factors for Q-vector recalibration when removing the daughter"};
1365-
Configurable<bool> useCorrectionForRun{"cfgUseCorrectionForRun", false, "Apply run-by-run correction factors to the flow vectors"};
13661361
} fConfigOptions;
13671362
struct : ConfigurableGroup {
13681363
Configurable<bool> applyBDT{"applyBDT", false, "Flag to apply ML selections"};
@@ -1829,15 +1824,6 @@ struct AnalysisSameEventPairing {
18291824
LOGF(fatal, "Flow resolution histograms not available in CCDB at timestamp=%llu", timestamp);
18301825
}
18311826
}
1832-
1833-
if (fConfigOptions.useQvecCalib) {
1834-
TString pathQvecCalib = fConfigCCDB.QvecCalibPath.value;
1835-
if (fConfigOptions.useCorrectionForRun) {
1836-
qvecObj = fCCDB->getForRun<TH3F>(pathQvecCalib.Data(), runNumber);
1837-
} else {
1838-
qvecObj = fCCDB->getForTimeStamp<TH3F>(pathQvecCalib.Data(), timestamp);
1839-
}
1840-
}
18411827
}
18421828

18431829
// Template function to run same event pairing (barrel-barrel, muon-muon, barrel-muon)
@@ -1949,12 +1935,6 @@ struct AnalysisSameEventPairing {
19491935
LOGF(fatal, "Flow resolution histograms are not available, cannot fill flow variables!");
19501936
}
19511937
VarManager::FillEventFlowResoFactor(ResoFlowSP, ResoFlowEP);
1952-
if (fConfigOptions.useQvecCalib) {
1953-
if (qvecObj == nullptr) {
1954-
LOGF(fatal, "Q-vector calibration object is not available, cannot fill flow variables!");
1955-
}
1956-
VarManager::SetEventQVectorCorrection(qvecObj);
1957-
}
19581938
}
19591939

19601940
bool isFirst = true;

PWGDQ/Tasks/tableReader_withAssoc_direct.cxx

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,8 +1289,6 @@ struct AnalysisSameEventPairing {
12891289
o2::base::MatLayerCylSet* fLUT = nullptr;
12901290
TH1D* ResoFlowSP = nullptr;
12911291
TH1D* ResoFlowEP = nullptr;
1292-
TH3F* qvecObj = nullptr;
1293-
TString pathQvecCalib;
12941292
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
12951293

12961294
OutputObj<THashList> fOutputList{"output"};
@@ -1326,8 +1324,6 @@ struct AnalysisSameEventPairing {
13261324
Configurable<float> fConfigMiniTreeMinMass{"cfgMiniTreeMinMass", 2, "Min. mass cut for minitree"};
13271325
Configurable<float> fConfigMiniTreeMaxMass{"cfgMiniTreeMaxMass", 5, "Max. mass cut for minitree"};
13281326
Configurable<bool> useFlowReso{"cfgUseFlowReso", false, "Use remote flow information from CCDB"};
1329-
Configurable<bool> useQvecCalib{"cfgUseQvecCalib", false, "Use flow correction factors for Q-vector recalibration when removing the daughter"};
1330-
Configurable<bool> useCorrectionForRun{"cfgUseCorrectionForRun", false, "Apply run-by-run correction factors to the flow vectors"};
13311327
} fConfigOptions;
13321328

13331329
struct : ConfigurableGroup {
@@ -1336,8 +1332,6 @@ struct AnalysisSameEventPairing {
13361332
Configurable<std::string> lutPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"};
13371333
Configurable<std::string> geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
13381334
Configurable<std::string> flowPath{"flowPath", "Users/y/yiping/FlowResolution", "Path to the flow resolution object"};
1339-
Configurable<std::string> flowPathLocal{"flowPathLocal", "/lustre/alice/users/ywang/calib/FlowReso.root", "Path to the flow resolution object in the local cache"};
1340-
Configurable<std::string> QvecCalibPath{"cfgQvecCalibPath", "Users/j/junlee/Qvector/Pass5/QvecShift/v2", "Path to the q vector calibration object"};
13411335
} fConfigCCDB;
13421336

13431337
Service<o2::ccdb::BasicCCDBManager> fCCDB;
@@ -1548,15 +1542,9 @@ struct AnalysisSameEventPairing {
15481542
dqhistograms::AddHistogramsFromJSON(fHistMan, fConfigOptions.fConfigAddJSONHistograms.value.c_str()); // ad-hoc histograms via JSON
15491543
VarManager::SetUseVars(fHistMan->GetUsedVars()); // provide the list of required variables so that VarManager knows what to fill
15501544
fOutputList.setObject(fHistMan->GetMainHistogramList());
1551-
1552-
if (fConfigOptions.useQvecCalib) {
1553-
string tmppathQvecCalib;
1554-
getTaskOptionValue<string>(context, "q-vectors-table", "cfgQvecCalibPath", tmppathQvecCalib, false);
1555-
pathQvecCalib = tmppathQvecCalib;
1556-
}
15571545
}
15581546

1559-
void initParamsFromCCDB(uint64_t timestamp, int runnumber, bool withTwoProngFitter = true)
1547+
void initParamsFromCCDB(uint64_t timestamp, bool withTwoProngFitter = true)
15601548
{
15611549
if (fConfigOptions.useRemoteField.value) {
15621550
o2::parameters::GRPMagField* grpmag = fCCDB->getForTimeStamp<o2::parameters::GRPMagField>(fConfigCCDB.grpMagPath, timestamp);
@@ -1602,18 +1590,6 @@ struct AnalysisSameEventPairing {
16021590
LOGF(fatal, "Flow resolution histograms not available in CCDB at timestamp=%llu", timestamp);
16031591
}
16041592
}
1605-
1606-
if (fConfigOptions.useQvecCalib) {
1607-
TString ccdbPathQvecCalib = Form("%s/v2", pathQvecCalib.Data());
1608-
if (fConfigOptions.useCorrectionForRun) {
1609-
qvecObj = fCCDB->getForRun<TH3F>(ccdbPathQvecCalib.Data(), runnumber); // get the object with run dependence if correction for run is needed
1610-
} else {
1611-
qvecObj = fCCDB->getForTimeStamp<TH3F>(ccdbPathQvecCalib.Data(), timestamp); // get the object without time dependence if no correction for run is needed
1612-
}
1613-
if (qvecObj == nullptr) {
1614-
LOGF(fatal, "Q-vector calibration object not available in CCDB at timestamp=%llu", timestamp);
1615-
}
1616-
}
16171593
}
16181594

16191595
template <typename Events, typename TTracks, typename Tracks>
@@ -1676,7 +1652,7 @@ struct AnalysisSameEventPairing {
16761652
return;
16771653
}
16781654
if (fCurrentRun != bcs.begin().runNumber()) {
1679-
initParamsFromCCDB(bcs.begin().timestamp(), bcs.begin().runNumber(), TTwoProngFitter);
1655+
initParamsFromCCDB(bcs.begin().timestamp(), TTwoProngFitter);
16801656
fCurrentRun = bcs.begin().runNumber();
16811657
}
16821658

@@ -1737,12 +1713,6 @@ struct AnalysisSameEventPairing {
17371713
LOGF(fatal, "Flow resolution histograms are not available, cannot fill flow variables!");
17381714
}
17391715
VarManager::FillEventFlowResoFactor(ResoFlowSP, ResoFlowEP);
1740-
if (fConfigOptions.useQvecCalib) {
1741-
if (qvecObj == nullptr) {
1742-
LOGF(fatal, "Q-vector calibration object is not available, cannot fill flow variables!");
1743-
}
1744-
VarManager::SetEventQVectorCorrection(qvecObj);
1745-
}
17461716
}
17471717

17481718
for (auto& [a1, a2] : o2::soa::combinations(groupedAssocs, groupedAssocs)) {

0 commit comments

Comments
 (0)