-
Notifications
You must be signed in to change notification settings - Fork 615
[PWGDQ] Add ReducedFIT table for UPC analysis #13773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a18e2c6
[PWGDQ] Add ReducedFIT table for UPC analysis
minjungkim12 aaf800e
[PWGDQ] Refactor FIT handling to use VarManager::FillFIT()
minjungkim12 fdb1a5a
[PWGDQ] Complete FIT pileup flags and fired channels implementation
minjungkim12 626f509
[PWGDQ] Add name mappings for all FIT detector variables
minjungkim12 a7a895f
[PWGDQ] Add variable names and units for all FIT detector variables
minjungkim12 5c4394f
[PWGDQ] Fix pileup flag bit operations for float values array
minjungkim12 a4ce877
Add simple BC-based FillFIT following ZDC pattern
minjungkim12 ceffd7d
[PWGDQ] Add debug logging to FillFIT BC path
minjungkim12 33af1e3
[PWGDQ] Add processPbPbWithFilterBarrelOnlyWithFIT for UPC analysis w…
minjungkim12 b299ebf
[PWGDQ] Fix FIT detector accessor method names in BC-based FillFIT
minjungkim12 b9437df
Fix FIT detector amplitude initialization and fired channel counting
minjungkim12 dd935bb
[PWGDQ] Fix FIT detector filling by extracting detector objects expli…
minjungkim12 4934b53
[PWGDQ] Refactor FIT detector filling and add background pileup info
minjungkim12 56c66ad
fix based on Ionut's comments and suggestions
minjungkim12 962d88d
fix unused param error and minor improvement of FIllFIT info in VarMa…
minjungkim12 99fc3b0
fix handling unused paramemeter
minjungkim12 8bad4c2
Merge remote-tracking branch 'upstream/master' into FitInfo_UPC_DQ
minjungkim12 9a9e093
code optimization for filling FIT info; support native UDhelper
minjungkim12 d107c17
Please consider the following formatting changes
alibuild f33c655
Merge pull request #2 from alibuild/alibot-cleanup-13773
minjungkim12 360cf31
Comment out rapidity gap filter constant
minjungkim12 e5fe13c
Please consider the following formatting changes
alibuild 029982d
Merge pull request #3 from alibuild/alibot-cleanup-13773
minjungkim12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -131,6 +131,7 @@ constexpr static uint32_t gkEventFillMapWithMultsZdc = VarManager::ObjTypes::BC | |
| constexpr static uint32_t gkEventFillMapWithMultsAndEventFilter = VarManager::ObjTypes::BC | VarManager::ObjTypes::Collision | VarManager::ObjTypes::CollisionMult | VarManager::ObjTypes::CollisionMultExtra | VarManager::ObjTypes::EventFilter; | ||
| constexpr static uint32_t gkEventFillMapWithMultsEventFilterZdc = VarManager::ObjTypes::BC | VarManager::ObjTypes::Collision | VarManager::ObjTypes::CollisionMult | VarManager::ObjTypes::CollisionMultExtra | VarManager::ObjTypes::EventFilter | VarManager::ObjTypes::Zdc; | ||
| constexpr static uint32_t gkEventFillMapWithMultsRapidityGapFilterZdc = VarManager::ObjTypes::BC | VarManager::ObjTypes::Collision | VarManager::ObjTypes::CollisionMult | VarManager::ObjTypes::CollisionMultExtra | VarManager::ObjTypes::RapidityGapFilter | VarManager::ObjTypes::Zdc; | ||
| constexpr static uint32_t gkEventFillMapWithMultsRapidityGapFilterZdcFit = VarManager::ObjTypes::BC | VarManager::ObjTypes::Collision | VarManager::ObjTypes::CollisionMult | VarManager::ObjTypes::CollisionMultExtra | VarManager::ObjTypes::RapidityGapFilter | VarManager::ObjTypes::Zdc | VarManager::ObjTypes::ReducedFit; | ||
| // constexpr static uint32_t gkEventFillMapWithCent = VarManager::ObjTypes::BC | VarManager::ObjTypes::Collision | VarManager::ObjTypes::CollisionCent; | ||
| constexpr static uint32_t gkEventFillMapWithCentAndMults = VarManager::ObjTypes::BC | VarManager::ObjTypes::Collision | VarManager::ObjTypes::CollisionCent | VarManager::CollisionMult | VarManager::ObjTypes::CollisionMultExtra; | ||
| constexpr static uint32_t gkEventFillMapWithMultsExtra = VarManager::ObjTypes::BC | VarManager::ObjTypes::Collision | VarManager::CollisionMult | VarManager::ObjTypes::CollisionMultExtra; | ||
|
|
@@ -167,6 +168,7 @@ struct TableMaker { | |
| Produces<ReducedEventsVtxCov> eventVtxCov; | ||
| Produces<ReducedEventsInfo> eventInfo; | ||
| Produces<ReducedZdcs> zdc; | ||
| Produces<ReducedFITs> fit; | ||
| Produces<ReducedEventsMultPV> multPV; | ||
| Produces<ReducedEventsMultAll> multAll; | ||
| Produces<ReducedTracksBarrelInfo> trackBarrelInfo; | ||
|
|
@@ -861,6 +863,56 @@ struct TableMaker { | |
| VarManager::FillZDC(bc_zdc); | ||
| } | ||
| } | ||
| // Fill FIT info using newbc pattern for UPC events (similar to ZDC) | ||
| if constexpr ((TEventFillMap & VarManager::ObjTypes::ReducedFit) > 0) { | ||
| if constexpr ((TEventFillMap & VarManager::ObjTypes::RapidityGapFilter) > 0) { | ||
| // The DQRapidityGapFilter contains the index of the bc we want to get FIT info from | ||
| auto newbc = bcs.rawIteratorAt(collision.newBcIndex()); | ||
| // Fill FIT information from newbc | ||
| if (newbc.has_foundFT0()) { | ||
|
||
| auto ft0 = newbc.foundFT0(); | ||
| VarManager::fgValues[VarManager::kTimeFT0A] = ft0.timeA(); | ||
| VarManager::fgValues[VarManager::kTimeFT0C] = ft0.timeC(); | ||
| const auto& ampsA = ft0.amplitudeA(); | ||
| const auto& ampsC = ft0.amplitudeC(); | ||
| VarManager::fgValues[VarManager::kAmplitudeFT0A] = 0.f; | ||
| for (auto amp : ampsA) | ||
| VarManager::fgValues[VarManager::kAmplitudeFT0A] += amp; | ||
| VarManager::fgValues[VarManager::kAmplitudeFT0C] = 0.f; | ||
| for (auto amp : ampsC) | ||
| VarManager::fgValues[VarManager::kAmplitudeFT0C] += amp; | ||
| VarManager::fgValues[VarManager::kNFiredChannelsFT0A] = ft0.channelA().size(); | ||
| VarManager::fgValues[VarManager::kNFiredChannelsFT0C] = ft0.channelC().size(); | ||
| VarManager::fgValues[VarManager::kTriggerMaskFT0] = ft0.triggerMask(); | ||
| } | ||
| if (newbc.has_foundFV0()) { | ||
| auto fv0a = newbc.foundFV0(); | ||
| VarManager::fgValues[VarManager::kTimeFV0A] = fv0a.time(); | ||
| const auto& amps = fv0a.amplitude(); | ||
| VarManager::fgValues[VarManager::kAmplitudeFV0A] = 0.f; | ||
| for (auto amp : amps) | ||
| VarManager::fgValues[VarManager::kAmplitudeFV0A] += amp; | ||
| VarManager::fgValues[VarManager::kNFiredChannelsFV0A] = fv0a.channel().size(); | ||
| VarManager::fgValues[VarManager::kTriggerMaskFV0A] = fv0a.triggerMask(); | ||
| } | ||
| if (newbc.has_foundFDD()) { | ||
| auto fdd = newbc.foundFDD(); | ||
| VarManager::fgValues[VarManager::kTimeFDDA] = fdd.timeA(); | ||
| VarManager::fgValues[VarManager::kTimeFDDC] = fdd.timeC(); | ||
| const auto& ampsA = fdd.chargeA(); | ||
| const auto& ampsC = fdd.chargeC(); | ||
| VarManager::fgValues[VarManager::kAmplitudeFDDA] = 0.f; | ||
| for (auto amp : ampsA) | ||
| VarManager::fgValues[VarManager::kAmplitudeFDDA] += amp; | ||
| VarManager::fgValues[VarManager::kAmplitudeFDDC] = 0.f; | ||
| for (auto amp : ampsC) | ||
| VarManager::fgValues[VarManager::kAmplitudeFDDC] += amp; | ||
| VarManager::fgValues[VarManager::kNFiredChannelsFDDA] = fdd.channelA().size(); | ||
| VarManager::fgValues[VarManager::kNFiredChannelsFDDC] = fdd.channelC().size(); | ||
| VarManager::fgValues[VarManager::kTriggerMaskFDD] = fdd.triggerMask(); | ||
| } | ||
| } | ||
| } | ||
| if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionMultExtra) > 0 && (TTrackFillMap & VarManager::ObjTypes::Track) > 0 && (TTrackFillMap & VarManager::ObjTypes::TrackDCA) > 0) { | ||
| auto groupedTrackIndices = trackAssocs.sliceBy(trackIndicesPerCollision, collision.globalIndex()); | ||
| VarManager::FillEventTrackEstimators<TTrackFillMap>(collision, groupedTrackIndices, tracks); | ||
|
|
@@ -968,6 +1020,37 @@ struct TableMaker { | |
| zdc(-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0); | ||
| } | ||
| } | ||
| // Fill FIT table if requested | ||
| if constexpr ((TEventFillMap & VarManager::ObjTypes::ReducedFit) > 0) { | ||
| fit(VarManager::fgValues[VarManager::kAmplitudeFT0A], VarManager::fgValues[VarManager::kAmplitudeFT0C], | ||
| VarManager::fgValues[VarManager::kTimeFT0A], VarManager::fgValues[VarManager::kTimeFT0C], | ||
| static_cast<uint8_t>(VarManager::fgValues[VarManager::kTriggerMaskFT0]), | ||
| static_cast<int>(VarManager::fgValues[VarManager::kNFiredChannelsFT0A]), | ||
| static_cast<int>(VarManager::fgValues[VarManager::kNFiredChannelsFT0C]), | ||
| VarManager::fgValues[VarManager::kAmplitudeFDDA], VarManager::fgValues[VarManager::kAmplitudeFDDC], | ||
| VarManager::fgValues[VarManager::kTimeFDDA], VarManager::fgValues[VarManager::kTimeFDDC], | ||
| static_cast<uint8_t>(VarManager::fgValues[VarManager::kTriggerMaskFDD]), | ||
| static_cast<int>(VarManager::fgValues[VarManager::kNFiredChannelsFDDA]), | ||
| static_cast<int>(VarManager::fgValues[VarManager::kNFiredChannelsFDDC]), | ||
| VarManager::fgValues[VarManager::kAmplitudeFV0A], VarManager::fgValues[VarManager::kTimeFV0A], | ||
| static_cast<uint8_t>(VarManager::fgValues[VarManager::kTriggerMaskFV0A]), | ||
| static_cast<int>(VarManager::fgValues[VarManager::kNFiredChannelsFV0A]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBBFT0Apf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBGFT0Apf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBBFT0Cpf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBGFT0Cpf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBBFV0Apf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBGFV0Apf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBBFDDApf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBGFDDApf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBBFDDCpf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kBGFDDCpf]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kDistClosestBcTOR]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kDistClosestBcTSC]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kDistClosestBcTVX]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kDistClosestBcV0A]), | ||
| static_cast<int32_t>(VarManager::fgValues[VarManager::kDistClosestBcT0A])); | ||
| } | ||
| if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionMultExtra) > 0) { | ||
| multPV(collision.multNTracksHasITS(), collision.multNTracksHasTPC(), collision.multNTracksHasTOF(), collision.multNTracksHasTRD(), | ||
| collision.multNTracksITSOnly(), collision.multNTracksTPCOnly(), collision.multNTracksITSTPC(), | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this function you do not cover the case when the FIT data is in the reduced DQ data model and is being used from the analysis workflow (e.g. from table reader). Is this something you plan to add later or?