Skip to content

Commit 6508ccf

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents 81383ff + f35efae commit 6508ccf

46 files changed

Lines changed: 2800 additions & 1800 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
2222
set_property(GLOBAL PROPERTY REPORT_UNDEFINED_PROPERTIES)
2323

2424
cmake_host_system_information(RESULT _totalmem QUERY TOTAL_PHYSICAL_MEMORY)
25-
math(EXPR _total_analysis_jobs "(${_totalmem}-2048)/4096")
25+
math(EXPR _total_analysis_jobs "(${_totalmem}-2048)/2048")
2626
if(_total_analysis_jobs LESS_EQUAL 0)
2727
set(_total_analysis_jobs 1)
2828
endif()

Common/DataModel/Multiplicity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ DECLARE_SOA_TABLE(MultsExtra, "AOD", "MULTEXTRA", //!
113113
mult::MultNTracksHasITS, mult::MultNTracksHasTPC, mult::MultNTracksHasTOF, mult::MultNTracksHasTRD,
114114
mult::MultNTracksITSOnly, mult::MultNTracksTPCOnly, mult::MultNTracksITSTPC,
115115
mult::MultAllTracksTPCOnly, mult::MultAllTracksITSTPC,
116-
mult::BCNumber);
116+
mult::BCNumber, evsel::NumTracksInTimeRange);
117117

118118
DECLARE_SOA_TABLE(MultNeighs, "AOD", "MULTNEIGH", //!
119119
mult::TimeToPrePrevious, mult::TimeToPrevious,

Common/TableProducer/multiplicityExtraTable.cxx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11+
#include <CCDB/BasicCCDBManager.h> // megalinter thinks this is a C header...
12+
#include <bitset>
1113
#include "Framework/ConfigParamSpec.h"
1214
#include "Framework/runDataProcessing.h"
1315
#include "Framework/AnalysisTask.h"
@@ -16,13 +18,10 @@
1618
#include "Common/DataModel/Multiplicity.h"
1719
#include "DataFormatsFIT/Triggers.h"
1820
#include "TableHelper.h"
19-
2021
#include "CCDB/CcdbApi.h"
2122
#include "CommonDataFormat/BunchFilling.h"
22-
#include <CCDB/BasicCCDBManager.h>
2323
#include "DataFormatsParameters/GRPObject.h"
2424
#include "DataFormatsParameters/GRPLHCIFData.h"
25-
#include <bitset>
2625

2726
using namespace o2;
2827
using namespace o2::framework;
@@ -34,6 +33,12 @@ struct MultiplicityExtraTable {
3433
Produces<aod::MultsBC> multBC;
3534
Produces<aod::MultNeighs> multNeigh;
3635

36+
// Allow for downscaling of BC table for less space use in derived data
37+
Configurable<float> bcDownscaleFactor{"bcDownscaleFactor", 2, "Downscale factor for BC table (0: save nothing, 1: save all)"};
38+
39+
// needed for downscale
40+
unsigned int randomSeed = 0;
41+
3742
o2::ccdb::CcdbApi ccdbApi;
3843
Service<o2::ccdb::BasicCCDBManager> ccdb;
3944
BCPattern CollidingBunch;
@@ -43,6 +48,8 @@ struct MultiplicityExtraTable {
4348

4449
void init(InitContext&)
4550
{
51+
randomSeed = static_cast<unsigned int>(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
52+
4653
ccdbApi.init("http://alice-ccdb.cern.ch");
4754
ccdb->setURL("http://alice-ccdb.cern.ch");
4855
ccdb->setCaching(true);
@@ -53,6 +60,11 @@ struct MultiplicityExtraTable {
5360

5461
void processBCs(BCsWithRun3Matchings::iterator const& bc, aod::FV0As const&, aod::FT0s const&, aod::FDDs const&, aod::Zdcs const&)
5562
{
63+
// downscale if requested to do so
64+
if (bcDownscaleFactor < 1.f && (static_cast<float>(rand_r(&randomSeed)) / static_cast<float>(RAND_MAX)) > bcDownscaleFactor) {
65+
return;
66+
}
67+
5668
bool Tvx = false;
5769
bool isFV0OrA = false;
5870
float multFT0C = 0.f;

Common/TableProducer/multiplicityTable.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ struct MultiplicityTable {
507507
tableExtra(collision.numContrib(), collision.chi2(), collision.collisionTimeRes(),
508508
mRunNumber, collision.posZ(), collision.sel8(),
509509
nHasITS, nHasTPC, nHasTOF, nHasTRD, nITSonly, nTPConly, nITSTPC,
510-
nAllTracksTPCOnly, nAllTracksITSTPC, bcNumber);
510+
nAllTracksTPCOnly, nAllTracksITSTPC, bcNumber, collision.trackOccupancyInTimeRange());
511511
} break;
512512
case kMultSelections: // Multiplicity selections
513513
{

DPG/Tasks/AOTTrack/qaEfficiency.cxx

Lines changed: 189 additions & 99 deletions
Large diffs are not rendered by default.

PWGCF/Flow/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ o2physics_add_dpl_workflow(flow-pt-efficiency
1616

1717
o2physics_add_dpl_workflow(flow-pbpb-task
1818
SOURCES FlowPbPbTask.cxx
19-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore
19+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore
2020
COMPONENT_NAME Analysis)
2121

2222
o2physics_add_dpl_workflow(flow-gfw-pbpb

PWGCF/Flow/Tasks/FlowPbPbTask.cxx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "Common/DataModel/TrackSelectionTables.h"
2828
#include "Common/DataModel/Centrality.h"
2929
#include "Common/DataModel/Multiplicity.h"
30+
#include "Common/CCDB/ctpRateFetcher.h"
3031

3132
#include "GFWPowerArray.h"
3233
#include "GFW.h"
@@ -56,6 +57,8 @@ struct FlowPbPbTask {
5657
O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 70.0f, "minimum TPC clusters")
5758
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations")
5859
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalTrackCut, bool, false, "Use additional track cut on phi")
60+
O2_DEFINE_CONFIGURABLE(cfgUseInteractionRateCut, bool, false, "Use events with low interaction rate")
61+
O2_DEFINE_CONFIGURABLE(cfgCutIR, float, 50.0, "maximum interaction rate (kHz)")
5962
O2_DEFINE_CONFIGURABLE(cfgUseNch, bool, false, "Use Nch for flow observables")
6063
O2_DEFINE_CONFIGURABLE(cfgNbootstrap, int, 10, "Number of subsamples")
6164
O2_DEFINE_CONFIGURABLE(cfgOutputNUAWeights, bool, false, "Fill and output NUA weights")
@@ -112,6 +115,12 @@ struct FlowPbPbTask {
112115
// Count the total number of enum
113116
kCount_ExtraProfile
114117
};
118+
int mRunNumber{-1};
119+
uint64_t mSOR{0};
120+
double mMinSeconds{-1.};
121+
std::unordered_map<int, TH2*> gHadronicRate;
122+
ctpRateFetcher mRateFetcher;
123+
TH2* gCurrentHadronicRate;
115124

116125
using aodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::Mults>>;
117126
using aodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
@@ -517,6 +526,23 @@ struct FlowPbPbTask {
517526
return true;
518527
}
519528

529+
void initHadronicRate(aod::BCsWithTimestamps::iterator const& bc)
530+
{
531+
if (mRunNumber == bc.runNumber()) {
532+
return;
533+
}
534+
mRunNumber = bc.runNumber();
535+
if (gHadronicRate.find(mRunNumber) == gHadronicRate.end()) {
536+
auto runDuration = ccdb->getRunDuration(mRunNumber);
537+
mSOR = runDuration.first;
538+
mMinSeconds = std::floor(mSOR * 1.e-3); /// round tsSOR to the highest integer lower than tsSOR
539+
double maxSec = std::ceil(runDuration.second * 1.e-3); /// round tsEOR to the lowest integer higher than tsEOR
540+
const AxisSpec axisSeconds{static_cast<int>((maxSec - mMinSeconds) / 20.f), 0, maxSec - mMinSeconds, "Seconds since SOR"};
541+
gHadronicRate[mRunNumber] = registry.add<TH2>(Form("HadronicRate/%i", mRunNumber), ";Time since SOR (s);Hadronic rate (kHz)", kTH2D, {axisSeconds, {510, 0., 51.}}).get();
542+
}
543+
gCurrentHadronicRate = gHadronicRate[mRunNumber];
544+
}
545+
520546
void process(aodCollisions::iterator const& collision, aod::BCsWithTimestamps const&, aodTracks const& tracks)
521547
{
522548
registry.fill(HIST("hEventCount"), 0.5);
@@ -545,6 +571,12 @@ struct FlowPbPbTask {
545571
registry.fill(HIST("hCent"), collision.centFT0C());
546572
fGFW->Clear();
547573
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
574+
initHadronicRate(bc);
575+
double hadronicRate = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; //
576+
double seconds = bc.timestamp() * 1.e-3 - mMinSeconds;
577+
if (cfgUseInteractionRateCut && hadronicRate > cfgCutIR) // cut on hadronic rate
578+
return;
579+
gCurrentHadronicRate->Fill(seconds, hadronicRate);
548580
loadCorrections(bc.timestamp());
549581
registry.fill(HIST("hEventCount"), 4.5);
550582

PWGCF/JCorran/Core/JFFlucAnalysis.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ class JFFlucAnalysis : public TNamed
6464
HIST_THN_PHIETAZ,
6565
HIST_THN_PTETA,
6666
HIST_THN_PHIETA,
67-
// HIST_THN_VN,
68-
// HIST_THN_VN_VN,
6967
HIST_THN_SC_with_QC_4corr,
7068
HIST_THN_SC_with_QC_2corr,
7169
HIST_THN_SC_with_QC_2corr_gap,
@@ -152,14 +150,9 @@ class JFFlucAnalysis : public TNamed
152150
if constexpr (std::experimental::is_detected<hasWeightNUA, const JInputClassIter>::value)
153151
corrInv /= track.weightNUA();
154152
pht[HIST_THN_PHIETA]->Fill(fCent, track.phi(), track.eta(), corrInv);
155-
156-
// if (TMath::Abs(track.eta()) < fEta_min || TMath::Abs(track.eta()) > fEta_max)
157-
// continue;
158153
pht[HIST_THN_PHIETAZ]->Fill(fCent, track.phi(), track.eta(), fVertex[2], corrInv);
159154
}
160155

161-
// for (UInt_t iaxis = 0; iaxis < 3; iaxis++)
162-
// fh_vertex[iaxis]->Fill(fVertex[iaxis]);
163156
ph1[HIST_TH1_ZVERTEX]->Fill(fVertex[2]);
164157
}
165158

PWGCF/JCorran/DataModel/JCatalyst.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ DECLARE_SOA_TABLE(JTracks, "AOD", "JTRACK", //! Reduced track table
4242
jtrack::JCollisionId,
4343
jtrack::Pt, jtrack::Eta, jtrack::Phi, jtrack::Sign);
4444
using JTrack = JTracks::iterator;
45+
46+
namespace jweight
47+
{
48+
DECLARE_SOA_COLUMN(WeightNUA, weightNUA, float); //! Non-uniform acceptance weight
49+
DECLARE_SOA_COLUMN(WeightEff, weightEff, float); //! Non-uniform efficiency weight
50+
} // namespace jweight
51+
DECLARE_SOA_TABLE(JWeights, "AOD", "JWEIGHT", jweight::WeightNUA, jweight::WeightEff); //! JFluc table for weights
52+
4553
} // namespace o2::aod
4654

4755
#endif // PWGCF_JCORRAN_DATAMODEL_JCATALYST_H_

PWGCF/JCorran/Tasks/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ o2physics_add_dpl_workflow(jfluc-analysis
1414
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::JCorran
1515
COMPONENT_NAME Analysis)
1616

17+
o2physics_add_dpl_workflow(jfluc-weights-loader
18+
SOURCES jflucWeightsLoader.cxx
19+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::JCorran
20+
COMPONENT_NAME Analysis)
21+
1722
o2physics_add_dpl_workflow(flow-spc
1823
SOURCES flowJSPCAnalysis.cxx
1924
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::JCorran
@@ -22,4 +27,4 @@ o2physics_add_dpl_workflow(flow-spc
2227
o2physics_add_dpl_workflow(flow-nuacreation
2328
SOURCES flowJNUACreation.cxx
2429
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::JCorran
25-
COMPONENT_NAME Analysis)
30+
COMPONENT_NAME Analysis)

0 commit comments

Comments
 (0)