-
Notifications
You must be signed in to change notification settings - Fork 11
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
work impactkit #5
Open
jenniferzon
wants to merge
3
commits into
lhcb:master
Choose a base branch
from
jenniferzon:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
The PersistReco flag available in Turbo stream HLT2 lines allows all the reconstructed objects in an event to be saved to disk, rather than the usual behaviour of saving only the selected candidate. The objects can then be used in DaVinci just like in the stripping. This is useful when one wants to do things like spectroscopy studies, where there may be many final states of interesting that re-use the same ground state particle. Today, there is a bug that can cause the same underlying particle object to be used multiple times when building a decay. For example, if one takes a D0 → K-π+ candidate that fired an HLT2 line, and adds a pion from PersistReco, it is possible to end up with D0 π candidates where the pion from the D0 is also used as the bachelor. This behaviour should not occur, as it is not physical and is not useful for analysis, and can even give spurious physics results. | ||
|
||
We had a look at the CombineParticles() function to see where the overlap could be caused. There we found out that | ||
the function CombineParticles()::checkOverlap() normally ensures this does not happen. However, objects were cloned and | ||
saved at a new memory address, so that the same particles could be used again leading to unphysical situations. As each object has its own lhcbID, based on this a more thorough check can prevent any duplicates. The else statement below was added to the code "Phys/DaVinciOverlapsAndClones/src/CheckOverlap.cpp", in which the lhcbID check is done. | ||
|
||
```C++ | ||
//=========================================================================== | ||
// Check duplicate entries | ||
//=========================================================================== | ||
bool CheckOverlap::searchOverlap( std::vector<const LHCb::ProtoParticle* > & proto ) | ||
{ | ||
if (msgLevel(MSG::VERBOSE)) verbose() << "searchOverlap(protos)" << endmsg ; | ||
// It its a simple particle made from protoparticle. Check. | ||
|
||
for (std::vector<const LHCb::ProtoParticle* >::const_iterator i = proto.begin(); | ||
i != proto.end() ; ++i) | ||
{ | ||
for (std::vector<const LHCb::ProtoParticle* >::const_iterator j = i ; | ||
j != proto.end(); ++j) | ||
{ | ||
if (j==i) continue ; | ||
if ( *i==*j ) | ||
{ | ||
if (msgLevel(MSG::VERBOSE)) verbose() << "Found overlap " << *i << endmsg ; | ||
return true ; | ||
} | ||
else { | ||
const std::vector<LHCb::LHCbID> i_ids = (*i)->track()->lhcbIDs(); | ||
const std::vector<LHCb::LHCbID> j_ids = (*j)->track()->lhcbIDs(); | ||
std::vector<LHCb::LHCbID> diff; | ||
std::set_symmetric_difference(i_ids.begin(), i_ids.end(), j_ids.begin(), j_ids.end(), std::back_inserter(diff)); | ||
|
||
if (std::all_of(diff.begin(), diff.end(), [] (LHCb::LHCbID id) { return id.isCalo(); } )) | ||
{ | ||
if (msgLevel(MSG::VERBOSE)) verbose() << "Found overlap using LHCb IDs, ignoring isCalo IDs" << *i << endmsg ; | ||
return true; | ||
} | ||
} | ||
} | ||
} | ||
if (msgLevel(MSG::VERBOSE)) verbose() << "Found no overlap" << endmsg ; | ||
return false; | ||
} | ||
``` |
This file contains 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: PersistReco | ||
author: Andreas Weiden, Jennifer Zonneveld, Wojciech Krupa | ||
... |
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.
This is different to what's reported in LHCBPS-1537. We should make sure to update this.