Skip to content

Commit

Permalink
fix struct counters
Browse files Browse the repository at this point in the history
  • Loading branch information
ddobrigk committed Oct 10, 2024
1 parent 7a2b097 commit 598c4a0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 29 deletions.
54 changes: 28 additions & 26 deletions PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,17 @@ struct strangederivedbuilder {
Configurable<bool> roundNSigmaVariables{"roundNSigmaVariables", false, "round NSigma variables"};
Configurable<float> precisionNSigmas{"precisionNSigmas", 0.1f, "precision to keep NSigmas"};

Configurable<bool> fillRawFT0A{"fillRawFT0A", false, "Fill raw FT0A information for debug"};
Configurable<bool> fillRawFT0C{"fillRawFT0C", true, "Fill raw FT0C information for debug"};
Configurable<bool> fillRawFV0A{"fillRawFV0A", false, "Fill raw FV0A information for debug"};
Configurable<bool> fillRawFDDA{"fillRawFDDA", false, "Fill raw FDDA information for debug"};
Configurable<bool> fillRawFDDC{"fillRawFDDC", false, "Fill raw FDDC information for debug"};
Configurable<bool> fillRawZDC{"fillRawZDC", false, "Fill raw ZDC information for debug"};
Configurable<bool> fillRawNTracksEta1{"fillRawNTracksEta1", true, "Fill raw NTracks |eta|<1 information for debug"};
Configurable<bool> fillRawNTracksForCorrelation{"fillRawNTracksForCorrelation", true, "Fill raw NTracks for correlation cuts"};
Configurable<bool> fillTOFInformation{"fillTOFInformation", true, "Fill Daughter Track TOF information"};
struct : ConfigurableGroup {
Configurable<bool> fillRawFT0A{"fillRawFT0A", false, "Fill raw FT0A information for debug"};
Configurable<bool> fillRawFT0C{"fillRawFT0C", true, "Fill raw FT0C information for debug"};
Configurable<bool> fillRawFV0A{"fillRawFV0A", false, "Fill raw FV0A information for debug"};
Configurable<bool> fillRawFDDA{"fillRawFDDA", false, "Fill raw FDDA information for debug"};
Configurable<bool> fillRawFDDC{"fillRawFDDC", false, "Fill raw FDDC information for debug"};
Configurable<bool> fillRawZDC{"fillRawZDC", false, "Fill raw ZDC information for debug"};
Configurable<bool> fillRawNTracksEta1{"fillRawNTracksEta1", true, "Fill raw NTracks |eta|<1 information for debug"};
Configurable<bool> fillRawNTracksForCorrelation{"fillRawNTracksForCorrelation", true, "Fill raw NTracks for correlation cuts"};
Configurable<bool> fillTOFInformation{"fillTOFInformation", true, "Fill Daughter Track TOF information"};
} fillTruncationOptions;

Configurable<bool> qaCentrality{"qaCentrality", false, "qa centrality flag: check base raw values"};
struct : ConfigurableGroup {
Expand Down Expand Up @@ -352,23 +354,23 @@ struct strangederivedbuilder {
strangeCents(collision.centFT0M(), collision.centFT0A(),
centrality, collision.centFV0A());
strangeEvSels(collision.sel8(), collision.selection_raw(),
collision.multFT0A() * static_cast<float>(fillRawFT0A),
collision.multFT0C() * static_cast<float>(fillRawFT0C),
collision.multFV0A() * static_cast<float>(fillRawFV0A),
collision.multFDDA() * static_cast<float>(fillRawFDDA),
collision.multFDDC() * static_cast<float>(fillRawFDDC),
collision.multNTracksPVeta1() * static_cast<int>(fillRawNTracksEta1),
collision.multPVTotalContributors() * static_cast<int>(fillRawNTracksForCorrelation),
collision.multNTracksGlobal() * static_cast<int>(fillRawNTracksForCorrelation),
collision.multNTracksITSTPC() * static_cast<int>(fillRawNTracksForCorrelation),
collision.multAllTracksTPCOnly() * static_cast<int>(fillRawNTracksForCorrelation),
collision.multAllTracksITSTPC() * static_cast<int>(fillRawNTracksForCorrelation),
collision.multZNA() * static_cast<float>(fillRawZDC),
collision.multZNC() * static_cast<float>(fillRawZDC),
collision.multZEM1() * static_cast<float>(fillRawZDC),
collision.multZEM2() * static_cast<float>(fillRawZDC),
collision.multZPA() * static_cast<float>(fillRawZDC),
collision.multZPC() * static_cast<float>(fillRawZDC),
collision.multFT0A() * static_cast<float>(fillTruncationOptions.fillRawFT0A),
collision.multFT0C() * static_cast<float>(fillTruncationOptions.fillRawFT0C),
collision.multFV0A() * static_cast<float>(fillTruncationOptions.fillRawFV0A),
collision.multFDDA() * static_cast<float>(fillTruncationOptions.fillRawFDDA),
collision.multFDDC() * static_cast<float>(fillTruncationOptions.fillRawFDDC),
collision.multNTracksPVeta1() * static_cast<int>(fillTruncationOptions.fillRawNTracksEta1),
collision.multPVTotalContributors() * static_cast<int>(fillTruncationOptions.fillRawNTracksForCorrelation),
collision.multNTracksGlobal() * static_cast<int>(fillTruncationOptions.fillRawNTracksForCorrelation),
collision.multNTracksITSTPC() * static_cast<int>(fillTruncationOptions.fillRawNTracksForCorrelation),
collision.multAllTracksTPCOnly() * static_cast<int>(fillTruncationOptions.fillRawNTracksForCorrelation),
collision.multAllTracksITSTPC() * static_cast<int>(fillTruncationOptions.fillRawNTracksForCorrelation),
collision.multZNA() * static_cast<float>(fillTruncationOptions.fillRawZDC),
collision.multZNC() * static_cast<float>(fillTruncationOptions.fillRawZDC),
collision.multZEM1() * static_cast<float>(fillTruncationOptions.fillRawZDC),
collision.multZEM2() * static_cast<float>(fillTruncationOptions.fillRawZDC),
collision.multZPA() * static_cast<float>(fillTruncationOptions.fillRawZDC),
collision.multZPC() * static_cast<float>(fillTruncationOptions.fillRawZDC),
collision.trackOccupancyInTimeRange(),
// UPC info
gapSide,
Expand Down
10 changes: 7 additions & 3 deletions PWGLF/Tasks/QC/strangederivedqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct strangederivedqa {
}

// Real data processing
void processDerived(aod::StraCollisions const& collisions, aod::Origins const& origins, soa::Join<aod::V0CollRefs, aod::V0Cores> const& fullV0s)
void processDerived(aod::StraCollisions const& collisions, aod::StraOrigins const& origins, soa::Join<aod::V0CollRefs, aod::V0Cores> const& fullV0s)
{
histos.fill(HIST("hDFCounter"), 0.0f);
histos.fill(HIST("hEventCounter"), 0.0f, 0.0f, collisions.size());
Expand All @@ -129,7 +129,7 @@ struct strangederivedqa {

if(verbose){
auto origin = origins.begin();
LOGF(info, "Sorted DF ID: %lld collisions: %i V0s: %i", origin.dataframeID(), collisions.size(), fullV0s.size());
LOGF(info, "Sorted DF ID: %lld collisions: %i V0s: %i Origins size: %i", origin.dataframeID(), collisions.size(), fullV0s.size(), origins.size());
}
}else{
histos.fill(HIST("hEventCounter"), 0.0f, 2.0f, collisions.size());
Expand All @@ -138,7 +138,11 @@ struct strangederivedqa {

if(verbose){
auto origin = origins.begin();
LOGF(info, "Unsorted DF ID: %lld collisions: %i V0s: %i", origin.dataframeID(), collisions.size(), fullV0s.size());
LOGF(info, "Unsorted DF ID: %lld collisions: %i V0s: %i Origins size: %i", origin.dataframeID(), collisions.size(), fullV0s.size(), origins.size());
uint64_t directoryName = origin.dataframeID();
for(auto const& orig : origins){
LOGF(info, "Unsorted DF ID: %lld separate origin: %lld", directoryName, orig.dataframeID());
}
}
}
}
Expand Down

0 comments on commit 598c4a0

Please sign in to comment.