Skip to content

Commit 6b27a5e

Browse files
committed
Please consider the following formatting changes
1 parent 9e05467 commit 6b27a5e

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

DPG/Tasks/AOTTrack/qaMatchEff.cxx

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,27 @@
1919
//
2020
// Internal version number: 6.3
2121
//
22+
#include "Common/Core/RecoDecay.h"
2223
#include "Common/Core/TrackSelection.h"
2324
#include "Common/Core/TrackSelectionDefaults.h"
24-
#include "Common/DataModel/EventSelection.h"
2525
#include "Common/DataModel/Centrality.h"
26-
#include "Common/DataModel/TrackSelectionTables.h"
26+
#include "Common/DataModel/EventSelection.h"
2727
#include "Common/DataModel/PIDResponse.h"
28-
#include "CommonConstants/MathConstants.h"
28+
#include "Common/DataModel/TrackSelectionTables.h"
29+
2930
#include "CCDB/BasicCCDBManager.h"
30-
#include "Common/Core/RecoDecay.h"
31+
#include "CommonConstants/MathConstants.h"
3132
//
3233
#include "Framework/AnalysisTask.h"
3334
#include "Framework/RunningWorkflowInfo.h"
3435
#include "Framework/runDataProcessing.h"
3536
//
37+
#include <TPDGCode.h>
38+
39+
#include <cmath>
40+
#include <set>
3641
#include <string>
3742
#include <vector>
38-
#include <set>
39-
#include <cmath>
40-
#include <TPDGCode.h>
4143
//
4244
namespace extConfPar
4345
{
@@ -147,21 +149,21 @@ struct qaMatchEff {
147149
// TRD presence
148150
Configurable<int> isTRDThere{"isTRDThere", 2, "Integer to turn the presence of TRD off, on, don't care (0,1,anything else)"};
149151
Configurable<int> isTOFThere{"isTOFThere", 2, "Integer to turn the presence of TOF off, on, don't care (0,1,anything else)"};
150-
152+
151153
Configurable<bool> isitMC{"isitMC", false, "Reading MC files, data if false"};
152154
Configurable<bool> doDebug{"doDebug", false, "Flag of debug information"};
153155
// Histogram configuration
154-
156+
155157
// histos bins
156158
Configurable<int> etaBins{"eta-bins", 40, "Number of eta bins"};
157159
Configurable<int> phiBins{"phi-bins", 18, "Number of phi bins"};
158160
Configurable<int> qoptBins{"qopt-bins", 500, "Number of Q/pt bins"};
159-
161+
160162
// special histo, few particles explicitly stored, then pdg>3000
161163
Configurable<int> pdgBins{"pdg-bins", 14, "Number of pdg values counted"};
162-
164+
163165
// histo axes
164-
166+
165167
ConfigurableAxis ptBins{"ptBins", {100, 0.f, 20.f}, "pT binning"};
166168
ConfigurableAxis XBins{"XBins", {400, -2.f, 2.f}, "X binning"};
167169
ConfigurableAxis ZBins{"ZBins", {400, -20.f, 20.f}, "Z binning"};
@@ -1606,9 +1608,11 @@ struct qaMatchEff {
16061608
histos.get<TH1>(HIST("MC/control/etahist_diff"))->Fill(mcpart.eta() - track.eta());
16071609
auto delta = RecoDecay::constrainAngle(mcpart.phi() - track.phi());
16081610
if (delta > o2::constants::math::PI) {
1609-
delta -= o2::constants::math::TwoPI;}
1611+
delta -= o2::constants::math::TwoPI;
1612+
}
16101613
if (delta < o2::constants::math::PI) {
1611-
delta += o2::constants::math::TwoPI;}
1614+
delta += o2::constants::math::TwoPI;
1615+
}
16121616
histos.get<TH1>(HIST("MC/control/phihist_diff"))->Fill(delta);
16131617
}
16141618

@@ -1683,7 +1687,7 @@ struct qaMatchEff {
16831687
if (makethn) {
16841688
if constexpr (IS_MC) {
16851689
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1686-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1690+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
16871691
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
16881692
} else {
16891693
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1700,7 +1704,7 @@ struct qaMatchEff {
17001704
if (makethn) {
17011705
if constexpr (IS_MC) {
17021706
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1703-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1707+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
17041708
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
17051709
} else {
17061710
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1717,7 +1721,7 @@ struct qaMatchEff {
17171721
if (makethn) {
17181722
if constexpr (IS_MC) {
17191723
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1720-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1724+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
17211725
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
17221726
} else {
17231727
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1734,7 +1738,7 @@ struct qaMatchEff {
17341738
if (makethn) {
17351739
if constexpr (IS_MC) {
17361740
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1737-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1741+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
17381742
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
17391743
} else {
17401744
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1751,7 +1755,7 @@ struct qaMatchEff {
17511755
if (makethn) {
17521756
if constexpr (IS_MC) {
17531757
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1754-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1758+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
17551759
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
17561760
} else {
17571761
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1768,7 +1772,7 @@ struct qaMatchEff {
17681772
if (makethn) {
17691773
if constexpr (IS_MC) {
17701774
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1771-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1775+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
17721776
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
17731777
} else {
17741778
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1785,7 +1789,7 @@ struct qaMatchEff {
17851789
if (makethn) {
17861790
if constexpr (IS_MC) {
17871791
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1788-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1792+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
17891793
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
17901794
} else {
17911795
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1802,7 +1806,7 @@ struct qaMatchEff {
18021806
if (makethn) {
18031807
if constexpr (IS_MC) {
18041808
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1805-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1809+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
18061810
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
18071811
} else {
18081812
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1819,7 +1823,7 @@ struct qaMatchEff {
18191823
if (makethn) {
18201824
if constexpr (IS_MC) {
18211825
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1822-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1826+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
18231827
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
18241828
} else {
18251829
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1836,7 +1840,7 @@ struct qaMatchEff {
18361840
if (makethn) {
18371841
if constexpr (IS_MC) {
18381842
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1839-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1843+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
18401844
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
18411845
} else {
18421846
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -1853,7 +1857,7 @@ struct qaMatchEff {
18531857
if (makethn) {
18541858
if constexpr (IS_MC) {
18551859
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
1856-
if (siPDGCode == PDG_t::kPiPlus|| siPDGCode == PDG_t::kKPlus) // pions and kaons together
1860+
if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus) // pions and kaons together
18571861
histos.fill(HIST("MC/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), 10, signOfTrack, hasdet);
18581862
} else {
18591863
histos.fill(HIST("data/sparse/thnsforfrac"), track.dcaXY(), track.dcaZ(), trackPt, track.eta(), sayPrim, track.phi(), specind, signOfTrack, hasdet);
@@ -3357,7 +3361,7 @@ struct qaMatchEff {
33573361
if (doDebug)
33583362
LOGF(info, "Event selection not passed, skipping...");
33593363
return;
3360-
}
3364+
}
33613365
fillHistograms<true>(tracks, mcParticles, mcParticles); /// 3rd argument non-sense in this case
33623366
fillGeneralHistos<true>(collision);
33633367
}
@@ -3460,7 +3464,7 @@ struct qaMatchEff {
34603464
if (doDebug)
34613465
LOGF(info, "Event selection not passed, skipping...");
34623466
return;
3463-
}
3467+
}
34643468
fillHistograms<false>(tracks, tracks, tracks); // 2nd and 3rd arguments not used in this case
34653469
fillGeneralHistos<false>(collision);
34663470
}
@@ -3484,4 +3488,3 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
34843488
return WorkflowSpec{
34853489
adaptAnalysisTask<qaMatchEff>(cfgc, TaskName{"qa-match-eff"})};
34863490
}
3487-

0 commit comments

Comments
 (0)