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+ //
12+ // / \file lumiVertex.cxx
13+ // / \brief Codes for the vdM scan analysis based on the Primary Vertex reconstruction. The code is based on the lumiTask in O2Physics/PWGMM/Lumi/Tasks/lumi.cxx.
14+ // /
1115// / \author Minjae Kim <minjae.kim@cern.ch>
12- // / \brief Codes for the vdM scan analysis based on the Primary Vertex reconstruction. The code is based on the lumiTask in O2Physics/PWGMM/Lumi/Tasks/lumi.cxx
1316// / \since Aug.06. 2026
1417
1518#include " Common/CCDB/EventSelectionParams.h"
@@ -60,7 +63,7 @@ DECLARE_SOA_COLUMN(VertexXY, vertexXY, double);
6063
6164DECLARE_SOA_COLUMN (VertexChi2, vertexChi2, double );
6265DECLARE_SOA_COLUMN (NContrib, nContrib, int );
63- DECLARE_SOA_COLUMN (BCID , bcid, int32_t );
66+ DECLARE_SOA_COLUMN (Bcid , bcid, int32_t );
6467DECLARE_SOA_COLUMN (RunNumber, runNumber, int32_t );
6568DECLARE_SOA_COLUMN (GlobalBC, globalBC, uint64_t );
6669DECLARE_SOA_COLUMN (LocalBC, localBC, int32_t );
@@ -71,35 +74,35 @@ DECLARE_SOA_COLUMN(HasFT0TVX, hasFT0TVX, bool);
7174DECLARE_SOA_COLUMN (IsCollisionTVX, isCollisionTVX, bool );
7275DECLARE_SOA_COLUMN (HasAnyFT0Trigger, hasAnyFT0Trigger, bool );
7376DECLARE_SOA_COLUMN (HasFT0AC, hasFT0AC, bool );
74- DECLARE_SOA_COLUMN (FT0TriggerMask , ft0TriggerMask, uint8_t );
75- DECLARE_SOA_COLUMN (FT0Rate , ft0Rate, float );
77+ DECLARE_SOA_COLUMN (Ft0TriggerMask , ft0TriggerMask, uint8_t );
78+ DECLARE_SOA_COLUMN (Ft0Rate , ft0Rate, float );
7679DECLARE_SOA_COLUMN (NCollisions, nCollisions, int32_t );
7780DECLARE_SOA_COLUMN (NSelectedCollisions, nSelectedCollisions, int32_t );
7881DECLARE_SOA_COLUMN (IsCollidingBC, isCollidingBC, bool );
7982DECLARE_SOA_COLUMN (IsFT0SuperLeading, isFT0SuperLeading, bool );
8083DECLARE_SOA_COLUMN (HasPreviousFT0Activity, hasPreviousFT0Activity, bool ); // ! Whether a preceding FT0 CTP activity was observed
81- DECLARE_SOA_COLUMN (BCsSinceLastFT0Activity , bcsSinceLastFT0Activity, int64_t ); // ! -1 when the preceding activity is unknown
82- DECLARE_SOA_COLUMN (PVRefitValid , pvRefitValid, bool );
84+ DECLARE_SOA_COLUMN (BcsSinceLastFT0Activity , bcsSinceLastFT0Activity, int64_t ); // ! -1 when the preceding activity is unknown
85+ DECLARE_SOA_COLUMN (PvRefitValid , pvRefitValid, bool );
8386} // namespace full
8487DECLARE_SOA_TABLE (EventInfo, " AOD" , " EventInfo" , full::TimeStamp, full::VertexX,
8588 full::VertexY, full::VertexZ,
8689
8790 full::VertexXX, full::VertexYY, full::VertexXY,
8891
89- full::VertexChi2, full::NContrib, full::BCID , full::RunNumber,
92+ full::VertexChi2, full::NContrib, full::Bcid , full::RunNumber,
9093 full::GlobalBC, full::HasFT0TVX, full::IsCollisionTVX,
9194 full::HasAnyFT0Trigger,
9295 full::IsCollidingBC, full::IsFT0SuperLeading,
93- full::HasPreviousFT0Activity, full::BCsSinceLastFT0Activity ,
94- full::PVRefitValid );
96+ full::HasPreviousFT0Activity, full::BcsSinceLastFT0Activity ,
97+ full::PvRefitValid );
9598DECLARE_SOA_TABLE (EventInfoBC, " AOD" , " EventInfoBC" , full::RunNumber,
9699 full::TimeStamp, full::GlobalBC, full::LocalBC,
97100 full::InputMask, full::HasFT0, full::HasFoundFT0,
98101 full::HasFT0TVX, full::HasAnyFT0Trigger, full::HasFT0AC,
99- full::FT0TriggerMask , full::FT0Rate , full::NCollisions,
102+ full::Ft0TriggerMask , full::Ft0Rate , full::NCollisions,
100103 full::NSelectedCollisions, full::IsCollidingBC,
101104 full::IsFT0SuperLeading, full::HasPreviousFT0Activity,
102- full::BCsSinceLastFT0Activity );
105+ full::BcsSinceLastFT0Activity );
103106} // namespace o2::aod
104107
105108using namespace o2 ;
@@ -110,12 +113,12 @@ using MyBCs = soa::Join<aod::BCs, aod::BcSels, aod::Timestamps, aod::Run3Matched
110113using CollisionsWithEvSels = soa::Join<aod::Collisions, aod::EvSels>;
111114using UnfilteredTracks = soa::Join<aod::Tracks, aod::TracksCov, aod::TracksExtra>;
112115
113- struct lumiTask {
116+ struct LumiVertex {
114117 Produces<o2::aod::EventInfo> rowEventInfo;
115118 Produces<o2::aod::EventInfoBC> rowEventInfoBC;
116119 Service<o2::ccdb::BasicCCDBManager> ccdb;
117- const char * ccdbpath_grp = " GLO/Config/GRPMagField" ;
118- const char * ccdbpath_lut = " GLO/Param/MatLUT" ;
120+ const char * ccdbPathGrp = " GLO/Config/GRPMagField" ;
121+ const char * ccdbPathLut = " GLO/Param/MatLUT" ;
119122 const char * ccdburl = " http://alice-ccdb.cern.ch" ;
120123 int mFieldRunNumber = -1 ;
121124 o2::base::MatLayerCylSet* mMatLUT = nullptr ;
@@ -273,7 +276,7 @@ struct lumiTask {
273276 " Mean refitted vertex y in TVX non-super-leading BCs;BC ID in orbit;#LT y_{refit} #GT (cm)" ,
274277 {HistType::kTProfile , {{o2::constants::lhc::LHCMaxBunches, -0.5 , o2::constants::lhc::LHCMaxBunches - 0.5 , " BC ID in orbit" }}}}}};
275278 // CTP input 3 is MTVX; std::bitset uses a zero-based bit index.
276- static constexpr uint8_t kFT0TVXInputBit = 2 ;
279+ static constexpr uint8_t FT0TVXInputBit = 2 ;
277280
278281 static bool hasFT0ACCoincidence (uint8_t triggerMask)
279282 {
@@ -284,7 +287,7 @@ struct lumiTask {
284287 static bool hasAnyFT0Trigger (const std::bitset<64 >& ctpInputMask)
285288 {
286289 return ctpInputMask.test (0 ) || ctpInputMask.test (1 ) ||
287- ctpInputMask.test (kFT0TVXInputBit ) || ctpInputMask.test (3 ) ||
290+ ctpInputMask.test (FT0TVXInputBit ) || ctpInputMask.test (3 ) ||
288291 ctpInputMask.test (4 );
289292 }
290293
@@ -365,7 +368,7 @@ struct lumiTask {
365368 FT0SuperLeadingInfo result;
366369 result.isCollidingBC = mCollidingBCPattern .test (localBC);
367370 result.hasFT0Activity = hasAnyFT0Trigger (ctpInputMask);
368- result.hasFT0TVX = ctpInputMask.test (kFT0TVXInputBit );
371+ result.hasFT0TVX = ctpInputMask.test (FT0TVXInputBit );
369372 result.hasPreviousFT0Activity =
370373 mHasPreviousFT0Activity && globalBC > mGlobalBCOfLastFT0Activity ;
371374
@@ -399,7 +402,7 @@ struct lumiTask {
399402 }
400403
401404 auto * grpo = ccdb->getForTimeStamp <o2::parameters::GRPMagField>(
402- ccdbpath_grp , bc.timestamp ());
405+ ccdbPathGrp , bc.timestamp ());
403406 if (grpo == nullptr ) {
404407 LOGF (fatal,
405408 " GRP object is not available in CCDB for run=%d at timestamp=%llu" ,
@@ -409,7 +412,7 @@ struct lumiTask {
409412
410413 if (basicConfig.useMatCorrLUT ) {
411414 auto * rawLUT = ccdb->getForTimeStamp <o2::base::MatLayerCylSet>(
412- ccdbpath_lut , bc.timestamp ());
415+ ccdbPathLut , bc.timestamp ());
413416 if (rawLUT == nullptr ) {
414417 LOGF (fatal,
415418 " Material LUT is not available in CCDB for run=%d at timestamp=%llu" ,
@@ -752,6 +755,6 @@ struct lumiTask {
752755
753756WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
754757{
755- WorkflowSpec w{adaptAnalysisTask<lumiTask >(cfgc, TaskName{ " lumiVertex " } )};
758+ WorkflowSpec w{adaptAnalysisTask<LumiVertex >(cfgc)};
756759 return w;
757760}
0 commit comments