Skip to content

Commit a09ab7d

Browse files
author
Mriganka Mouli Mondal
committed
added correction tab characters
Merge branch 'master' of github.com:mmriganka/O2Physics
2 parents c5709e2 + 8e8f792 commit a09ab7d

File tree

6 files changed

+74
-14
lines changed

6 files changed

+74
-14
lines changed

DPG/Tasks/AOTEvent/lumiQa.cxx

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include "Framework/AnalysisDataModel.h"
1515
#include "CCDB/BasicCCDBManager.h"
1616
#include "Framework/HistogramRegistry.h"
17+
#include "DataFormatsParameters/GRPLHCIFData.h"
18+
#include "DataFormatsFT0/Digit.h"
1719
#include "TList.h"
1820
#include "TH1.h"
1921

@@ -26,39 +28,89 @@ struct LumiQaTask {
2628
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
2729
int lastRunNumber = -1;
2830
TH1* hCalibT0C = nullptr;
31+
static const int nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches;
32+
std::bitset<nBCsPerOrbit> bcPatternB;
2933

3034
void init(InitContext&)
3135
{
3236
ccdb->setURL("http://alice-ccdb.cern.ch");
3337
ccdb->setCaching(true);
3438
ccdb->setLocalObjectValidityChecking();
3539
const AxisSpec axisMultT0C{1000, 0., 70000., "T0C multiplicity"};
36-
const AxisSpec axisCentT0C{1000, 0., 100., "T0C centrality"};
40+
const AxisSpec axisCentT0C{100, 0., 100., "T0C centrality"};
3741
histos.add("hMultT0C", "", kTH1F, {axisMultT0C});
3842
histos.add("hCentT0C", "", kTH1F, {axisCentT0C});
43+
histos.add("hMultT0CselTCE", "", kTH1F, {axisMultT0C});
44+
histos.add("hCentT0CselTCE", "", kTH1F, {axisCentT0C});
45+
histos.add("hMultT0CselTVXTCE", "", kTH1F, {axisMultT0C});
46+
histos.add("hCentT0CselTVXTCE", "", kTH1F, {axisCentT0C});
47+
histos.add("hMultT0CselTVXTCEB", "", kTH1F, {axisMultT0C});
48+
histos.add("hCentT0CselTVXTCEB", "", kTH1F, {axisCentT0C});
49+
50+
histos.add("hCounterTCE", "", kTH1D, {{1, 0., 1.}});
51+
histos.add("hCounterZNC", "", kTH1D, {{1, 0., 1.}});
52+
histos.add("hCounterZEM", "", kTH1D, {{1, 0., 1.}});
3953
}
4054

4155
void process(BCsRun3 const& bcs, aod::Zdcs const& zdcs, aod::FT0s const& ft0s)
4256
{
4357
int runNumber = bcs.iteratorAt(0).runNumber();
4458
LOGP(info, "runNumber={}", runNumber);
59+
const char* srun = Form("%d", runNumber);
60+
4561
if (runNumber != lastRunNumber) {
46-
TList* callst = ccdb->getForTimeStamp<TList>("Centrality/Estimators", bcs.iteratorAt(0).timestamp());
4762
lastRunNumber = runNumber;
63+
int64_t ts = bcs.iteratorAt(0).timestamp();
64+
65+
auto grplhcif = ccdb->getForTimeStamp<o2::parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF", ts);
66+
bcPatternB = grplhcif->getBunchFilling().getBCPattern();
67+
68+
TList* callst = ccdb->getForTimeStamp<TList>("Centrality/Estimators", ts);
4869
hCalibT0C = reinterpret_cast<TH1*>(callst->FindObject("hCalibZeqFT0C"));
4970
}
5071
if (!hCalibT0C) {
5172
return;
5273
}
5374

5475
for (const auto& bc : bcs) {
76+
if (bc.has_zdc()) {
77+
float timeZNA = bc.zdc().timeZNA();
78+
float timeZNC = bc.zdc().timeZNC();
79+
if (fabs(timeZNC) < 2) {
80+
histos.get<TH1>(HIST("hCounterZNC"))->Fill(srun, 1);
81+
}
82+
if (fabs(timeZNA) < 2 || fabs(timeZNC) < 2) {
83+
histos.get<TH1>(HIST("hCounterZEM"))->Fill(srun, 1);
84+
}
85+
}
86+
5587
if (!bc.has_ft0()) {
5688
continue;
5789
}
5890
float multT0C = bc.ft0().sumAmpC();
5991
float centT0C = hCalibT0C->GetBinContent(hCalibT0C->FindFixBin(multT0C));
6092
histos.fill(HIST("hMultT0C"), multT0C);
6193
histos.fill(HIST("hCentT0C"), centT0C);
94+
95+
if (!TESTBIT(bc.ft0().triggerMask(), o2::ft0::Triggers::bitCen)) { // TCE
96+
continue;
97+
}
98+
histos.fill(HIST("hMultT0CselTCE"), multT0C);
99+
histos.fill(HIST("hCentT0CselTCE"), centT0C);
100+
101+
if (!TESTBIT(bc.ft0().triggerMask(), o2::ft0::Triggers::bitVertex)) { // TVX
102+
continue;
103+
}
104+
histos.fill(HIST("hMultT0CselTVXTCE"), multT0C);
105+
histos.fill(HIST("hCentT0CselTVXTCE"), centT0C);
106+
107+
if (!bcPatternB[bc.globalBC() % nBCsPerOrbit]) { // B-mask
108+
continue;
109+
}
110+
histos.fill(HIST("hMultT0CselTVXTCEB"), multT0C);
111+
histos.fill(HIST("hCentT0CselTVXTCEB"), centT0C);
112+
113+
histos.get<TH1>(HIST("hCounterTCE"))->Fill(srun, 1);
62114
}
63115
}
64116
};

PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,10 @@ struct HfCorrelatorDsHadrons {
170170

171171
enum CandidateStep { kCandidateStepMcGenAll = 0,
172172
kCandidateStepMcGenDsToKKPi,
173-
kCandidateStepMcGenInAcceptance,
173+
kCandidateStepMcCandInAcceptance,
174+
kCandidateStepMcDaughtersInAcceptance,
174175
kCandidateStepMcReco,
176+
kCandidateStepMcRecoInAcceptance,
175177
kCandidateNSteps };
176178

177179
enum AssocTrackStep { kAssocTrackStepMcGen = 0,
@@ -518,6 +520,10 @@ struct HfCorrelatorDsHadrons {
518520
hCandidates->Fill(kCandidateStepMcGenAll, mcParticle.pt(), multiplicity, mcParticle.originMcGen());
519521
if (std::abs(mcParticle.flagMcMatchGen()) == 1 << aod::hf_cand_3prong::DecayType::DsToKKPi) {
520522
hCandidates->Fill(kCandidateStepMcGenDsToKKPi, mcParticle.pt(), multiplicity, mcParticle.originMcGen());
523+
auto yDs = RecoDecay::y(std::array{mcParticle.px(), mcParticle.py(), mcParticle.pz()}, o2::constants::physics::MassDS);
524+
if (std::abs(yDs) <= yCandMax) {
525+
hCandidates->Fill(kCandidateStepMcCandInAcceptance, mcParticle.pt(), multiplicity, mcParticle.originMcGen());
526+
}
521527
bool inAcceptance = true;
522528
auto daughters = mcParticle.template daughters_as<CandDsMcGen>();
523529
for (const auto& daughter : daughters) {
@@ -526,7 +532,7 @@ struct HfCorrelatorDsHadrons {
526532
}
527533
}
528534
if (inAcceptance) {
529-
hCandidates->Fill(kCandidateStepMcGenInAcceptance, mcParticle.pt(), multiplicity, mcParticle.originMcGen());
535+
hCandidates->Fill(kCandidateStepMcDaughtersInAcceptance, mcParticle.pt(), multiplicity, mcParticle.originMcGen());
530536
fillHistoMcGen(mcParticle);
531537
}
532538
}
@@ -544,6 +550,9 @@ struct HfCorrelatorDsHadrons {
544550
if (((std::abs(prong0McPart.pdgCode()) == kKPlus) && (candidate.isSelDsToKKPi() >= selectionFlagDs)) || ((std::abs(prong0McPart.pdgCode()) == kPiPlus) && (candidate.isSelDsToPiKK() >= selectionFlagDs))) {
545551
registry.fill(HIST("hPtCand"), candidate.pt());
546552
hCandidates->Fill(kCandidateStepMcReco, candidate.pt(), multiplicity, candidate.originMcRec());
553+
if (std::abs(hfHelper.yDs(candidate)) <= yCandMax) {
554+
hCandidates->Fill(kCandidateStepMcRecoInAcceptance, candidate.pt(), multiplicity, candidate.originMcRec());
555+
}
547556
}
548557
}
549558
}

PWGJE/Tasks/jetChCorr.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//
1414
/// Mriganka Mouli Mondal <mriganka.mouli.mondal@cern.ch> originally modified from Nima Zardoshti <nima.zardoshti@cern.ch>
1515
//
16+
1617
#include <vector>
1718
#include <TMath.h>
1819
#include <TPDGCode.h>
@@ -193,14 +194,14 @@ struct JetChCorr {
193194
int found1 = 0;
194195
int found2 = 0;
195196
for (unsigned int j = 0; j < constituents1.size(); j++) {
196-
// cout<<constituents1[j].user_index()-1<<", ";
197+
//cout<<constituents1[j].user_index()-1<<", ";
197198
if ((n_trackL == (constituents1[j].user_index() - 1)) || (trackL == (constituents1[j].user_index() - 1)))
198199
found1++;
199200
}
200201
// cout<<endl;
201202
// cout<<"in subJET2 ********************************************* "<<endl;
202203
for (unsigned int j = 0; j < constituents2.size(); j++) {
203-
// cout<<constituents2[j].user_index()-1<<", ";
204+
//cout<<constituents2[j].user_index()-1<<", ";
204205
if ((n_trackL == constituents2[j].user_index() - 1) || (trackL == constituents2[j].user_index() - 1))
205206
found2++;
206207
}
@@ -366,9 +367,9 @@ struct JetChCorr {
366367
float z = v2.Perp(vR.Orthogonal()) / (v1.Perp(vR.Orthogonal()) + v2.Perp(vR.Orthogonal()));
367368
float fT = ((2. * z * (1 - z) * vR.Mag()) / v1.Perp2(vR)) / 6.;
368369
float kt_p = v1.Perp(vR);
369-
// float th_p = v1.Angle(v2);
370-
// cout<<z<< " "<<fT<<" "<<kt_p<<" "<<th_p<<endl;
371-
// cout<<ch_l<<" "<<ch_nl<<endl;
370+
//float th_p = v1.Angle(v2);
371+
//cout<<z<< " "<<fT<<" "<<kt_p<<" "<<th_p<<endl;
372+
//cout<<ch_l<<" "<<ch_nl<<endl;
372373
if (ch_l == ch_nl) {
373374
registry.fill(HIST("h_ch_s_pt"), jet.pt());
374375
registry.fill(HIST("h_ch_s_kt"), kt_p);

PWGMM/Mult/Tasks/dndeta-hi.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ struct MultiplicityCounter {
285285
{
286286
std::vector<typename std::decay_t<decltype(collisions)>::iterator> cols;
287287
for (auto& bc : bcs) {
288-
if (!useEvSel || (bc.selection_bit(o2::aod::evsel::kIsBBT0A) &
288+
if (!useEvSel || (bc.selection_bit(o2::aod::evsel::kIsBBT0A) &&
289289
bc.selection_bit(o2::aod::evsel::kIsBBT0C)) != 0) {
290290
registry.fill(HIST("Selection"), 5.);
291291
cols.clear();

PWGMM/Mult/Tasks/dndeta-mft.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ struct PseudorapidityDensityMFT {
315315
std::vector<typename std::decay_t<decltype(collisions)>::iterator> cols;
316316
for (auto& bc : bcs) {
317317
if (!useEvSel ||
318-
(useEvSel && ((bc.selection_bit(aod::evsel::kIsBBT0A) &
318+
(useEvSel && ((bc.selection_bit(aod::evsel::kIsBBT0A) &&
319319
bc.selection_bit(aod::evsel::kIsBBT0C)) != 0))) {
320320
registry.fill(HIST("EventSelection"), 5.);
321321
cols.clear();

PWGMM/Mult/Tasks/dndeta.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ struct MultiplicityCounter {
221221
binnedRegistry.add({PtEtaGen.data(), " ; p_{T} (GeV/c) ; #eta; centrality", {HistType::kTHnSparseF, {PtAxis, EtaAxis, CentAxis}}});
222222

223223
binnedRegistry.add({PhiEtaGen.data(), "; #varphi; #eta; tracks", {HistType::kTHnSparseF, {PhiAxis, EtaAxis, CentAxis}}});
224-
binnedRegistry.add({PhiEtaGenDuplicates.data(), "; #varphi; #eta; centrality", {HistType::kTHnSparseF, {PhiAxis, EtaAxis, CentAxis}}});
225-
binnedRegistry.add({PhiEtaDuplicates.data(), "; #varphi; #eta; centrality", {HistType::kTHnSparseF, {PhiAxis, EtaAxis, CentAxis}}});
226224
binnedRegistry.add({Efficiency.data(), "; status; centrality; events", {HistType::kTH2F, {{static_cast<int>(EvEffBins::kSelectedPVgt0), 0.5, static_cast<float>(EvEffBins::kSelectedPVgt0) + 0.5}, CentAxis}}});
227225
binnedRegistry.add({NotFoundZvtx.data(), " ; Z_{vtx} (cm); centrality; events", {HistType::kTH2F, {ZAxis, CentAxis}}});
228226

@@ -781,7 +779,7 @@ struct MultiplicityCounter {
781779
if constexpr (hasRecoCent<C>()) {
782780
binnedRegistry.fill(HIST(PtGenIdxNoEtaCut), particle.pt(), c_gen);
783781
if (std::abs(particle.eta()) < estimatorEta) {
784-
binnedRegistry.fill(HIST(PtGenIdx), particle.pt());
782+
binnedRegistry.fill(HIST(PtGenIdx), particle.pt(), c_gen);
785783
if (particle.pdgCode() == speciesIds[0]) {
786784
binnedRegistry.fill(HIST(prefix) + HIST(species[0]) + HIST(PtGenIdxSuff), particle.pt(), c_gen);
787785
} else if (particle.pdgCode() == speciesIds[1]) {

0 commit comments

Comments
 (0)