Skip to content

Commit 7589d1d

Browse files
committed
Please consider the following formatting changes
1 parent b24c847 commit 7589d1d

2 files changed

Lines changed: 165 additions & 173 deletions

File tree

‎PWGCF/Flow/TableProducer/zdcQVectors.cxx‎

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ struct ZdcQVectors {
154154
Configurable<std::vector<double>> cfgEvSelsMultPv{"cfgEvSelsMultPv", std::vector<double>{2223.49, -75.1444, 0.963572, -0.00570399, 1.34877e-05, 3790.99, -137.064, 2.13044, -0.017122, 5.82834e-05}, "Multiplicity cuts (PV) first 5 parameters cutLOW last 5 cutHIGH (Default is +-2sigma pass5) "};
155155
Configurable<std::vector<double>> cfgEvSelsMult{"cfgEvSelsMult", std::vector<double>{1301.56, -41.4615, 0.478224, -0.00239449, 4.46966e-06, 2967.6, -102.927, 1.47488, -0.0106534, 3.28622e-05}, "Multiplicity cuts (Global) first 5 parameters cutLOW last 5 cutHIGH (Default is +-2sigma pass5) "};
156156

157-
//Track selection DCA cut
157+
// Track selection DCA cut
158158
std::unique_ptr<TF1> fDCACut = std::make_unique<TF1>("fDCACut", "0.0105 + 0.035 / TMath::Power(x,1.1)", 0, 100);
159159

160160
// define my.....
161161
// Filter collisionFilter = nabs(aod::collision::posZ) <;
162162

163163
using UsedCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::CentNGlobals>;
164164
using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
165-
Filter trackFilter = nabs(aod::track::eta) < cfgTrackSelsEta && aod::track::pt > cfgTrackSelsPtmin && aod::track::pt < cfgTrackSelsPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && nabs(aod::track::dcaXY) < cfgTrackSelsDCAxy && nabs(aod::track::dcaZ) < cfgTrackSelsDCAz;
165+
Filter trackFilter = nabs(aod::track::eta) < cfgTrackSelsEta && aod::track::pt > cfgTrackSelsPtmin&& aod::track::pt < cfgTrackSelsPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && nabs(aod::track::dcaXY) < cfgTrackSelsDCAxy&& nabs(aod::track::dcaZ) < cfgTrackSelsDCAz;
166166
using UnfilteredTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA>;
167167
using UsedTracks = soa::Filtered<UnfilteredTracks>;
168168

@@ -211,7 +211,7 @@ struct ZdcQVectors {
211211

212212
// keep track of calibration histos for each given step and iteration
213213
struct Calib {
214-
std::vector<TList*> calibList = std::vector<TList*>(5, nullptr); // [0] Enerfy cal, [1] vmean, [2] recentering, [3] timestamp, [4] recenter after shift Correction
214+
std::vector<TList*> calibList = std::vector<TList*>(5, nullptr); // [0] Enerfy cal, [1] vmean, [2] recentering, [3] timestamp, [4] recenter after shift Correction
215215
std::vector<bool> calibfilesLoaded = std::vector<bool>(5, false);
216216

217217
TProfile3D* shiftprofileC = nullptr;
@@ -230,7 +230,7 @@ struct ZdcQVectors {
230230

231231
enum FillType {
232232
kBefore,
233-
kAfter,
233+
kAfter,
234234
kAfterShift
235235
};
236236

@@ -277,7 +277,7 @@ struct ZdcQVectors {
277277
registry.add<TH2>(Form("QA/before/hSPplaneA"), "hSPplaneA", kTH2D, {axisPsiA, axisCent});
278278
registry.add<TH2>(Form("QA/before/hSPplaneC"), "hSPplaneC", kTH2D, {axisPsiC, axisCent});
279279
registry.add<TH2>(Form("QA/before/hSPplaneFull"), "hSPplaneFull", kTH2D, {{100, -PI, PI}, axisCent});
280-
if(!cfgCCDBdir_ShiftRec.value.empty()){
280+
if (!cfgCCDBdir_ShiftRec.value.empty()) {
281281
registry.addClone("QA/before/", "QA/afterShift/");
282282
}
283283
for (const auto& side : sides) {
@@ -387,8 +387,8 @@ struct ZdcQVectors {
387387
registry.add<TProfile2D>("CutAnalysis/hvertex_vy", "hvertex_vy", kTProfile2D, {{1, 0., 1.}, {nEventSelections + 5, 0, nEventSelections + 5}});
388388
registry.add<TProfile2D>("CutAnalysis/hvertex_vz", "hvertex_vz", kTProfile2D, {{1, 0., 1.}, {nEventSelections + 5, 0, nEventSelections + 5}});
389389
}
390-
391-
if(!cfgCCDBdir_ShiftRec.value.empty()){
390+
391+
if (!cfgCCDBdir_ShiftRec.value.empty()) {
392392
registry.addClone("recentering/before/", "recentering/afterShift/");
393393
}
394394
registry.addClone("recentering/before/", "recentering/after/");
@@ -884,10 +884,9 @@ struct ZdcQVectors {
884884
cal.shiftprofileC = nullptr;
885885
cal.shiftprofileA = nullptr;
886886

887-
cal.atIteration = 0;
887+
cal.atIteration = 0;
888888
}
889889

890-
891890
if (cfgFillHistRegistry && !cfgFillNothing) {
892891
registry.fill(HIST("QA/centrality_before"), cent);
893892
}
@@ -926,18 +925,18 @@ struct ZdcQVectors {
926925
bool isZNChit = true;
927926

928927
for (int i = 0; i < nTowers; ++i) {
929-
if (i < nTowersPerSide && eZN[i] <= 0){
928+
if (i < nTowersPerSide && eZN[i] <= 0) {
930929
isZNAhit = false;
931930
}
932-
if (i >= nTowersPerSide && eZN[i] <= 0){
931+
if (i >= nTowersPerSide && eZN[i] <= 0) {
933932
isZNChit = false;
934933
}
935934
}
936935

937-
if (zdcCol.energyCommonZNA() <= 0){
936+
if (zdcCol.energyCommonZNA() <= 0) {
938937
isZNAhit = false;
939938
}
940-
if (zdcCol.energyCommonZNC() <= 0){
939+
if (zdcCol.energyCommonZNC() <= 0) {
941940
isZNChit = false;
942941
}
943942

@@ -1097,20 +1096,20 @@ struct ZdcQVectors {
10971096
// Load in TList with all recentering histos
10981097
loadCalibrations<kRec>(cfgCCDBDir_Rec.value, timestamp);
10991098

1100-
//If CCDB dir given load recentering for extra step Timestamp
1099+
// If CCDB dir given load recentering for extra step Timestamp
11011100
if (extraTS.cfgCCDBDir_RecenterForTimestamp) {
11021101
loadCalibrations<kTimestamp>(extraTS.cfgCCDBdir_Timestamp.value, timestamp);
11031102
}
11041103

1105-
// If CCDB dir given load recentering after shift correction.
1106-
if(!cfgCCDBdir_ShiftRec.value.empty()){
1104+
// If CCDB dir given load recentering after shift correction.
1105+
if (!cfgCCDBdir_ShiftRec.value.empty()) {
11071106
loadCalibrations<kRecShift>(cfgCCDBdir_ShiftRec.value, timestamp);
11081107
}
11091108

11101109
std::array<double, 4> qRec(q);
11111110

11121111
if (cal.atIteration == 0) {
1113-
if (cal.isSelected && cfgFillHistRegistry && isEventSelected){
1112+
if (cal.isSelected && cfgFillHistRegistry && isEventSelected) {
11141113
fillCommonRegistry<kBefore>(q[0], q[1], q[2], q[3], cal.v, cent, rsTimestamp);
11151114
}
11161115

@@ -1285,21 +1284,21 @@ struct ZdcQVectors {
12851284
double qXcShift = std::hypot(qRec[2], qRec[3]) * std::cos(psiZDCCshift);
12861285
double qYcShift = std::hypot(qRec[2], qRec[3]) * std::sin(psiZDCCshift);
12871286

1288-
if (!cal.calibfilesLoaded[kRecShift]){
1287+
if (!cal.calibfilesLoaded[kRecShift]) {
12891288
if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) {
1290-
fillCommonRegistry<kAfter>(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp);
1291-
registry.fill(HIST("QA/centrality_after"), cent);
1292-
registry.get<TProfile>(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift);
1293-
registry.get<TProfile>(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift);
1294-
registry.get<TProfile>(HIST("QA/after/ZNC_Qx"))->Fill(Form("%d", runnumber), qXcShift);
1295-
registry.get<TProfile>(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qYcShift);
1289+
fillCommonRegistry<kAfter>(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp);
1290+
registry.fill(HIST("QA/centrality_after"), cent);
1291+
registry.get<TProfile>(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift);
1292+
registry.get<TProfile>(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift);
1293+
registry.get<TProfile>(HIST("QA/after/ZNC_Qx"))->Fill(Form("%d", runnumber), qXcShift);
1294+
registry.get<TProfile>(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qYcShift);
12961295
}
12971296

1298-
spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags);
1299-
qRec = {0, 0, 0, 0};
1297+
spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags);
1298+
qRec = {0, 0, 0, 0};
13001299

1301-
cal.lastRunNumber = runnumber;
1302-
return;
1300+
cal.lastRunNumber = runnumber;
1301+
return;
13031302
} else {
13041303
// vector of 4
13051304
corrQxA.clear();
@@ -1311,7 +1310,7 @@ struct ZdcQVectors {
13111310
fillCommonRegistry<kAfter>(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp);
13121311
}
13131312

1314-
for (int it = 1 ; it <= cfgNIterationsAfterShift; it++) {
1313+
for (int it = 1; it <= cfgNIterationsAfterShift; it++) {
13151314
corrQxA.push_back(getCorrection<THnSparse, kRecShift>(names[0][0].Data(), it, 1));
13161315
corrQyA.push_back(getCorrection<THnSparse, kRecShift>(names[0][1].Data(), it, 1));
13171316
corrQxC.push_back(getCorrection<THnSparse, kRecShift>(names[0][2].Data(), it, 1));
@@ -1359,14 +1358,14 @@ struct ZdcQVectors {
13591358
registry.get<TProfile>(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift);
13601359
registry.get<TProfile>(HIST("QA/after/ZNC_Qx"))->Fill(Form("%d", runnumber), qXcShift);
13611360
registry.get<TProfile>(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qYcShift);
1362-
}
1361+
}
13631362

13641363
spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags);
13651364
qRec = {0, 0, 0, 0};
13661365

13671366
cal.lastRunNumber = runnumber;
13681367
return;
1369-
}
1368+
}
13701369

13711370
LOGF(warning, "We return without saving table... -> THis is a problem");
13721371
cal.lastRunNumber = runnumber;

0 commit comments

Comments
 (0)