Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Dec 15, 2024
1 parent 0831987 commit 03d8511
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 55 deletions.
23 changes: 11 additions & 12 deletions PWGUD/DataModel/UDTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,17 @@ DECLARE_SOA_TABLE(UDCollisionSelExtras_000, "AOD", "UDCOLSELEXTRA",
udcollision::ChFV0A); //! number of active channels in FV0A

DECLARE_SOA_TABLE_VERSIONED(UDCollisionSelExtras_001, "AOD", "UDCOLSELEXTRA", 1,
udcollision::ChFT0A, //! number of active channels in FT0A
udcollision::ChFT0C, //! number of active channels in FT0C
udcollision::ChFDDA, //! number of active channels in FDDA
udcollision::ChFDDC, //! number of active channels in FDDC
udcollision::ChFV0A, //! number of active channels in FV0A
udcollision::OccupancyInTime, //! Occupancy
udcollision::HadronicRate, //! Interaction Rate
udcollision::Trs,
udcollision::Trofs,
udcollision::Hmpr
);

udcollision::ChFT0A, //! number of active channels in FT0A
udcollision::ChFT0C, //! number of active channels in FT0C
udcollision::ChFDDA, //! number of active channels in FDDA
udcollision::ChFDDC, //! number of active channels in FDDC
udcollision::ChFV0A, //! number of active channels in FV0A
udcollision::OccupancyInTime, //! Occupancy
udcollision::HadronicRate, //! Interaction Rate
udcollision::Trs,
udcollision::Trofs,
udcollision::Hmpr);

// central barrel-specific selections
DECLARE_SOA_TABLE(UDCollisionsSelsCent, "AOD", "UDCOLSELCNT",
udcollision::DBcTOR,
Expand Down
20 changes: 10 additions & 10 deletions PWGUD/TableProducer/Converters/UDCollisionSelExtrasConverter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ struct UDCollisionSelExtrasConverter {
for (const auto& collision : collisions) {

udCollisionSelExtras_001(collision.chFT0A(),
collision.chFT0C(),
collision.chFDDA(),
collision.chFDDC(),
collision.chFV0A(),
0, // dummy occupancy
0.0f, //dummy rate
0, //dummy trs
0, //dummy trofs
0 //dummy hmpr
);
collision.chFT0C(),
collision.chFDDA(),
collision.chFDDC(),
collision.chFV0A(),
0, // dummy occupancy
0.0f, // dummy rate
0, // dummy trs
0, // dummy trofs
0 // dummy hmpr
);
}
}
};
Expand Down
30 changes: 15 additions & 15 deletions PWGUD/TableProducer/DGCandProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using namespace o2::framework;
using namespace o2::framework::expressions;

struct DGCandProducer {
Service<o2::ccdb::BasicCCDBManager> ccdb;
Service<o2::ccdb::BasicCCDBManager> ccdb;
ctpRateFetcher mRateFetcher;
// get a DGCutparHolder
DGCutparHolder diffCuts = DGCutparHolder();
Expand Down Expand Up @@ -258,30 +258,30 @@ struct DGCandProducer {
registry.get<TH1>(HIST("reco/Stat"))->Fill(1., 1.);
auto bc = collision.foundBC_as<BCs>();
int trs = 0;
if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)){
trs = 1;
}
int trofs = 0;
if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)){
trofs = 1;
}
int hmpr = 0;
if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)){
hmpr = 1;
}
if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
trs = 1;
}
int trofs = 0;
if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
trofs = 1;
}
int hmpr = 0;
if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) {
hmpr = 1;
}
double ir = 0.;
const uint64_t ts = bc.timestamp();
const int runnumber = bc.runNumber();
if (bc.has_zdc()) {
ir = mRateFetcher.fetch(ccdb.service, ts, runnumber, "ZNC hadronic") * 1.e-3;
ir = mRateFetcher.fetch(ccdb.service, ts, runnumber, "ZNC hadronic") * 1.e-3;
}
uint8_t chFT0A = 0;
uint8_t chFT0C = 0;
uint8_t chFDDA = 0;
uint8_t chFDDC = 0;
uint8_t chFV0A = 0;
int occ = 0;
occ = collision.trackOccupancyInTimeRange();
occ = collision.trackOccupancyInTimeRange();
LOGF(debug, "<DGCandProducer> BC id %d", bc.globalBC());

// fill FIT histograms
Expand Down Expand Up @@ -321,7 +321,7 @@ struct DGCandProducer {
fitInfo.BBFT0Apf, fitInfo.BBFT0Cpf, fitInfo.BGFT0Apf, fitInfo.BGFT0Cpf,
fitInfo.BBFV0Apf, fitInfo.BGFV0Apf,
fitInfo.BBFDDApf, fitInfo.BBFDDCpf, fitInfo.BGFDDApf, fitInfo.BGFDDCpf);
outputCollisionSelExtras(chFT0A, chFT0C, chFDDA, chFDDC, chFV0A, occ, ir, trs, trofs, hmpr);
outputCollisionSelExtras(chFT0A, chFT0C, chFDDA, chFDDC, chFV0A, occ, ir, trs, trofs, hmpr);
outputCollsLabels(collision.globalIndex());

// update DGTracks tables
Expand Down
34 changes: 16 additions & 18 deletions PWGUD/TableProducer/SGCandProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ using namespace o2::framework::expressions;
using namespace o2::dataformats;

struct SGCandProducer {
Service<o2::ccdb::BasicCCDBManager> ccdb;
// data inputs
Service<o2::ccdb::BasicCCDBManager> ccdb;
// data inputs
using CCs = soa::Join<aod::Collisions, aod::EvSels>;
using CC = CCs::iterator;
using BCs = soa::Join<aod::BCsWithTimestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
Expand Down Expand Up @@ -95,8 +95,6 @@ struct SGCandProducer {
"registry",
{}};



// function to update UDFwdTracks, UDFwdTracksExtra
template <typename TFwdTrack>
void updateUDFwdTrackTables(TFwdTrack const& fwdtrack, uint64_t const& bcnum)
Expand Down Expand Up @@ -221,23 +219,23 @@ struct SGCandProducer {
}
registry.get<TH1>(HIST("reco/Stat"))->Fill(6., 1.);
int trs = 0;
if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)){
trs = 1;
}
int trofs = 0;
if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)){
trofs = 1;
}
int hmpr = 0;
if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)){
hmpr = 1;
}
if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
trs = 1;
}
int trofs = 0;
if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
trofs = 1;
}
int hmpr = 0;
if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) {
hmpr = 1;
}
auto bc = collision.foundBC_as<BCs>();
double ir = 0.;
const uint64_t ts = bc.timestamp();
const int runnumber = bc.runNumber();
if (bc.has_zdc()) {
ir = mRateFetcher.fetch(ccdb.service, ts, runnumber, "ZNC hadronic") * 1.e-3;
ir = mRateFetcher.fetch(ccdb.service, ts, runnumber, "ZNC hadronic") * 1.e-3;
}
auto newbc = bc;

Expand Down Expand Up @@ -267,7 +265,7 @@ struct SGCandProducer {
uint8_t chFDDC = 0;
uint8_t chFV0A = 0;
int occ = 0;
occ = collision.trackOccupancyInTimeRange();
occ = collision.trackOccupancyInTimeRange();
udhelpers::getFITinfo(fitInfo, newbc, bcs, ft0s, fv0as, fdds);
// update SG candidates tables
int upc_flag = 0;
Expand All @@ -288,7 +286,7 @@ struct SGCandProducer {
fitInfo.BBFT0Apf, fitInfo.BBFT0Cpf, fitInfo.BGFT0Apf, fitInfo.BGFT0Cpf,
fitInfo.BBFV0Apf, fitInfo.BGFV0Apf,
fitInfo.BBFDDApf, fitInfo.BBFDDCpf, fitInfo.BGFDDApf, fitInfo.BGFDDCpf);
outputCollisionSelExtras(chFT0A, chFT0C, chFDDA, chFDDC, chFV0A, occ, ir, trs, trofs, hmpr);
outputCollisionSelExtras(chFT0A, chFT0C, chFDDA, chFDDC, chFV0A, occ, ir, trs, trofs, hmpr);
outputCollsLabels(collision.globalIndex());
if (newbc.has_zdc()) {
auto zdc = newbc.zdc();
Expand Down

0 comments on commit 03d8511

Please sign in to comment.