 |
Belle II Software
release-05-02-19
|
12 #include <framework/core/Module.h>
13 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
14 #include <tracking/spacePointCreation/SpacePoint.h>
18 #include <framework/geometry/B2Vector3.h>
48 class CurlingTrackCandSplitterModule :
public Module {
57 void event()
override;
66 c_nPlanes = c_nSVDPlanes + c_nPXDPlanes,
70 struct RootVariables {
105 std::array<std::vector<double>, c_nPlanes>
MisMatchPosX;
109 std::array<std::vector<double>, c_nPlanes>
MisMatchPosZ;
117 std::array<std::vector<double>, c_nPlanes>
MisMatchMomX;
187 template<
class TrueHit>
194 const std::vector<Belle2::SpacePointTrackCand>
205 "Without a TrueHit a decision if a TrackCand is curling is not possible");
210 BELLE2_DEFINE_EXCEPTION(TrueHitsNotMatching,
"The TrueHits related to the two SVDClusters of a SpacePoint are not the same!")
281 template <class TrueHit>
int m_PARAMnTrackStubs
maximum number of TrackCand Stubs to be stored for a curling TrackCand
bool m_setU
indicator if U is set
std::array< std::vector< double >, c_nPlanes > PosResidueYGlobal
Y-position (global) difference between TrueHit and SpacePoint (layerwise)
bool m_PARAMuseNonSingleTHinPA
Switch for using SpacePoints in position Analysis that are related to more than one TrueHit.
std::array< std::vector< double >, c_nPlanes > m_rootGlobalPosResiduals
Global Position Residuals between TrueHits and SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > MisMatchPosU
Difference of U-positions (local) for mismatched TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueYGlobal
Y-position (global) difference between TrueHit and SpacePoint (layerwise)
const std::vector< int > checkTrackCandForCurling(const Belle2::SpacePointTrackCand &, RootVariables &rootVariables)
Check if the track candidate is curling.
TFile * m_rootFilePtr
Pointer to ROOT file.
bool getDirectionOfFlight(std::pair< const B2Vector3< double >, const B2Vector3< double > > const &hitPosAndMom, const B2Vector3< double > &origin)
determine the direction of flight of a particle for a given hit and the origin (assumed interaction p...
const std::vector< Belle2::SpacePointTrackCand > splitCurlingTrackCand(const Belle2::SpacePointTrackCand &SPTrackCand, int NTracklets, const std::vector< int > &splitIndices)
Split a culring track candidate into (up to NTracklets) tracklets.
int m_createdTrackStubsCtr
Counter for created TrackCand Stubs by splitting a SpacePointTrackCand.
std::array< std::vector< double >, c_nPlanes > SpacePointULocal
local u-positions of SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > TrueHitZGlobal
global z-positions of TrueHits (layerwise)
bool m_setV
indicator if V is set
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitYGlobals
Global V-Positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > MisMatchMomZ
Difference of Momentum in Z-Direction for TrueHits that do not match but are related from one SpacePo...
std::array< std::vector< double >, c_nPlanes > PosResidueZGlobal
Z-position (global) difference between TrueHit and SpacePoint (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosZ
Difference of Z-positions (global) for mismatched TrueHits (layerwise)
std::string m_PARAMcurlingOutFirstName
collection name of the first outgoing (i.e.
CurlingTrackCandSplitterModule()
Constructor.
int m_NoCurlingTCsCtr
Counter for SPTCs that were not curling and hence were added to the StoreArray of first out parts.
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchMomY
Difference of Momentum in Y-Direction for TrueHits that do not match but are related from one SpacePo...
std::array< std::vector< double >, c_nPlanes > SpacePointXGlobal
global x-positions of SpacePoints (layerwise)
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
TaggedUVPos getUV(const SpacePoint *spacePoint)
get U&V for a SpacePoint (via its relation to Clusters) (SpacePoint can only return normalized U&V co...
struct for easier handling of getting U- & V-position of SpacePoints and some difficulties that arise...
void writeToRoot(RootVariables &rootVariables)
Write previously collected values to ROOT file.
std::array< std::vector< double >, c_nPlanes > m_rootLocalPosResiduals
Local Position Residuals between TrueHits and SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > MisMatchMomX
Difference of Momentum in X-Direction for TrueHits that do not match but are related from one SpacePo...
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointXGlobals
Global X-Positions of SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > MisMatchPosZ
Difference of Z-positions (global) for mismatched TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointULocals
Local U-Positions of SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueULocal
U-position (local) differnece between TrueHit and SpacePoint (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointZGlobals
Global Z-Positions of SpacePoints (layerwise)
void terminate() override
terminate: print some summary on the modules work
std::string m_PARAMsptcName
collection name of the SpacePointTrackCands to be analyzed
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosV
Difference of V-positions (local) for mismatched TrueHits (layerwise)
void initialize() override
initialize: initialize counters, register stuff in DataStore, check if all necessary StoreArrays are ...
std::array< std::vector< double >, c_nPlanes > TrueHitYGlobal
global y-positions of TrueHits (layerwise)
bool m_PARAMpositionAnalysis
Set to true if output to ROOT file is desired with the positions and position differences of SpacePoi...
std::array< std::vector< double >, c_nPlanes > PosResidueVLocal
V-position (local) difference between TrueHit and SpacePoint (layerwise)
Class to collect log likelihoods from Clusters from ECL and KLM aimed for output to mdst includes fun...
TaggedUVPos()
default constructor initializes both bools to false and both doubles to 0.
std::string m_PARAMcompleteCurlerName
collection name of all parts of a curling TrackCand
Abstract base class for different kinds of events.
bool m_PARAMsplitCurlers
indicating if the SpacePointTrackCands should only be analyzed for curling behaviour,...
std::pair< const B2Vector3< double >, const B2Vector3< double > > getGlobalPositionAndMomentum(TrueHit *aTrueHit)
Get the global position and momentum for a given TrueHit (PXD or SVD at the moment).
std::array< std::vector< double >, c_nPlanes > TrueHitULocal
local u-positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueZGlobal
Z-position (global) difference between TrueHit and SpacePoint (layerwise)
std::string m_PARAMcurlingAllInName
collection name of all ingoing parts of a curling TrackCand
std::vector< std::string > m_PARAMrootFileName
two entries accepted.
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosX
Difference of X-positions (global) for mismatched TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointYGlobals
Global Y-Positions of SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > MisMatchPosX
Difference of X-positions (global) for mismatched TrueHits (layerwise)
bool m_saveCompleteCurler
set to true if all parts of a curling TrackCand should be stored in a separate StoreArray (no paramet...
std::array< std::vector< double >, c_nPlanes > SpacePointZGlobal
global z-positions of SpacePoints (layerwise)
int m_spacePointTCCtr
Counter for presented SpacePointTrackCands.
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchMomX
Difference of Momentum in X-Direction for TrueHits that do not match but are related from one SpacePo...
std::array< std::vector< double >, c_nPlanes > MisMatchPosY
Difference of Y-positions (global) for mismatched TrueHits (layerwise)
TTree * m_treePtr
Pointer to ROOT tree.
void event() override
event: check SpacePointTrackCand for curling behaviour, split if needed (and wanted by user)
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitVLocals
Local Y-Positions of TrueHits (layerwise)
int m_curlingTCCtr
Counter for TrackCands that show curling behaviour.
BELLE2_DEFINE_EXCEPTION(FoundNoTrueHit, "Found no TrueHit for one (or more) Cluster(s). " "Without a TrueHit a decision if a TrackCand is curling is not possible")
Exception for case when no TrueHit can be found for a Cluster.
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitULocals
Local X-Positions of TrueHits (layerwise)
B2Vector3< double > m_origin
origin used internally (set from user set value)
Internal DataStore for ROOT output variables.
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitZGlobals
Global Z-Positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitXGlobals
Global U-Positions of TrueHits (layerwise)
void initializeCounters()
initialize all counters to 0 for avoiding undeterministic behaviour.
std::array< std::vector< double >, c_nPlanes > TrueHitVLocal
local v-positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointVLocals
Local V-Positions of SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > PosResiduesGlobal
position differences in global coordinates (layerwise)
void getValuesForRoot(const SpacePoint *spacePoint, const TrueHit *trueHit, RootVariables &rootVariables)
Get The Values that are later written to a ROOT file.
std::array< std::vector< double >, c_nPlanes > PosResiduesLocal
position differences in local coordinates (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosU
Difference of U-positions (local) for mismatched TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchMomZ
Difference of Momentum in Z-Direction for TrueHits that do not match but are related from one SpacePo...
std::array< std::vector< double >, c_nPlanes > PosResidueXGlobal
X-position (global) difference between TrueHit and SpacePoint (layerwise)
int m_noDecisionPossibleCtr
Counter for TrackCands where a decision if curling or not is not possible.
std::vector< double > m_PARAMsetOrigin
set the origin to a specific point.
std::array< std::vector< double >, c_nPlanes > MisMatchPosResiduals
Distance between TrueHits that do not match but are related from one SpacePoint (layerwise)
std::array< std::vector< double >, c_nPlanes > SpacePointVLocal
local v-positions of SpacePoints (layerwise)
std::string m_PARAMcurlingOutRestName
collection name of all but the first outgoing parts of a curling TrackCand
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueXGlobal
X-position (global) difference between TrueHit and SpacePoint (layerwise)
std::array< std::vector< double >, c_nPlanes > MisMatchMomY
Difference of Momentum in Y-Direction for TrueHits that do not match but are related from one SpacePo...
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueVLocal
V-position (local) difference between TrueHit and SpacePoint (layerwise)
std::array< std::vector< double >, c_nPlanes > PosResidueULocal
U-position (local) differnece between TrueHit and SpacePoint (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosDistance
Distance of TrueHits that do not match but are related from one SpacePoint (layerwise)
int m_NoSingleTrueHitCtr
Counter for SpacePoints that relate to more than one TrueHit.
std::array< std::vector< double >, c_nPlanes > SpacePointYGlobal
global y-positions of SpacePoints (layerwise)
Storage for (VXD) SpacePoint-based track candidates.
std::array< std::vector< double >, c_nPlanes > TrueHitXGlobal
global x-positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > MisMatchPosV
Difference of V-positions (local) for mismatched TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosY
Difference of Y-positions (global) for mismatched TrueHits (layerwise)