Skip to content

Commit 3b1e59b

Browse files
clang-format
1 parent f00cbf1 commit 3b1e59b

File tree

2 files changed

+97
-99
lines changed

2 files changed

+97
-99
lines changed

PWGLF/DataModel/LFClusterStudiesTable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//
1212
// Author: Giorgio Alberto Lucia
1313

14-
#include "Framework/AnalysisDataModel.h"
1514
#include "Framework/ASoAHelpers.h"
15+
#include "Framework/AnalysisDataModel.h"
1616

1717
#ifndef PWGLF_DATAMODEL_LFCLUSTERSTUDIESTABLE_H_
1818
#define PWGLF_DATAMODEL_LFCLUSTERSTUDIESTABLE_H_

PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

Lines changed: 96 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,45 @@
1414
//
1515
// Author: Giorgio Alberto Lucia
1616

17-
#include <vector>
18-
#include <utility>
19-
#include <random>
20-
#include <cstdint>
21-
#include <cstring>
22-
#include <unordered_map>
23-
#include <numeric>
24-
25-
#include "Framework/runDataProcessing.h"
26-
#include "Framework/AnalysisTask.h"
27-
#include "Framework/AnalysisDataModel.h"
28-
#include "Framework/ASoAHelpers.h"
29-
#include "ReconstructionDataFormats/Track.h"
30-
#include "Common/DataModel/TrackSelectionTables.h"
31-
#include "Common/Core/TrackSelection.h"
32-
#include "Common/DataModel/Centrality.h"
33-
#include "Common/DataModel/Multiplicity.h"
34-
#include "Common/Core/RecoDecay.h"
35-
#include "Common/Core/trackUtilities.h"
36-
#include "Common/DataModel/EventSelection.h"
17+
#include "PWGLF/DataModel/LFClusterStudiesTable.h"
3718
#include "PWGLF/DataModel/LFStrangenessTables.h"
38-
#include "DetectorsBase/Propagator.h"
39-
#include "DetectorsBase/GeometryManager.h"
40-
#include "DataFormatsParameters/GRPObject.h"
41-
#include "DataFormatsParameters/GRPMagField.h"
42-
#include "CCDB/BasicCCDBManager.h"
4319

4420
#include "Common/Core/PID/PIDTOF.h"
45-
#include "Common/TableProducer/PID/pidTOFBase.h"
4621
#include "Common/Core/PID/TPCPIDResponse.h"
22+
#include "Common/Core/RecoDecay.h"
23+
#include "Common/Core/TrackSelection.h"
24+
#include "Common/Core/trackUtilities.h"
25+
#include "Common/DataModel/Centrality.h"
26+
#include "Common/DataModel/EventSelection.h"
27+
#include "Common/DataModel/Multiplicity.h"
4728
#include "Common/DataModel/PIDResponse.h"
4829
#include "Common/DataModel/PIDResponseITS.h"
49-
#include "DCAFitter/DCAFitterN.h"
30+
#include "Common/DataModel/TrackSelectionTables.h"
31+
#include "Common/TableProducer/PID/pidTOFBase.h"
5032

51-
#include "PWGLF/DataModel/LFClusterStudiesTable.h"
33+
#include "CCDB/BasicCCDBManager.h"
34+
#include "DCAFitter/DCAFitterN.h"
35+
#include "DataFormatsParameters/GRPMagField.h"
36+
#include "DataFormatsParameters/GRPObject.h"
37+
#include "DetectorsBase/GeometryManager.h"
38+
#include "DetectorsBase/Propagator.h"
39+
#include "Framework/ASoAHelpers.h"
40+
#include "Framework/AnalysisDataModel.h"
41+
#include "Framework/AnalysisTask.h"
42+
#include "Framework/runDataProcessing.h"
43+
#include "ReconstructionDataFormats/Track.h"
5244

5345
#include "TDatabasePDG.h"
5446
#include "TPDGCode.h"
5547

48+
#include <cstdint>
49+
#include <cstring>
50+
#include <numeric>
51+
#include <random>
52+
#include <unordered_map>
53+
#include <utility>
54+
#include <vector>
55+
5656
using namespace ::o2;
5757
using namespace o2::framework;
5858
using namespace o2::framework::expressions;
@@ -139,18 +139,18 @@ enum PartID {
139139
};
140140

141141
struct Candidate {
142-
float p = -999.f; // momentum * charge
143-
float eta = -999.f;
144-
float phi = -999.f;
142+
float p = -999.f; // momentum * charge
143+
float eta = -999.f;
144+
float phi = -999.f;
145145
uint32_t itsClusterSize = 0;
146146
uint8_t partID = PartID::none;
147-
float pTPC = -999.f;
148-
uint32_t pidInTrk = 0; // PID in tracking
149-
float nsigmaTPC = -999.f;
150-
float nsigmaTOF = -999.f;
151-
float tofMass = -999.f;
152-
float cosPAMother = -999.f; // Cosine of the pointing angle of the mother
153-
float massMother = -999.f; // Invariant mass of the mother
147+
float pTPC = -999.f;
148+
uint32_t pidInTrk = 0; // PID in tracking
149+
float nsigmaTPC = -999.f;
150+
float nsigmaTOF = -999.f;
151+
float tofMass = -999.f;
152+
float cosPAMother = -999.f; // Cosine of the pointing angle of the mother
153+
float massMother = -999.f; // Invariant mass of the mother
154154
int pdgCode = 0;
155155
};
156156

@@ -431,7 +431,7 @@ struct LfTreeCreatorClusterStudies {
431431
return true;
432432
}
433433

434-
uint8_t selectV0MotherHypothesis(float massK0sV0, float massLambdaV0, float massAntiLambdaV0, float alphaAP, const o2::aod::V0& v0)
434+
uint8_t selectV0MotherHypothesis(float massK0sV0, float massLambdaV0, float massAntiLambdaV0, float alphaAP, const o2::aod::V0& v0)
435435
{
436436
uint8_t v0Bitmask(0);
437437
if (v0.isPhotonV0()) {
@@ -447,12 +447,11 @@ struct LfTreeCreatorClusterStudies {
447447
SETBIT(v0Bitmask, AntiLambda);
448448
}
449449
return v0Bitmask;
450-
451450
}
452451

453-
template<typename T>
454-
bool selectPidV0Daughters(Candidate & candidatePos, Candidate& candidateNeg, const T& posTrack,
455-
const T& negTrack, const std::array<float, 3>& momMother, const std::array<float, 3>& decayVtx,
452+
template <typename T>
453+
bool selectPidV0Daughters(Candidate& candidatePos, Candidate& candidateNeg, const T& posTrack,
454+
const T& negTrack, const std::array<float, 3>& momMother, const std::array<float, 3>& decayVtx,
456455
float qtAP, float radiusV0, uint8_t v0Bitmask)
457456
{
458457
if (TESTBIT(v0Bitmask, Lambda)) {
@@ -503,14 +502,14 @@ struct LfTreeCreatorClusterStudies {
503502
} else {
504503
return false;
505504
}
506-
505+
507506
return true;
508507
}
509508

510509
/**
511510
* Fill the histograms for the V0 candidate and return the mass of the V0
512-
*/
513-
float fillHistogramsV0(float massLambdaV0, float massAntiLambdaV0,
511+
*/
512+
float fillHistogramsV0(float massLambdaV0, float massAntiLambdaV0,
514513
const std::array<float, 3>& momMother,
515514
const Candidate& candidatePos, const Candidate& candidateNeg, float alphaAP, float qtAP, float radiusV0, uint8_t v0Bitmask)
516515
{
@@ -555,29 +554,29 @@ struct LfTreeCreatorClusterStudies {
555554
return massV0;
556555
}
557556

558-
template <bool isMC = false>
557+
template <bool isMC = false>
559558
void fillTable(const Candidate& candidate)
560559
{
561560
m_ClusterStudiesTable(
562-
candidate.p, // p
563-
candidate.eta, // eta
564-
candidate.phi, // phi
565-
candidate.itsClusterSize, // itsClsize
566-
static_cast<uint8_t>(candidate.partID)); // partID
561+
candidate.p, // p
562+
candidate.eta, // eta
563+
candidate.phi, // phi
564+
candidate.itsClusterSize, // itsClsize
565+
static_cast<uint8_t>(candidate.partID)); // partID
567566
if (!setting_smallTable) {
568567
m_ClusterStudiesTableExtra(
569-
candidate.pTPC, // pTPC
570-
candidate.pidInTrk, // pidInTrk
571-
candidate.nsigmaTPC, // TpcNSigma
572-
candidate.nsigmaTOF, // TofNSigma
573-
candidate.tofMass, // TofMass
574-
candidate.cosPAMother, // cosPA
575-
candidate.massMother); // massMother
568+
candidate.pTPC, // pTPC
569+
candidate.pidInTrk, // pidInTrk
570+
candidate.nsigmaTPC, // TpcNSigma
571+
candidate.nsigmaTOF, // TofNSigma
572+
candidate.tofMass, // TofMass
573+
candidate.cosPAMother, // cosPA
574+
candidate.massMother); // massMother
576575
}
577576

578577
if constexpr (isMC) {
579578
m_ClusterStudiesTableMc(
580-
candidate.pdgCode); // pdgCod
579+
candidate.pdgCode); // pdgCod
581580
}
582581
}
583582

@@ -797,12 +796,12 @@ struct LfTreeCreatorClusterStudies {
797796

798797
Candidate candidatePos(std::hypot(momPos[0], momPos[1], momPos[2]) * posTrack.sign(),
799798
RecoDecay::eta(momPos), RecoDecay::phi(momPos), posTrack.itsClusterSizes(),
800-
0, posTrack.tpcInnerParam() * posTrack.sign(), posTrack.pidForTracking(),
799+
0, posTrack.tpcInnerParam() * posTrack.sign(), posTrack.pidForTracking(),
801800
-999.f, -999.f, -999.f, cosPA, -999.f, 0);
802801
Candidate candidateNeg(std::hypot(momNeg[0], momNeg[1], momNeg[2]) * negTrack.sign(),
803-
RecoDecay::eta(momNeg), RecoDecay::phi(momNeg), negTrack.itsClusterSizes(),
804-
0, negTrack.tpcInnerParam() * negTrack.sign(), negTrack.pidForTracking(),
805-
-999.f, -999.f, -999.f, cosPA, -999.f, 0);
802+
RecoDecay::eta(momNeg), RecoDecay::phi(momNeg), negTrack.itsClusterSizes(),
803+
0, negTrack.tpcInnerParam() * negTrack.sign(), negTrack.pidForTracking(),
804+
-999.f, -999.f, -999.f, cosPA, -999.f, 0);
806805

807806
if (!selectPidV0Daughters(candidatePos, candidateNeg, posTrack, negTrack, momMother, decayVtx, qtAP, radiusV0, v0Bitmask)) {
808807
return;
@@ -903,19 +902,19 @@ struct LfTreeCreatorClusterStudies {
903902
uint8_t partID_bachelor = PartID::ka;
904903

905904
m_ClusterStudiesTable(
906-
std::hypot(momBachelor[0], momBachelor[1], momBachelor[2]) * bachelorTrack.sign(), // p_K
907-
RecoDecay::eta(momBachelor), // eta_K
908-
RecoDecay::phi(momBachelor), // phi_K
909-
bachelorTrack.itsClusterSizes(), // itsClSize_K
910-
partID_bachelor); // partID_K
905+
std::hypot(momBachelor[0], momBachelor[1], momBachelor[2]) * bachelorTrack.sign(), // p_K
906+
RecoDecay::eta(momBachelor), // eta_K
907+
RecoDecay::phi(momBachelor), // phi_K
908+
bachelorTrack.itsClusterSizes(), // itsClSize_K
909+
partID_bachelor); // partID_K
911910
if (!setting_smallTable) {
912911
m_ClusterStudiesTableExtra(
913-
bachelorTrack.tpcInnerParam() * bachelorTrack.sign(), // pTPC_K
914-
bachelorTrack.pidForTracking(), // PIDinTrk_K
915-
-999.f, // TpcNSigma_K
916-
-999.f, // TofNSigma_K
917-
-999.f, // TofMass_K
918-
cosPA, // cosPA
912+
bachelorTrack.tpcInnerParam() * bachelorTrack.sign(), // pTPC_K
913+
bachelorTrack.pidForTracking(), // PIDinTrk_K
914+
-999.f, // TpcNSigma_K
915+
-999.f, // TofNSigma_K
916+
-999.f, // TofMass_K
917+
cosPA, // cosPA
919918
massOmega);
920919
}
921920

@@ -924,9 +923,9 @@ struct LfTreeCreatorClusterStudies {
924923
return;
925924
}
926925
auto mcParticle = bachelorTrack.mcParticle();
927-
926+
928927
m_ClusterStudiesTableMc(
929-
mcParticle.pdgCode()); // pdgCode_K
928+
mcParticle.pdgCode()); // pdgCode_K
930929
}
931930

932931
m_hAnalysis.fill(HIST("isPositive"), bachelorTrack.p() > 0);
@@ -960,11 +959,11 @@ struct LfTreeCreatorClusterStudies {
960959
uint8_t partID = PartID::de;
961960

962961
m_ClusterStudiesTable(
963-
track.p() * track.sign(), // p_De,
964-
track.eta(), // eta_De,
965-
track.phi(), // phi_De,
966-
track.itsClusterSizes(), // itsClSize_De,
967-
partID); // partID_De
962+
track.p() * track.sign(), // p_De,
963+
track.eta(), // eta_De,
964+
track.phi(), // phi_De,
965+
track.itsClusterSizes(), // itsClSize_De,
966+
partID); // partID_De
968967
if (!setting_smallTable) {
969968
m_ClusterStudiesTableExtra(
970969
track.tpcInnerParam() * track.sign(), // pTPC_De,
@@ -984,8 +983,7 @@ struct LfTreeCreatorClusterStudies {
984983
auto mcParticle = track.mcParticle();
985984

986985
m_ClusterStudiesTableMc(
987-
mcParticle.pdgCode()); // pdgCode_De
988-
986+
mcParticle.pdgCode()); // pdgCode_De
989987
}
990988

991989
m_hAnalysis.fill(HIST("isPositive"), track.sign() > 0);
@@ -1019,30 +1017,30 @@ struct LfTreeCreatorClusterStudies {
10191017
m_hAnalysis.fill(HIST("pmatchingHe"), track.sign() * correctedTPCinnerParam, (correctedTPCinnerParam - track.p()) / correctedTPCinnerParam);
10201018

10211019
m_ClusterStudiesTable(
1022-
track.p() * track.sign(), // p_He3,
1023-
track.eta(), // eta_He3,
1024-
track.phi(), // phi_He3,
1025-
track.itsClusterSizes(), // itsClSize_He3,
1026-
partID); // partID_He3
1020+
track.p() * track.sign(), // p_He3,
1021+
track.eta(), // eta_He3,
1022+
track.phi(), // phi_He3,
1023+
track.itsClusterSizes(), // itsClSize_He3,
1024+
partID); // partID_He3
10271025
if (!setting_smallTable) {
10281026
m_ClusterStudiesTableExtra(
1029-
correctedTPCinnerParam * track.sign(), // pTPC_He3,
1030-
track.pidForTracking(), // PIDinTrk_He3,
1031-
computeNSigmaHe3(track), // TpcNSigma_He3,
1032-
-999.f, // TofNSigma_He3,
1033-
tofMass, // TofMass_He3,
1034-
-999.f, // cosPA,
1035-
-999.f); // massMother
1027+
correctedTPCinnerParam * track.sign(), // pTPC_He3,
1028+
track.pidForTracking(), // PIDinTrk_He3,
1029+
computeNSigmaHe3(track), // TpcNSigma_He3,
1030+
-999.f, // TofNSigma_He3,
1031+
tofMass, // TofMass_He3,
1032+
-999.f, // cosPA,
1033+
-999.f); // massMother
10361034
}
10371035

10381036
if constexpr (isMC) {
10391037
if (!track.has_mcParticle()) {
10401038
return;
10411039
}
10421040
auto mcParticle = track.mcParticle();
1043-
1041+
10441042
m_ClusterStudiesTableMc(
1045-
mcParticle.pdgCode()); // pdgCodeMc_He3
1043+
mcParticle.pdgCode()); // pdgCodeMc_He3
10461044
}
10471045

10481046
m_hAnalysis.fill(HIST("isPositive"), track.sign() > 0);

0 commit comments

Comments
 (0)