Skip to content

Commit 75a21b1

Browse files
authored
Merge pull request #1 from alibuild/alibot-cleanup-15094
Please consider the following formatting changes to #15094
2 parents 96327f9 + c619284 commit 75a21b1

File tree

2 files changed

+35
-36
lines changed

2 files changed

+35
-36
lines changed

PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
#include "PWGDQ/Core/MixingLibrary.h"
2424
#include "PWGDQ/Core/VarManager.h"
2525
#include "PWGDQ/DataModel/ReducedInfoTables.h"
26-
#include <DetectorsVertexing/PVertexer.h>
27-
#include <ReconstructionDataFormats/Track.h>
28-
#include <Common/Core/trackUtilities.h>
2926

3027
#include "Common/Core/PID/PIDTOFParamService.h"
3128
#include "Common/Core/TableHelper.h"
@@ -739,8 +736,11 @@ struct AnalysisTrackSelection {
739736
///
740737
auto track = tracks.rawIteratorAt(assoc.trackId());
741738
auto evFromTrack = events.rawIteratorAt(track.collisionId());
742-
if (!evFromTrack.isEventSelected_bit(0)) { trackSel(0); continue;}
743-
739+
if (!evFromTrack.isEventSelected_bit(0)) {
740+
trackSel(0);
741+
continue;
742+
}
743+
744744
// cout << "Processing association: event global index " << event.globalIndex() << endl;
745745
VarManager::ResetValues(VarManager::kNTFWiseVariables, VarManager::kNBarrelTrackVariables);
746746
// fill event information which might be needed in histograms/cuts that combine track and event properties
@@ -752,8 +752,8 @@ struct AnalysisTrackSelection {
752752

753753
VarManager::FillTrack<TTrackFillMap>(track);
754754
// compute quantities which depend on the associated collision, such as DCA
755-
if(track.collisionId() != event.globalIndex())
756-
VarManager::FillTrackCollision<TTrackFillMap>(track, event);
755+
if (track.collisionId() != event.globalIndex())
756+
VarManager::FillTrackCollision<TTrackFillMap>(track, event);
757757
// cout << "Filled track observables for association" << endl;
758758

759759
bool isCorrectAssoc = false;
@@ -1515,7 +1515,6 @@ struct AnalysisSameEventPairing {
15151515
cout << "AnalysisSameEventPairing::init() completed" << endl;
15161516
}
15171517

1518-
15191518
void initParamsFromCCDB(uint64_t timestamp, bool withTwoProngFitter = true)
15201519
{
15211520
cout << "AnalysisSameEventPairing::initParamsFromCCDB() called for timestamp " << timestamp << endl;

PWGDQ/Tasks/tableReader_withAssoc_direct.cxx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,18 @@
2222
#include "PWGDQ/Core/VarManager.h"
2323
#include "PWGDQ/DataModel/ReducedInfoTables.h"
2424

25+
#include "Common/CCDB/TriggerAliases.h"
26+
#include "Common/CCDB/ctpRateFetcher.h"
2527
#include "Common/Core/PID/PIDTOFParamService.h"
2628
#include "Common/Core/TableHelper.h"
29+
#include "Common/Core/Zorro.h"
2730
#include "Common/DataModel/CollisionAssociationTables.h"
2831
#include "Common/DataModel/EventSelection.h"
2932
#include "Common/DataModel/McCollisionExtra.h"
3033
#include "Common/DataModel/Multiplicity.h"
3134
#include "Common/DataModel/TrackSelectionTables.h"
3235
#include <Common/Core/trackUtilities.h>
3336

34-
#include "Common/CCDB/TriggerAliases.h"
35-
#include "Common/CCDB/ctpRateFetcher.h"
36-
#include "Common/Core/Zorro.h"
37-
38-
3937
#include "CCDB/BasicCCDBManager.h"
4038
#include "DataFormatsParameters/GRPMagField.h"
4139
#include "DataFormatsParameters/GRPObject.h"
@@ -242,7 +240,7 @@ void PrintBitMap(TMap map, int nbits)
242240

243241
// Enum containing the ordering of statistics histograms to be written in the QA file
244242
enum ZorroStatHist {
245-
kStatsZorroInfo=0,
243+
kStatsZorroInfo = 0,
246244
kStatsZorroSel
247245
};
248246

@@ -270,14 +268,14 @@ struct AnalysisEventSelection {
270268
Configurable<uint64_t> fBcTolerance{"cfgBcTolerance", 100, "Number of BCs of margin for software triggers"};
271269
Configurable<std::string> fConfigCcdbPathZorro{"ccdb-path-zorro", "/Users/m/mpuccio/EventFiltering/OTS/Chunked/", "base path to the ccdb object for zorro"};
272270
} fConfigZorro;
273-
274-
// RCT selection
271+
272+
// RCT selection
275273
struct : ConfigurableGroup {
276274
Configurable<bool> fConfigUseRCT{"cfgUseRCT", false, "Enable event selection with RCT flags"};
277275
Configurable<std::string> fConfigRCTLabel{"cfgRCTLabel", "CBT", "RCT flag labels : CBT, CBT_hadronPID, CBT_electronPID, CBT_calo, CBT_muon, CBT_muon_glo"};
278276
} fConfigRCT;
279277

280-
// CCDB connection configurables
278+
// CCDB connection configurables
281279
struct : ConfigurableGroup {
282280
Configurable<std::string> fConfigCcdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
283281
Configurable<std::string> fConfigCcdbPathTPC{"ccdb-path-tpc", "Users/z/zhxiong/TPCPID/PostCalib", "base path to the ccdb object"};
@@ -287,7 +285,7 @@ struct AnalysisEventSelection {
287285
Configurable<std::string> fZShiftPath{"zShiftPath", "Users/m/mcoquet/ZShift", "CCDB path for z shift to apply to forward tracks"};
288286
Configurable<std::string> fConfigGrpMagPathRun2{"grpmagPathRun2", "GLO/GRP/GRP", "CCDB path of the GRPObject (Usage for Run 2)"};
289287
} fConfigCCDB;
290-
288+
291289
// TPC postcalibration related options
292290
struct : ConfigurableGroup {
293291
Configurable<bool> fConfigComputeTPCpostCalib{"cfgTPCpostCalib", false, "If true, compute TPC post-calibrated n-sigmas(electrons, pions, protons)"};
@@ -298,7 +296,7 @@ struct AnalysisEventSelection {
298296
Configurable<bool> fConfigSaveElectronSample{"cfgSaveElectronSample", false, "If true, only save electron sample"};
299297
} fConfigPostCalibTPC;
300298

301-
Configurable<bool> fIsRun2{"cfgIsRun2", false, "Whether we analyze Run-2 or Run-3 data"};
299+
Configurable<bool> fIsRun2{"cfgIsRun2", false, "Whether we analyze Run-2 or Run-3 data"};
302300

303301
// RCT flag checker
304302
o2::aod::rctsel::RCTFlagsChecker rctChecker{"CBT"};
@@ -365,7 +363,7 @@ struct AnalysisEventSelection {
365363
fStatsList->SetOwner(kTRUE);
366364
TH2D* histZorroInfo = new TH2D("ZorroInfo", "Zorro information", 1, -0.5, 0.5, 1, -0.5, 0.5);
367365
fStatsList->AddAt(histZorroInfo, kStatsZorroInfo);
368-
366+
369367
TH2D* histZorroSel = new TH2D("ZorroSel", "trigger of interested", 1, -0.5, 0.5, 1, -0.5, 0.5);
370368
fStatsList->AddAt(histZorroSel, kStatsZorroSel);
371369

@@ -385,7 +383,7 @@ struct AnalysisEventSelection {
385383
fCCDB->setLocalObjectValidityChecking();
386384
fCCDB->setCreatedNotAfter(fConfigCCDB.fConfigNoLaterThan.value);
387385
fCCDBApi.init(fConfigCCDB.fConfigCcdbUrl.value);
388-
386+
389387
if (!o2::base::GeometryManager::isGeometryLoaded()) {
390388
fCCDB->get<TGeoManager>(fConfigCCDB.fConfigGeoPath.value);
391389
}
@@ -401,8 +399,8 @@ struct AnalysisEventSelection {
401399
void runEventSelection(TEvents const& events, BCsWithTimestamps const& bcs)
402400
{
403401
cout << "AnalysisEventSelection::runEventSelection() called with " << events.size() << " events and " << bcs.size() << " BCs" << endl;
404-
405-
if (bcs.size() > 0 && fCurrentRun != bcs.begin().runNumber()) {
402+
403+
if (bcs.size() > 0 && fCurrentRun != bcs.begin().runNumber()) {
406404
if (fConfigPostCalibTPC.fConfigComputeTPCpostCalib) {
407405
auto calibList = fCCDB->getForTimeStamp<TList>(fConfigCCDB.fConfigCcdbPathTPC.value, bcs.begin().timestamp());
408406
VarManager::SetCalibrationObject(VarManager::kTPCElectronMean, calibList->FindObject("mean_map_electron"));
@@ -476,7 +474,7 @@ struct AnalysisEventSelection {
476474
if (fConfigQA) {
477475
fHistMan->FillHistClass("Event_BeforeCuts", VarManager::fgValues);
478476
}
479-
477+
480478
if (fConfigZorro.fConfigRunZorro) {
481479
zorro.setBaseCCDBPath(fConfigZorro.fConfigCcdbPathZorro.value);
482480
zorro.setBCtolerance(fConfigZorro.fBcTolerance);
@@ -490,17 +488,17 @@ struct AnalysisEventSelection {
490488
bool zorroSel = zorro.isSelected(bc.globalBC(), fConfigZorro.fBcTolerance, reinterpret_cast<TH2D*>(fStatsList->At(kStatsZorroSel)));
491489
if (fConfigZorro.fConfigRunZorroSel && (!zorroSel)) {
492490
continue;
493-
}
494-
} else {
495-
496-
if (!fEventCut->IsSelected(VarManager::fgValues) || (fConfigRCT.fConfigUseRCT.value && !rctChecker(event))) {
491+
}
492+
} else {
493+
494+
if (!fEventCut->IsSelected(VarManager::fgValues) || (fConfigRCT.fConfigUseRCT.value && !rctChecker(event))) {
497495
continue;
498-
}
499-
}
500-
496+
}
497+
}
498+
501499
decision = true;
502500
if (fConfigQA) {
503-
fHistMan->FillHistClass("Event_AfterCuts", VarManager::fgValues);
501+
fHistMan->FillHistClass("Event_AfterCuts", VarManager::fgValues);
504502
}
505503

506504
fSelMap[event.globalIndex()] = decision;
@@ -758,17 +756,19 @@ struct AnalysisTrackSelection {
758756
///
759757
auto track = tracks.rawIteratorAt(assoc.trackId());
760758
auto evFromTrack = events.rawIteratorAt(track.collisionId());
761-
if (!evFromTrack.isEventSelected_bit(0)) { trackSel(0); continue;}
762-
759+
if (!evFromTrack.isEventSelected_bit(0)) {
760+
trackSel(0);
761+
continue;
762+
}
763763

764764
VarManager::ResetValues(VarManager::kNTFWiseVariables, VarManager::kNBarrelTrackVariables);
765765
// fill event information which might be needed in histograms/cuts that combine track and event properties
766766
VarManager::FillEvent<TEventFillMap>(event);
767767

768768
VarManager::FillTrack<TTrackFillMap>(track);
769769
// compute quantities which depend on the associated collision, such as DCA
770-
if(track.collisionId() != event.globalIndex())
771-
VarManager::FillTrackCollision<TTrackFillMap>(track, event);
770+
if (track.collisionId() != event.globalIndex())
771+
VarManager::FillTrackCollision<TTrackFillMap>(track, event);
772772

773773
if (fConfigQA)
774774
fHistMan->FillHistClass("AssocsBarrel_BeforeCuts", VarManager::fgValues);

0 commit comments

Comments
 (0)