 |
Belle II Software
release-05-02-19
|
11 #include <framework/core/Module.h>
12 #include <framework/datastore/StoreArray.h>
14 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
41 class SPTCRefereeModule :
public Module {
56 typedef std::tuple<std::vector<int>, std::vector<int>>
CheckInfo;
176 const std::vector<bool>
getDirectionsOfFlight(
const std::vector<const Belle2::SpacePoint*>& spacePoints,
bool useMCInfo);
181 std::vector<Belle2::SpacePointTrackCand>
183 const CheckInfo& prevChecksInfo,
bool removedHits);
190 template <
typename TrueHitType>
235 return std::find_if(V.begin(), V.end(), [&P](
const T & aValue) { return (aValue < P.second && aValue >= P.first);}) != V.end();
std::vector< Belle2::SpacePointTrackCand > splitTrackCand(const Belle2::SpacePointTrackCand *trackCand, const std::vector< int > &splitIndices, bool onlyFirstPart, const CheckInfo &prevChecksInfo, bool removedHits)
split a curling SpacePointTrackCand into TrackStubs.
bool m_PARAMcheckIfFitted
if true it is looked for any related RecoTrack and if that RecoTrack has a valid fit.
unsigned int m_kickedSpacePointsCtr
counter of kicked SpacePoints
bool m_PARAMkeepOnlyFirstPart
parameter for keeping only the first part of a curling SpacePointTrackCand
void initialize() override
initialize: check StoreArrays, initialize counters, ...
B2Vector3F m_origin
origin used internally.
void initializeCounters()
initialize all counters to 0
bool getDirOfFlightTrueHit(const Belle2::SpacePoint *spacePoint, B2Vector3F origin)
get the direction of flight for a SpacePoint by using information from the underlying TrueHit NOTE: t...
const std::vector< int > checkMinDistance(Belle2::SpacePointTrackCand *trackCand, double minDistance)
Check if two subsequent SpacePoints are seperated by at least the provided minDistance.
unsigned int m_allInwardsCtr
counter for the number of SPTCs which have direction of flight inward for all SpacePoints in them
void event() override
event: check SpacePointTrackCands
std::string m_PARAMcurlingSuffix
Suffix that will be used to get a name for the StoreArray that holds the trackStubs that were obtaine...
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
const std::vector< int > removeSpacePoints(Belle2::SpacePointTrackCand *trackCand, const std::vector< int > &indsToRemove)
remove the SpacePoint passed to this function from the SpacePointTrackCand
const std::vector< bool > getDirectionsOfFlight(const std::vector< const Belle2::SpacePoint * > &spacePoints, bool useMCInfo)
get the directions of Flight for every SpacePoint in the passed vector.
bool m_PARAMstoreNewArray
parameter for indicating if all checked SpacePointTrackCands should be stored in a new StoreArray NOT...
void terminate() override
terminate: print some summary information
unsigned int m_curlingTracksCtr
counter for tracks that curl
std::vector< double > m_PARAMsetOrigin
assumed interaction point from which the SpacePointTrackCands emerge.
bool getDirOfFlightPosMom(B2Vector3F position, B2Vector3F momentum, B2Vector3F origin)
get the direction of flight provided the global position and momentum of a SpacePoint/TrueHit for the...
Abstract base class for different kinds of events.
void copyToNewStoreArray(const Belle2::SpacePointTrackCand *trackCand, Belle2::StoreArray< Belle2::SpacePointTrackCand > newStoreArray)
copy the SpacePointTrackCand to a new StoreArray and register a relation to the original trackCand
unsigned int m_SameSensorCtr
counter for TrackCands with SpacePoints on the same sensor
bool m_PARAMcheckMinDistance
parameter for indicating if the check for the minimal distance between two subsequent SpacePoints sho...
bool m_PARAMuseMCInfo
parameter for indicating if MC information should be used or not
std::string m_PARAMnewArrayName
Name of the output container of SpacePointTrackCands if 'storeNewArray' is set to true.
std::string m_curlingArrayName
name of the StoreArray in which the trackStubs from a curling SPTC are stored
bool m_PARAMkickSpacePoint
parameter for indicating if only the 'problematic' SpacePoint shall be removed from the SPTC or if th...
std::tuple< std::vector< int >, std::vector< int > > CheckInfo
typedef for storing the outcome of previously done checks to have them available later.
void addToStoreArray(const Belle2::SpacePointTrackCand &trackCand, Belle2::StoreArray< Belle2::SpacePointTrackCand > storeArray, const Belle2::SpacePointTrackCand *origTrackCand)
register the SpacePointTrackCand (i.e.
double m_PARAMminDistance
minimal distance two subsequent SpacePoints have to be seperated
SPTCRefereeModule()
Constructor.
const std::vector< int > checkSameSensor(Belle2::SpacePointTrackCand *trackCand)
Check if two subsequent SpacePoints are on the same sensor.
unsigned int m_regTrackStubsCtr
counter for the number of track stubs that were registered by this module
bool vectorHasValueBetween(std::vector< T > V, std::pair< T, T > P)
function to determine if any of the values in vector V are between the values of P (i....
bool m_PARAMsplitCurlers
parameter for switching on/off the splitting of curling SpacePointTrackCands
std::string m_PARAMsptcName
Name of input container of SpacePointTrackCands.
const std::vector< int > checkCurling(Belle2::SpacePointTrackCand *trackCand, bool useMCInfo)
Check if the SpacePointTrackCand shows curling behavior.
unsigned int m_totalTrackCandCtr
counter for the total number of TrackCands
bool m_PARAMcheckSameSensor
parameter for indicating if the check for subsequent SpacePoints being on the same sensor should be d...
int m_PARAMminNumSpacePoints
only keep track candidates which have at least m_PARAMminNumSpacePoints space points
Storage for (VXD) SpacePoint-based track candidates.
unsigned int m_minDistanceCtr
counter for TrackCands with SpacePoints not far enough apart
unsigned short int getCheckStatus(const Belle2::SpacePointTrackCand *trackCand)
get the checked referee status of a SPTC (i.e.
std::vector< bool > getDirsOfFlightSpacePoints(const std::vector< const Belle2::SpacePoint * > &spacePoints, B2Vector3F origin)
get the directions of flight for a vector of SpacePoints using only information from SpacePoints (i....
bool m_PARAMcheckCurling
parameter for indicating if the SpacePointTrackCand should be checked for curling