Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@

namespace o2::aod
{
namespace pmdtrack
{
DECLARE_SOA_INDEX_COLUMN(Collision, collision);
DECLARE_SOA_ARRAY_INDEX_COLUMN(Collision, collisions);
DECLARE_SOA_INDEX_COLUMN(BC, bc);
DECLARE_SOA_SLICE_INDEX_COLUMN(Pmd,pmd);
} // namespace pmdtrack
DECLARE_SOA_INDEX_TABLE_USER(PMDTracksIndex, BCs, "PMDTRKIDX", pmdtrack::CollisionId, pmdtrack::BCId, pmdtrack::PmdIdSlice);
}
namespace pmdtrack
{
DECLARE_SOA_INDEX_COLUMN(Collision, collision);
DECLARE_SOA_ARRAY_INDEX_COLUMN(Collision, collisions);

Check failure on line 42 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_INDEX_COLUMN(BC, bc);

Check failure on line 43 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_SLICE_INDEX_COLUMN(Pmd, pmd);
} // namespace pmdtrack

DECLARE_SOA_INDEX_TABLE_USER(PMDTracksIndex, BCs, "PMDTRKIDX", pmdtrack::CollisionId, pmdtrack::BCId, pmdtrack::PmdIdSlice);
} // namespace o2::aod

struct BuiltPmdIndex {
// build the index table PMDTracksIndex
Builds<aod::PMDTracksIndex> idx;
void init(InitContext const&){};
void init(InitContext const&) {};
};

struct PmdQa {
Expand All @@ -59,12 +59,12 @@
ConfigurableAxis axisEventBin{"axisEventBin", {4, 0.5, 4.5}, ""};
ConfigurableAxis axisVtxZBin{"axisVtxZBin", {40, -20, 20}, ""};
ConfigurableAxis axisNPMDtracksBin{"axisNPMDtracksBin", {500, 0, 500}, "Number of pmdtracks"};
ConfigurableAxis axisClsxyBin{"axisClsxyBin", {200,-100,100}, ""};
ConfigurableAxis axisAdcBin{"axisAdcBin", {200,0,2000}, ""};
ConfigurableAxis axisEtaBin{"axisEtaBin", {10,2.1,4.1}, ""};
ConfigurableAxis axisNcellBin{"axisNcellBin", {50,-0.5,49.5}, ""};
ConfigurableAxis axisClsxyBin{"axisClsxyBin", {200, -100, 100}, ""};
ConfigurableAxis axisAdcBin{"axisAdcBin", {200, 0, 2000}, ""};
ConfigurableAxis axisEtaBin{"axisEtaBin", {10, 2.1, 4.1}, ""};
ConfigurableAxis axisNcellBin{"axisNcellBin", {50, -0.5, 49.5}, ""};
Configurable<int> fMipCut{"fMipCut", 432, "fMipCut"};

void init(InitContext&)
{

Expand All @@ -75,7 +75,7 @@
AxisSpec axisAdc = {axisAdcBin, "Adc", "AdcAxis"};
AxisSpec axisEta = {axisEtaBin, "Eta", "EtaAxis"};
AxisSpec axisNcell = {axisNcellBin, "Ncell", "NcellAxis"};

histos.add("hEventHist", "hEventHist", kTH1F, {axisEvent});
histos.add("hVtxZHist", "hVtxZHist", kTH1F, {axisVtxZ});
histos.add("hNPMDtracks", "Number of pmdtracks", kTH1F, {axisNPMDtracks});
Expand All @@ -85,9 +85,9 @@
histos.add("hclsncell", "hclsncell", kTH1F, {axisNcell});
}

using coltable = soa::Join<aod::Collisions, aod::PMDTracksIndex>;

Check failure on line 88 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/type]

Use UpperCamelCase for names of defined types (including concepts).
using colevsel = soa::Join<coltable, aod::EvSels>;

Check failure on line 89 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/type]

Use UpperCamelCase for names of defined types (including concepts).

void process(colevsel::iterator const& collision, aod::Pmds const&)
{
histos.fill(HIST("hEventHist"), 1);
Expand All @@ -95,37 +95,37 @@
return;
}
histos.fill(HIST("hEventHist"), 2);
if (std::abs(collision.posZ()) >= 10.) {

Check failure on line 98 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return;
}
histos.fill(HIST("hEventHist"), 3);
histos.fill(HIST("hVtxZHist"), collision.posZ());

if (collision.has_pmd()) {
histos.fill(HIST("hEventHist"), 4);
auto tracks = collision.pmd();
histos.fill(HIST("hNPMDtracks"), tracks.size());
for (const auto& track : tracks) {
if (track.pmddet() == 1) {
return;
}
if(track.pmdclsz() == 0) {
return;
}
if (!track.pmdmodule()) {
return;
}
histos.fill(HIST("hClusXY"), track.pmdclsx(), track.pmdclsy());
histos.fill(HIST("hClusAdc"), track.pmdclsadc());
float rdist = TMath::Sqrt(track.pmdclsx()*track.pmdclsx() + track.pmdclsy()*track.pmdclsy());
float theta = TMath::ATan2(rdist,track.pmdclsz());
float etacls = -TMath::Log(TMath::Tan(0.5*theta));
if (track.pmdclsadc() > fMipCut && track.pmdncell() > 2) {
if(etacls>2.3 && etacls<3.9){
histos.fill(HIST("hetacls"), etacls);
histos.fill(HIST("hclsncell"), track.pmdncell());
}
}
if (track.pmddet() == 1) {
return;
}
if (track.pmdclsz() == 0) {
return;
}
if (!track.pmdmodule()) {
return;
}
histos.fill(HIST("hClusXY"), track.pmdclsx(), track.pmdclsy());
histos.fill(HIST("hClusAdc"), track.pmdclsadc());
float rdist = TMath::Sqrt(track.pmdclsx() * track.pmdclsx() + track.pmdclsy() * track.pmdclsy());

Check failure on line 120 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
float theta = TMath::ATan2(rdist, track.pmdclsz());

Check failure on line 121 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
float etacls = -TMath::Log(TMath::Tan(0.5 * theta));

Check failure on line 122 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (track.pmdclsadc() > fMipCut && track.pmdncell() > 2) {

Check failure on line 123 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (etacls > 2.3 && etacls < 3.9) {

Check failure on line 124 in PWGLF/Tasks/GlobalEventProperties/pmdqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("hetacls"), etacls);
histos.fill(HIST("hclsncell"), track.pmdncell());
}
}
}
}
}
Expand Down
Loading