Belle II Software development
CurlingTrackCandSplitterModule Class Reference

Module for checking SpacePointTrackCandidates for curling behaviour and splitting them into Track Candidate Stubs (each of them being a SpacePointTrackCand again) which do not show curling behaviour. More...

#include <CurlingTrackCandSplitterModule.h>

Inheritance diagram for CurlingTrackCandSplitterModule:
Module PathElement

Classes

struct  RootVariables
 Internal DataStore for ROOT output variables. More...
 
struct  TaggedUVPos
 struct for easier handling of getting U- & V-position of SpacePoints and some difficulties that arise within this task. More...
 

Public Types

enum  {
  c_nSVDPlanes = 4 ,
  c_nPXDPlanes = 2 ,
  c_nPlanes = c_nSVDPlanes + c_nPXDPlanes
}
 Some constants for initialization. More...
 
enum  EModulePropFlags {
  c_Input = 1 ,
  c_Output = 2 ,
  c_ParallelProcessingCertified = 4 ,
  c_HistogramManager = 8 ,
  c_InternalSerializer = 16 ,
  c_TerminateInAllProcesses = 32 ,
  c_DontCollectStatistics = 64
}
 Each module can be tagged with property flags, which indicate certain features of the module. More...
 
typedef ModuleCondition::EAfterConditionPath EAfterConditionPath
 Forward the EAfterConditionPath definition from the ModuleCondition.
 

Public Member Functions

 CurlingTrackCandSplitterModule ()
 Constructor.
 
void initialize () override
 initialize: initialize counters, register stuff in DataStore, check if all necessary StoreArrays are present, etc.
 
void event () override
 event: check SpacePointTrackCand for curling behaviour, split if needed (and wanted by user)
 
void terminate () override
 terminate: print some summary on the modules work
 
template<class TrueHit >
std::pair< const Belle2::B2Vector3D, const Belle2::B2Vector3DgetGlobalPositionAndMomentum (TrueHit *aTrueHit)
 Helper class to retrieve the global position and momentum of a TrueHit.
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
virtual void beginRun ()
 Called when entering a new run.
 
virtual void endRun ()
 This method is called if the current run ends.
 
const std::string & getName () const
 Returns the name of the module.
 
const std::string & getType () const
 Returns the type of the module (i.e.
 
const std::string & getPackage () const
 Returns the package this module is in.
 
const std::string & getDescription () const
 Returns the description of the module.
 
void setName (const std::string &name)
 Set the name of the module.
 
void setPropertyFlags (unsigned int propertyFlags)
 Sets the flags for the module properties.
 
LogConfiggetLogConfig ()
 Returns the log system configuration.
 
void setLogConfig (const LogConfig &logConfig)
 Set the log system configuration.
 
void setLogLevel (int logLevel)
 Configure the log level.
 
void setDebugLevel (int debugLevel)
 Configure the debug messaging level.
 
void setAbortLevel (int abortLevel)
 Configure the abort log level.
 
void setLogInfo (int logLevel, unsigned int logInfo)
 Configure the printed log information for the given level.
 
void if_value (const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 Add a condition to the module.
 
void if_false (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to add a condition to the module.
 
void if_true (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to set the condition of the module.
 
bool hasCondition () const
 Returns true if at least one condition was set for the module.
 
const ModuleConditiongetCondition () const
 Return a pointer to the first condition (or nullptr, if none was set)
 
const std::vector< ModuleCondition > & getAllConditions () const
 Return all set conditions for this module.
 
bool evalCondition () const
 If at least one condition was set, it is evaluated and true returned if at least one condition returns true.
 
std::shared_ptr< PathgetConditionPath () const
 Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).
 
Module::EAfterConditionPath getAfterConditionPath () const
 What to do after the conditional path is finished.
 
std::vector< std::shared_ptr< Path > > getAllConditionPaths () const
 Return all condition paths currently set (no matter if the condition is true or not).
 
bool hasProperties (unsigned int propertyFlags) const
 Returns true if all specified property flags are available in this module.
 
bool hasUnsetForcedParams () const
 Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.
 
const ModuleParamListgetParamList () const
 Return module param list.
 
template<typename T >
ModuleParam< T > & getParam (const std::string &name) const
 Returns a reference to a parameter.
 
bool hasReturnValue () const
 Return true if this module has a valid return value set.
 
int getReturnValue () const
 Return the return value set by this module.
 
std::shared_ptr< PathElementclone () const override
 Create an independent copy of this module.
 
std::shared_ptr< boost::python::list > getParamInfoListPython () const
 Returns a python list of all parameters.
 

Static Public Member Functions

static void exposePythonAPI ()
 Exposes methods of the Module class to Python.
 

Protected Member Functions

void initializeCounters ()
 initialize all counters to 0 for avoiding undeterministic behaviour.
 
const std::vector< int > checkTrackCandForCurling (const Belle2::SpacePointTrackCand &, RootVariables &rootVariables)
 Check if the track candidate is curling.
 
template<class TrueHit >
std::pair< const B2Vector3D, const B2Vector3DgetGlobalPositionAndMomentum (TrueHit *aTrueHit)
 Get the global position and momentum for a given TrueHit (PXD or SVD at the moment).
 
const std::vector< Belle2::SpacePointTrackCandsplitCurlingTrackCand (const Belle2::SpacePointTrackCand &SPTrackCand, int NTracklets, const std::vector< int > &splitIndices)
 Split a culring track candidate into (up to NTracklets) tracklets.
 
bool getDirectionOfFlight (std::pair< const B2Vector3D, const B2Vector3D > const &hitPosAndMom, const B2Vector3D &origin)
 determine the direction of flight of a particle for a given hit and the origin (assumed interaction point).
 
 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.
 
 BELLE2_DEFINE_EXCEPTION (FoundNoCluster, "No related Cluster to a SpacePoint was found.")
 Exception for case when TrueHits for a given SpacePoint do not match (possible for e.g.
 
TaggedUVPos getUV (const SpacePoint *spacePoint)
 get U&V for a SpacePoint (via its relation to Clusters) (SpacePoint can only return normalized U&V coordinates).
 
template<class TrueHit >
void getValuesForRoot (const SpacePoint *spacePoint, const TrueHit *trueHit, RootVariables &rootVariables)
 Get The Values that are later written to a ROOT file.
 
void writeToRoot (const RootVariables &rootVariables)
 Write previously collected values to ROOT file.
 
virtual void def_initialize ()
 Wrappers to make the methods without "def_" prefix callable from Python.
 
virtual void def_beginRun ()
 Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.
 
virtual void def_event ()
 Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.
 
virtual void def_endRun ()
 This method can receive that the current run ends as a call from the Python side.
 
virtual void def_terminate ()
 Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.
 
void setDescription (const std::string &description)
 Sets the description of the module.
 
void setType (const std::string &type)
 Set the module type.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
 Adds a new parameter to the module.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description)
 Adds a new enforced parameter to the module.
 
void setReturnValue (int value)
 Sets the return value for this module as integer.
 
void setReturnValue (bool value)
 Sets the return value for this module as bool.
 
void setParamList (const ModuleParamList &params)
 Replace existing parameter list.
 

Protected Attributes

bool m_PARAMsplitCurlers
 indicating if the SpacePointTrackCands should only be analyzed for curling behaviour, or analyzed and split into TrackCand Stubs
 
std::string m_PARAMsptcName
 collection name of the SpacePointTrackCands to be analyzed
 
std::string m_PARAMcurlingOutFirstName
 collection name of the first outgoing (i.e.
 
std::string m_PARAMcurlingAllInName
 collection name of all ingoing parts of a curling TrackCand
 
std::string m_PARAMcurlingOutRestName
 collection name of all but the first outgoing parts of a curling TrackCand
 
std::string m_PARAMcompleteCurlerName
 collection name of all parts of a curling TrackCand
 
std::vector< double > m_PARAMsetOrigin
 set the origin to a specific point.
 
StoreArray< SpacePointTrackCandm_spacePointTCs
 SpacePointTrackCand StoreArray.
 
StoreArray< SpacePointTrackCandm_curlingFirstOuts
 Curling SpacePointTrackCand StoreArray.
 
StoreArray< SpacePointTrackCandm_curlingAllIns
 Curling SpacePointTrackCand StoreArray.
 
StoreArray< SpacePointTrackCandm_curlingRestOuts
 Curling SpacePointTrackCand StoreArray.
 
StoreArray< SpacePointTrackCandm_curlingCompletes
 Curling SpacePointTrackCand StoreArray.
 
int m_PARAMnTrackStubs
 maximum number of TrackCand Stubs to be stored for a curling TrackCand
 
bool m_saveCompleteCurler
 set to true if all parts of a curling TrackCand should be stored in a separate StoreArray (no parameter!)
 
B2Vector3D m_origin
 origin used internally (set from user set value)
 
int m_spacePointTCCtr
 Counter for presented SpacePointTrackCands.
 
int m_curlingTCCtr
 Counter for TrackCands that show curling behaviour.
 
int m_createdTrackStubsCtr
 Counter for created TrackCand Stubs by splitting a SpacePointTrackCand.
 
int m_noDecisionPossibleCtr
 Counter for TrackCands where a decision if curling or not is not possible.
 
int m_NoSingleTrueHitCtr
 Counter for SpacePoints that relate to more than one TrueHit.
 
int m_NoCurlingTCsCtr
 Counter for SPTCs that were not curling and hence were added to the StoreArray of first out parts.
 
bool m_PARAMuseNonSingleTHinPA
 Switch for using SpacePoints in position Analysis that are related to more than one TrueHit.
 
bool m_PARAMpositionAnalysis
 Set to true if output to ROOT file is desired with the positions and position differences of SpacePoints and TrueHits.
 
std::vector< std::string > m_PARAMrootFileName
 two entries accepted.
 
TFile * m_rootFilePtr
 Pointer to ROOT file.
 
TTree * m_treePtr
 Pointer to ROOT tree.
 
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointXGlobals
 Global X-Positions of SpacePoints (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointYGlobals
 Global Y-Positions of SpacePoints (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointZGlobals
 Global Z-Positions of SpacePoints (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointULocals
 Local U-Positions of SpacePoints (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointVLocals
 Local V-Positions of SpacePoints (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitXGlobals
 Global U-Positions of TrueHits (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitYGlobals
 Global V-Positions of TrueHits (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitZGlobals
 Global Z-Positions of TrueHits (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitULocals
 Local X-Positions of TrueHits (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitVLocals
 Local Y-Positions of TrueHits (layerwise)
 
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 > m_rootPosResidueYGlobal
 Y-position (global) difference between TrueHit and SpacePoint (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueZGlobal
 Z-position (global) difference between TrueHit and SpacePoint (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueULocal
 U-position (local) difference between TrueHit and SpacePoint (layerwise)
 
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 > m_rootLocalPosResiduals
 Local Position Residuals between TrueHits and SpacePoints (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootGlobalPosResiduals
 Global Position Residuals between TrueHits and SpacePoints (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosDistance
 Distance of TrueHits that do not match but are related from one SpacePoint (layerwise)
 
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_rootMisMatchPosY
 Difference of Y-positions (global) for mismatched TrueHits (layerwise)
 
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosZ
 Difference of Z-positions (global) for mismatched TrueHits (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_rootMisMatchPosV
 Difference of V-positions (local) for mismatched TrueHits (layerwise)
 
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 SpacePoint (layerwise)
 
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 SpacePoint (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 SpacePoint (layerwise)
 

Private Member Functions

std::list< ModulePtrgetModules () const override
 no submodules, return empty list
 
std::string getPathString () const override
 return the module name.
 
void setParamPython (const std::string &name, const boost::python::object &pyObj)
 Implements a method for setting boost::python objects.
 
void setParamPythonDict (const boost::python::dict &dictionary)
 Implements a method for reading the parameter values from a boost::python dictionary.
 

Private Attributes

std::string m_name
 The name of the module, saved as a string (user-modifiable)
 
std::string m_type
 The type of the module, saved as a string.
 
std::string m_package
 Package this module is found in (may be empty).
 
std::string m_description
 The description of the module.
 
unsigned int m_propertyFlags
 The properties of the module as bitwise or (with |) of EModulePropFlags.
 
LogConfig m_logConfig
 The log system configuration of the module.
 
ModuleParamList m_moduleParamList
 List storing and managing all parameter of the module.
 
bool m_hasReturnValue
 True, if the return value is set.
 
int m_returnValue
 The return value.
 
std::vector< ModuleConditionm_conditions
 Module condition, only non-null if set.
 

Detailed Description

Module for checking SpacePointTrackCandidates for curling behaviour and splitting them into Track Candidate Stubs (each of them being a SpacePointTrackCand again) which do not show curling behaviour.

NOTE: If talking of a 'TrackCand' (in this documentation or in the code) it is assumed to be a SpacePointTrackCand if not stated explicitly otherwise

Some statements on how the module works on checking if a SpacePointTrackCand is curling: 1) convert genfit::TrackCand to SpacePointTrackCand 2) for every SpacePoint in SpacePointTrackCand get Cluster(s) and from them get the according TrueHit(s). 4) Check if the TrueHits are compatible (explanation below) 3) From TrueHit get position and momentum of hit (in global coordinates) and decide with this information if the particles direction of flight is inwards our outwards (i.e. towards or away from set origin) 4) If Direction changes from one SpacePoint to another -> split SpacePointTrackCand

Explanation of compatible TrueHits: For all Clusters related from a SpacePoint all related TrueHits are collected. If there is one (or more) shared TrueHit this is considered to be compatible (regardless of other non-matching TrueHits)

WARNING: deprecated: use SPTCReferee instead to check SPTCs for curling!

Definition at line 45 of file CurlingTrackCandSplitterModule.h.

Member Typedef Documentation

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Some constants for initialization.

Definition at line 59 of file CurlingTrackCandSplitterModule.h.

59 {
60 c_nSVDPlanes = 4,
61 c_nPXDPlanes = 2,
62
63 c_nPlanes = c_nSVDPlanes + c_nPXDPlanes,
64 };

◆ EModulePropFlags

enum EModulePropFlags
inherited

Each module can be tagged with property flags, which indicate certain features of the module.

Enumerator
c_Input 

This module is an input module (reads data).

c_Output 

This module is an output module (writes data).

c_ParallelProcessingCertified 

This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)

c_HistogramManager 

This module is used to manage histograms accumulated by other modules.

c_InternalSerializer 

This module is an internal serializer/deserializer for parallel processing.

c_TerminateInAllProcesses 

When using parallel processing, call this module's terminate() function in all processes().

This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.

c_DontCollectStatistics 

No statistics is collected for this module.

Definition at line 77 of file Module.h.

77 {
78 c_Input = 1,
79 c_Output = 2,
85 };
@ c_HistogramManager
This module is used to manage histograms accumulated by other modules.
Definition: Module.h:81
@ c_Input
This module is an input module (reads data).
Definition: Module.h:78
@ c_DontCollectStatistics
No statistics is collected for this module.
Definition: Module.h:84
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
@ c_InternalSerializer
This module is an internal serializer/deserializer for parallel processing.
Definition: Module.h:82
@ c_Output
This module is an output module (writes data).
Definition: Module.h:79
@ c_TerminateInAllProcesses
When using parallel processing, call this module's terminate() function in all processes().
Definition: Module.h:83

Constructor & Destructor Documentation

◆ CurlingTrackCandSplitterModule()

Constructor.

Definition at line 35 of file CurlingTrackCandSplitterModule.cc.

36{
37 setDescription("Module for checking SpacePointTrackCands for curling behaviour and (if wanted) splitting them into SpacePointTrackCands that no longer show curling behaviour. WARNING: MODULE IS DEPRECATED use SPTCReferee instead!");
38
39 addParam("splitCurlers", m_PARAMsplitCurlers,
40 "Split curling SpacePointTrackCands into non-curling SpacePointTrackCands and store them", true);
41 addParam("nTrackStubs", m_PARAMnTrackStubs,
42 "Maximum number of SpacePointTrackCand Stubs to be created from a curling SpacePointTrackCand. Set to 0 if you want all possible TrackCand Stubs",
43 0);
44
45 addParam("SpacePointTCName", m_PARAMsptcName, "Collection name of the SpacePointTrackCands to be analyzed for curling behaviour",
46 std::string(""));
47 addParam("curlingFirstOutName", m_PARAMcurlingOutFirstName,
48 "Collection name under which the first outgoing part of a curling TrackCand will be stored in the StoreArray. The first part of a curling Track has its origin at the interaction point.",
49 std::string(""));
50 addParam("curlingAllInName", m_PARAMcurlingAllInName,
51 "Collection name under which all ingoing parts of a curling TrackCand will be stored in the StoreArray", std::string(""));
52 addParam("curlingRestOutName", m_PARAMcurlingOutRestName,
53 "Collection name under which all but the first outgoing parts of a curling TrackCand will be stored in the StoreArray",
54 std::string(""));
55 addParam("completeCurlerName", m_PARAMcompleteCurlerName,
56 "Collection name under which all parts of a curling TrackCand will be stored in the StoreArray together. NOTE: only if this parameter is set to a non-empty string a complete (but split) curling TrackCand will be stored!",
57 std::string(""));
58
59 // WARNING TODO: find out the units that are used internally!!!
60 std::vector<double> defaultOrigin = { 0., 0., 0. };
61 addParam("setOrigin", m_PARAMsetOrigin,
62 "WARNING: still need to find out the units that are used internally! Reset origin to given point. Used for determining the direction of flight of a particle for a given hit. Needs to be reset for e.g. testbeam, where origin is not at (0,0,0)",
63 defaultOrigin);
64
65 addParam("positionAnalysis", m_PARAMpositionAnalysis,
66 "Set to true to investigate the positions of SpacePoints and TrueHits and write them to a ROOT file", false);
67
68 std::vector<std::string> defaultRootFName;
69 defaultRootFName.push_back("PositionResiduals");
70 defaultRootFName.push_back("RECREATE");
71
72 addParam("rootFileName", m_PARAMrootFileName,
73 "Filename and write-mode ('RECREATE' or 'UPDATE'). If given more than 2 strings this module will cause termination",
74 defaultRootFName);
75
76
77 addParam("useNonSingleTHinPA", m_PARAMuseNonSingleTHinPA,
78 "Switch for using SpacePoints in position Analysis that are related to more than one TrueHit", false);
79
80 initializeCounters(); // NOTE: they get initialized in initialize again!!
81
82 // initialize other variables to some default values to avoid unintended behaviour
84 m_treePtr = nullptr;
85 m_rootFilePtr = nullptr;
86}
std::string m_PARAMcurlingOutRestName
collection name of all but the first outgoing parts of a curling TrackCand
bool m_saveCompleteCurler
set to true if all parts of a curling TrackCand should be stored in a separate StoreArray (no paramet...
std::vector< double > m_PARAMsetOrigin
set the origin to a specific point.
int m_PARAMnTrackStubs
maximum number of TrackCand Stubs to be stored for a curling TrackCand
std::string m_PARAMcurlingAllInName
collection name of all ingoing parts of a curling TrackCand
std::string m_PARAMcompleteCurlerName
collection name of all parts of a curling TrackCand
std::string m_PARAMsptcName
collection name of the SpacePointTrackCands to be analyzed
std::vector< std::string > m_PARAMrootFileName
two entries accepted.
bool m_PARAMuseNonSingleTHinPA
Switch for using SpacePoints in position Analysis that are related to more than one TrueHit.
std::string m_PARAMcurlingOutFirstName
collection name of the first outgoing (i.e.
void initializeCounters()
initialize all counters to 0 for avoiding undeterministic behaviour.
bool m_PARAMpositionAnalysis
Set to true if output to ROOT file is desired with the positions and position differences of SpacePoi...
bool m_PARAMsplitCurlers
indicating if the SpacePointTrackCands should only be analyzed for curling behaviour,...
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560

Member Function Documentation

◆ beginRun()

virtual void beginRun ( void  )
inlinevirtualinherited

Called when entering a new run.

Called at the beginning of each run, the method gives you the chance to change run dependent constants like alignment parameters, etc.

This method can be implemented by subclasses.

Reimplemented in ARICHBackgroundModule, BeamabortModule, BgoModule, CaveModule, ClawModule, CLAWSModule, DosiModule, FANGSModule, He3tubeModule, MicrotpcModule, Ph1bpipeModule, Ph1sustrModule, PindiodeModule, PlumeModule, QcsmonitorModule, SrsensorModule, GetEventFromSocketModule, CalibrationCollectorModule, EventsOfDoomBusterModule, CosmicsAlignmentValidationModule, EnergyBiasCorrectionModule, ChargedPidMVAModule, ChargedPidMVAMulticlassModule, CurlTaggerModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, ParticleVertexFitterModule, PhotonEfficiencySystematicsModule, TagVertexModule, TreeFitterModule, arichBtestModule, ARICHDigitizerModule, ARICHDQMModule, ARICHRateCalModule, ARICHReconstructorModule, B2BIIMCParticlesMonitorModule, B2BIIConvertBeamParamsModule, B2BIIConvertMdstModule, B2BIIFixMdstModule, B2BIIMdstInputModule, BelleMCOutputModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BGOverlayInputModule, AnalysisPhase1StudyModule, NtuplePhase1_v6Module, ReprocessorModule, BeamabortStudyModule, BeamDigitizerModule, BgoDigitizerModule, BgoStudyModule, ClawDigitizerModule, ClawStudyModule, ClawsDigitizerModule, ClawsStudyModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, DosiDigitizerModule, DosiStudyModule, FANGSDigitizerModule, FANGSStudyModule, He3DigitizerModule, He3tubeStudyModule, MicrotpcStudyModule, TpcDigitizerModule, PinDigitizerModule, PindiodeStudyModule, PlumeDigitizerModule, QcsmonitorDigitizerModule, QcsmonitorStudyModule, CDCCosmicAnalysisModule, CDCCRTestModule, cdcDQM7Module, CDCDQMModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, DAQPerfModule, RxSocketModule, TxSocketModule, DqmHistoManagerModule, MonitorDataModule, TrackAnaModule, Ds2SampleModule, ReceiveEventModule, HLTDQM2ZMQModule, ElapsedTimeModule, DeSerializerPXDModule, GenRawSendModule, SerializerModule, CertifyParallelModule, Ds2RawModule, Ds2RbufModule, EvReductionModule, FastRbuf2DsModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, Ds2RawFileModule, PartialSeqRootReaderModule, SeqRootMergerModule, StorageDeserializerModule, StorageSerializerModule, IPDQMModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, ECLBackgroundModule, ECLChargedPIDModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLChargedPIDMVAModule, ECLClusterPSDModule, ECLCovarianceMatrixModule, ECLCRFinderModule, ECLDataAnalysisModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMModule, ECLDQMConnectedRegionsModule, ECLDQMEXTENDEDModule, ECLDQMOutOfTimeDigitsModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLocalRunCalibratorModule, ECLLOMModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLUnpackerModule, ECLWaveformFitModule, HistoModule, SubEventModule, SwitchDataStoreModule, EventInfoPrinterModule, EventLimiterModule, IoVDependentConditionModule, ProgressModule, RandomBarrierModule, GearboxModule, HistoManagerModule, StatisticsSummaryModule, SeqRootInputModule, SeqRootOutputModule, RxModule, TxModule, EvtGenDecayModule, EvtGenInputModule, OverrideGenerationFlagsModule, KKGenInputModule, CreateFieldMapModule, ExportGeometryModule, SoftwareTriggerModule, SoftwareTriggerHLTDQMModule, StatisticsTimingHLTDQMModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, EKLMDataCheckerModule, KLMClusterAnaModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDigitTimeShifterModule, KLMDQMModule, KLMDQM2Module, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMUnpackerModule, MVAExpertModule, MVAMultipleExpertsModule, MVAPrototypeModule, AWESOMEBasicModule, PXDBackgroundModule, PXDRawDQMChipsModule, PXDClustersFromTracksModule, PXDPerformanceModule, PXDClusterizerModule, Convert2RawDetModule, CDCDedxDQMModule, CDCDedxValidationModule, EventT0DQMModule, EventT0ValidationModule, DataWriterModule, ECLExpertModule, KLMExpertModule, KlongValidationModule, KLMMuonIDDNNExpertModule, FullSimModule, MaterialScanModule, SVDBackgroundModule, SVDClusterCalibrationsMonitorModule, SVDHotStripFinderModule, SVDLatencyCalibrationModule, SVDLocalCalibrationsCheckModule, SVDLocalCalibrationsMonitorModule, SVDPositionErrorScaleFactorImporterModule, SVDTimeCalibrationsMonitorModule, SVDDQMHitTimeModule, svdDumpModule, SVDPackerModule, SVDB4CommissioningPlotsModule, SVDClusterEvaluationModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDMaxStripTTreeModule, SVDOccupancyAnalysisModule, SVDPerformanceModule, SVDPerformanceTTreeModule, SVDShaperDigitsFromTracksModule, SVDClusterizerModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, SVDMissingAPVsClusterCreatorModule, SVDRecoDigitCreatorModule, SVD3SamplesEmulatorModule, SVDDigitizerModule, SVDEventInfoSetterModule, SVDTriggerQualityGeneratorModule, SVDSpacePointCreatorModule, SVDTimeGroupingModule, SVDUnpackerModule, TOPBackgroundModule, TOPBunchFinderModule, TOPChannelMaskerModule, TOPChannelT0MCModule, TOPDigitizerModule, TOPTriggerDigitizerModule, TOPDoublePulseGeneratorModule, TOPDQMModule, TOPGainEfficiencyCalculatorModule, TOPLaserHitSelectorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPMCTrackMakerModule, TOPModuleT0CalibratorModule, TOPNtupleModule, TOPPackerModule, TOPRawDigitConverterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPTimeRecalibratorModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPXTalkChargeShareSetterModule, DQMHistoModuleBase, SVDEventT0EstimatorModule, ExtModule, FlipQualityModule, BeamSpotMonitorModule, KinkFinderModule, MCV0MatcherModule, MCTrackCandClassifierModule, MuidModule, PXDROIFinderModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, SPTCmomentumSeedRetrieverModule, SPTCvirtualIPRemoverModule, TrackCreatorModule, TrackFinderMCTruthRecoTracksModule, EffPlotsModule, HitXPModule, TrackingPerformanceEvaluationModule, V0findingPerformanceEvaluationModule, TrackQETrainingDataCollectorModule, TrackQualityEstimatorMVAModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, TrackFinderVXDAnalizerModule, VXDSimpleClusterizerModule, QualityEstimatorVXDModule, VXDQETrainingDataCollectorModule, VXDQualityEstimatorMVAModule, SectorMapBootstrapModule, SegmentNetworkProducerModule, TrackFinderVXDBasicPathFinderModule, TrackFinderVXDCellOMatModule, VXDTFTrainingDataCollectorModule, FindletModule< AFindlet >, FindletModule< HitBasedT0Extractor >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromHitsFindlet >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromSegmentsFindlet >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< FacetCreator >, FindletModule< HitReclaimer >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinder >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerNDFinderModule, CDCTriggerTSFModule, TRGCDCModule, TRGCDCETFUnpackerModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSFUnpackerModule, TRGCDCTSStreamModule, CDCTriggerUnpackerModule, MCMatcherTRGECLModule, TRGECLFAMModule, TRGECLModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLEventTimingDQMModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGGDLModule, TRGEFFDQMModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLSummaryModule, TRGGDLUnpackerModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLDQMModule, TRGGRLUnpackerModule, KLMTriggerModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TRGRAWDATAModule, VXDMisalignmentModule, DQMHistAnalysisARICHModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisDAQMonObjModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisEventT0EfficiencyModule, DQMHistAnalysisEventT0TriggerJitterModule, DQMHistAnalysisExampleModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisHLTModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputRootFileModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLMModule, DQMHistAnalysisKLM2Module, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPeakModule, DQMHistAnalysisPXDERModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisSVDClustersOnTrackModule, DQMHistAnalysisSVDDoseModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOccupancyModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisSVDUnpackerModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTrackingAbortModule, DQMHistAnalysisTrackingHLTModule, DQMHistAnalysisTRGECLModule, DQMHistAutoCanvasModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DQMHistReferenceModule, DQMHistSnapshotsModule, DAQMonitorModule, DelayDQMModule, V0ObjectsDQMModule, ECLDQMInjectionModule, PyModule, PXDBgTupleProducerModule, PXDMCBgTupleProducerModule, PXDDAQDQMModule, PXDDQMClustersModule, PXDDQMCorrModule, PXDDQMEfficiencyModule, PXDDQMEfficiencySelftrackModule, PXDDQMExpressRecoModule, PXDGatedDHCDQMModule, PXDGatedModeDQMModule, PXDInjectionDQMModule, PXDRawDQMCorrModule, PXDRawDQMModule, PXDROIDQMModule, PXDTrackClusterDQMModule, PXDDigitizerModule, PXDPackerModule, PXDUnpackerModule, TTDDQMModule, DetectorOccupanciesDQMModule, SVDDQMClustersOnTrackModule, SVDDQMDoseModule, SVDDQMExpressRecoModule, SVDDQMInjectionModule, SVDUnpackerDQMModule, PXDclusterFilterModule, PXDdigiFilterModule, PXDROIFinderAnalysisModule, TrackingAbortDQMModule, VXDDQMExpressRecoModule, vxdDigitMaskingModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisEpicsOutputModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDCMModule, DQMHistAnalysisPXDDAQModule, DQMHistAnalysisPXDEffModule, DQMHistAnalysisPXDInjectionModule, DQMHistAnalysisPXDReductionModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisRunNrModule, DQMHistAnalysisTRGModule, DQMHistInjectionModule, and DQMHistOutputToEPICSModule.

Definition at line 147 of file Module.h.

147{};

◆ BELLE2_DEFINE_EXCEPTION()

BELLE2_DEFINE_EXCEPTION ( FoundNoCluster  ,
"No related Cluster to a SpacePoint was found."   
)
protected

Exception for case when TrueHits for a given SpacePoint do not match (possible for e.g.

SVD SpacePoint consisting of two SVDClusters) Exception thrown, when no relation to a Cluster can be found for a SpacePoint. This should never happen, since only SpacePoints related from a Cluster get into the SpacePointTrackCand in the first place.

◆ checkTrackCandForCurling()

const std::vector< int > checkTrackCandForCurling ( const Belle2::SpacePointTrackCand SPTrackCand,
RootVariables rootVariables 
)
protected

Check if the track candidate is curling.

Returns the indices of SpacePoint where the Track Candidate changes direction (i.e. changes its direction of flight from outwards to inwards or vice versa). If the first entry of this vector is 0, this means, that the direction of flight for the first hit of this particle was towards the (assumed) interaction point!!

Definition at line 338 of file CurlingTrackCandSplitterModule.cc.

340{
341 const std::vector<const Belle2::SpacePoint*>& tcSpacePoints = SPTrackCand.getHits();
342 unsigned int nHits = SPTrackCand.getNHits();
343
344 B2DEBUG(21, "SpacePointTrackCand contains " << nHits << " SpacePoints");
345
346 std::vector<int> returnVector; // fill this vector with indices, if no indices can be found, leave it empty
347
348 std::pair<bool, bool>
349 directions; // only store the last two directions to decide if it has changed or not. .first is always last hit, .second is present hit.
350 directions.first =
351 true; // assume that the track points outwards from the interaction point at first. NOTE: this assumption is not dangerous here (it is in other places because it does not have to be the case). The information on the direction of flight for the first hit is stored in the returnVector itself. If the first entry is 0 (this means that the trackCand first 'pointed' towards the interaction point)
352
353 for (unsigned int iHit = 0; iHit < nHits; ++iHit) {
354 const SpacePoint* spacePoint = tcSpacePoints[iHit];
355 auto detType = spacePoint->getType();
356
357 B2DEBUG(21, "Now checking SpacePoint " << iHit << " in SPTC. This SpacePoint has Index " << spacePoint->getArrayIndex() <<
358 " in StoreArray " << spacePoint->getArrayName());
359
360 // get global position and momentum for every spacePoint in the SpacePointTrackCand
361 std::pair<B2Vector3D, B2Vector3D > hitGlobalPosMom;
362
363 if (detType == VXD::SensorInfoBase::PXD) {
364 // first get PXDCluster, from that get TrueHit
365 PXDCluster* pxdCluster =
366 spacePoint->getRelatedTo<PXDCluster>("ALL"); // COULDDO: search only certain Cluster Arrays -> get name somehow
367 // CAUTION: only looking for one TrueHit here, but there could actually be more of them 'molded' into one Cluster
368 PXDTrueHit* pxdTrueHit =
369 pxdCluster->getRelatedTo<PXDTrueHit>("ALL"); // COULDDO: search only certain PXDTrueHit arrays -> new parameter for module
370
371 if (pxdTrueHit == nullptr) {
372 B2DEBUG(21, "Found no PXDTrueHit for PXDCluster " << pxdCluster->getArrayIndex() << " from Array " << pxdCluster->getArrayName() <<
373 ". This PXDCluster is related with SpacePoint " << spacePoint->getArrayIndex() << " from Array " << spacePoint->getArrayName());
374 throw FoundNoTrueHit();
375 }
376
377 B2DEBUG(21, "Found PXDCluster " << pxdCluster->getArrayIndex() << " and " << " PXDTrueHit " << pxdTrueHit->getArrayIndex() <<
378 " from StoreArray " << pxdTrueHit->getArrayName() << " related to this SpacePoint");
379
380 B2DEBUG(21, "Now getting global position and momentum for PXDCluster " << pxdCluster->getArrayIndex() << " from Array " <<
381 pxdCluster->getArrayName());
382 hitGlobalPosMom = getGlobalPositionAndMomentum(pxdTrueHit);
383
384 // if position analysis is set to true, print to root file
385 if (m_PARAMpositionAnalysis) { getValuesForRoot(spacePoint, pxdTrueHit, rootVariables); }
386
387 } else if (detType == VXD::SensorInfoBase::SVD) {
388 // get all related SVDClusters and do some sanity checks, before getting the SVDTrueHits and then using them to get global position and momentum
389 RelationVector<SVDCluster> svdClusters =
390 spacePoint->getRelationsTo<SVDCluster>("ALL"); // COULDDO: search only certain Cluster Arrays -> get name somehow (addidional parameter?)
391 if (svdClusters.size() == 0) {
392 B2WARNING("Found no related clusters for SpacePoint " << spacePoint->getArrayIndex() << " from Array " << spacePoint->getArrayName()
393 << ". With no Cluster no information if a track is curling or not can be obtained");
394 throw FoundNoCluster(); // this should also never happen, as the vice versa way is used to get to the SpacePoints in the first place (in the GFTC2SPTCConverterModule e.g.)
395 } else {
396 // collect the TrueHits, if there is more than one compare them, to see if both Clusters point to the same TrueHit
397 // WARNING there can be more! more than one TrueHit can be 'hidden' in one Cluster!!!
398 // TODO: look at this again, this seems not to work properly at the moment!!!
399 std::vector<const SVDTrueHit*> svdTrueHits;
400 for (const SVDCluster& aCluster : svdClusters) {
401 // CAUTION: there can be more than one TrueHit for a given Cluster!!!
402 RelationVector<SVDTrueHit> relTrueHits =
403 aCluster.getRelationsTo<SVDTrueHit>("ALL"); // COULDDO: search only certain SVDTrueHit arrays -> new parameter for module
404 if (relTrueHits.size() == 0) {
405 B2DEBUG(21, "Found no SVDTrueHit for SVDCluster " << aCluster.getArrayIndex() << " from Array " << aCluster.getArrayName() <<
406 ". This SVDCluster is related with SpacePoint " << spacePoint->getArrayIndex() << " from Array " << spacePoint->getArrayName());
407 throw FoundNoTrueHit();
408 }
409
410 B2DEBUG(21, "Found " << relTrueHits.size() << " TrueHits for SVDCluster " << aCluster.getArrayIndex() << " from Array " <<
411 aCluster.getArrayName());
412 for (unsigned int i = 0; i < relTrueHits.size(); ++i) { svdTrueHits.push_back(relTrueHits[i]); }
413 }
414
415 // if there is only one cluster related to the SpacePoint simply check if one (or more TrueHits are present). Additionally checking the size for svdTrueHits again is not necessary here, because if there was only one Cluster and no TrueHits were found this part is never reached!
416 // WARNING: It is not guaranteed that this actually leads to a valid relation between SpacePoint and TrueHit!!
417 // TODO: continuing with next SpacePoint skips check for curling behavior!!! FIX this!!!
418// if (svdClusters.size() == 1) {
419// std::stringstream inds;
420// for (const SVDTrueHit * trueHit : svdTrueHits) { inds << trueHit->getArrayIndex() << ", "; }
421// B2DEBUG(21, "Found only one Cluster related to SpacePoint " << spacePoint->getArrayIndex() << " from Array " << spacePoint->getArrayName() << ". To this Cluster " << svdTrueHits.size() << " related TrueHits were found. Indices: " << inds.str());
422// m_NoSingleTrueHitCtr++;
423// continue; // start over with next SpacePoint
424// }
425
426 // if there is at least one TrueHit in the vector check how many unique TrueHits there are
427 if (svdTrueHits.size() >= 1) {
428 B2DEBUG(21, "Found " << svdTrueHits.size() << " SVDTrueHits related to Clusters related to SpacePoint " <<
429 spacePoint->getArrayIndex() << " from Array " << spacePoint->getArrayName() << ". Now checking if they are compatible");
430
431 // sort & unique to find the unique entries of the relation vector
432 std::sort(svdTrueHits.begin(), svdTrueHits.end());
433 unsigned int oldSize = svdTrueHits.size();
434 auto newEnd = std::unique(svdTrueHits.begin(), svdTrueHits.end());
435 svdTrueHits.resize(std::distance(svdTrueHits.begin(), newEnd));
436
437 // If there is no overlapping TrueHit get all indices of the TrueHits and print a warning. If position Analysis is enabled calculate the position differences of the TrueHits. In the end throw an Exception (only if the TrueHits belong to a non-single Cluster SVD SpacePoint)
438 if (svdTrueHits.size() == oldSize) {
439 std::stringstream trueHitInds;
440 for (const SVDTrueHit* trueHit : svdTrueHits) { trueHitInds << trueHit->getArrayIndex() << ", "; }
441 B2DEBUG(21, "There is no overlapping TrueHit for SpacePoint " << spacePoint->getArrayIndex() << " from Array " <<
442 spacePoint->getArrayName() << ". The Indices of the TrueHits are: " << trueHitInds.str());
443
444 // Only do these calculations if output to root is is enabled
446 std::vector<B2Vector3D > globalPositions;
447 std::vector<B2Vector3D > globalMomenta;
448 // collect all values
449 for (unsigned int i = 0; i < svdTrueHits.size(); ++i) {
450 auto posMom = getGlobalPositionAndMomentum(svdTrueHits[i]);
451 globalPositions.push_back(posMom.first);
452 globalMomenta.push_back(posMom.second);
453 }
454 // WARNING: getting only layer number of first TrueHit in vector here. Although this should not change, this is never actually checked!!
455 int layer = svdTrueHits[0]->getSensorID().getLayerNumber() - 1; // layer numbering starts at 1, indexing of array at 0
456 // do the calculations (starting from one because of comparison of two elements in each run through loop)
457 for (unsigned int i = 1; i < globalPositions.size(); ++i) {
458 rootVariables.MisMatchPosResiduals.at(layer).push_back((globalPositions[i] - globalPositions[i - 1]).Mag());
459
460 rootVariables.MisMatchPosX.at(layer).push_back((globalPositions[i] - globalPositions[i - 1]).X());
461 rootVariables.MisMatchPosY.at(layer).push_back((globalPositions[i] - globalPositions[i - 1]).Y());
462 rootVariables.MisMatchPosZ.at(layer).push_back((globalPositions[i] - globalPositions[i - 1]).Z());
463
464 rootVariables.MisMatchPosU.at(layer).push_back((svdTrueHits[i]->getU() - svdTrueHits[i - 1]->getU()));
465 rootVariables.MisMatchPosV.at(layer).push_back((svdTrueHits[i]->getV() - svdTrueHits[i - 1]->getV()));
466
467 B2Vector3D momDiff = globalMomenta[i] - globalMomenta[i - 1];
468 rootVariables.MisMatchMomX.at(layer).push_back(momDiff.X());
469 rootVariables.MisMatchMomY.at(layer).push_back(momDiff.Y());
470 rootVariables.MisMatchMomZ.at(layer).push_back(momDiff.Z());
471 }
472 }
473 // if the TrueHits are related from a singleCluster SVD SpacePoint (i.e. more than one TrueHits are molded into one Cluster) do not throw this exception but continue with the curling checking
474 if (svdClusters.size() > 1) { TrueHitsNotMatching(); }
475 }
476 }
477
478 // if there is more than one TrueHit remaining for one SpacePoint increase the counter
479 if (svdTrueHits.size() > 1) {
481 }
482
483 // WARNING if there are more than one matching TrueHits only the first TrueHit is used for comparison and for position analysis
484 B2DEBUG(21, "Now getting global position and momentum for SVDCluster " << svdClusters[0]->getArrayIndex() << " from Array " <<
485 svdClusters[0]->getArrayName() << " via SVDTrueHit " << svdTrueHits[0]->getArrayIndex() << " from StoreArray " <<
486 svdTrueHits[0]->getArrayName());
487 hitGlobalPosMom = getGlobalPositionAndMomentum(svdTrueHits[0]);
488
489 // if position analysis is set to true, print to root file
490 // only do so if there is only one TrueHit (this is only for the moment!!!) OR if the switch is set to do so even if there is more than one TrueHit
491 // TODO: Decide how to handle such cases where more than one TrueHit is left and implement accordingly
492 if (m_PARAMpositionAnalysis && (svdTrueHits.size() == 1 || m_PARAMuseNonSingleTHinPA)) { getValuesForRoot(spacePoint, svdTrueHits[0], rootVariables); }
493 }
494 } else { // this should never be reached, because it should be caught in the creation of the SpacePointTrackCand which is passed to this function!
495 throw SpacePointTrackCand::UnsupportedDetType();
496 }
497
498 // get the direction of flight for the present SpacePoint
499 directions.second = getDirectionOfFlight(hitGlobalPosMom, m_origin);
500
501 // check if the directions have changed since the last hit, if so, add the number of the SpacePoint (inside the SpacePointTrackCand) to the returnVector
502 if (directions.first != directions.second) {
503 B2DEBUG(21, "The direction of flight has changed for SpacePoint " << iHit <<
504 " in SpacePointTrackCand. The StoreArray index of this SpacePoint is " << spacePoint->getArrayIndex() << " in " <<
505 spacePoint->getArrayName());
506 returnVector.push_back(iHit);
507 }
508 // assign old value to .first, for next comparison
509 directions.first = directions.second;
510 }
511 return returnVector;
512}
DataType Z() const
access variable Z (= .at(2) without boundary check)
Definition: B2Vector3.h:435
DataType X() const
access variable X (= .at(0) without boundary check)
Definition: B2Vector3.h:431
DataType Y() const
access variable Y (= .at(1) without boundary check)
Definition: B2Vector3.h:433
B2Vector3D m_origin
origin used internally (set from user set value)
std::pair< const B2Vector3D, const B2Vector3D > getGlobalPositionAndMomentum(TrueHit *aTrueHit)
Get the global position and momentum for a given TrueHit (PXD or SVD at the moment).
int m_NoSingleTrueHitCtr
Counter for SpacePoints that relate to more than one TrueHit.
bool getDirectionOfFlight(std::pair< const B2Vector3D, const B2Vector3D > const &hitPosAndMom, const B2Vector3D &origin)
determine the direction of flight of a particle for a given hit and the origin (assumed interaction p...
void getValuesForRoot(const SpacePoint *spacePoint, const TrueHit *trueHit, RootVariables &rootVariables)
Get The Values that are later written to a ROOT file.
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:30
Class PXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: PXDTrueHit.h:31
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
std::string getArrayName() const
Get name of array this object is stored in, or "" if not found.
int getArrayIndex() const
Returns this object's array index (in StoreArray), or -1 if not found.
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from this object to another store array.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: SVDTrueHit.h:33
unsigned int getNHits() const
get the number of hits (space points) in the track candidate
const std::vector< const Belle2::SpacePoint * > & getHits() const
get hits (space points) of track candidate
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
Belle2::VXD::SensorInfoBase::SensorType getType() const
Return SensorType (PXD, SVD, ...) on which the SpacePoint lives.
Definition: SpacePoint.h:145
DataType at(unsigned i) const
safe member access (with boundary check!)
Definition: B2Vector3.h:751

◆ clone()

std::shared_ptr< PathElement > clone ( ) const
overridevirtualinherited

Create an independent copy of this module.

Note that parameters are shared, so changing them on a cloned module will also affect the original module.

Implements PathElement.

Definition at line 179 of file Module.cc.

180{
182 newModule->m_moduleParamList.setParameters(getParamList());
183 newModule->setName(getName());
184 newModule->m_package = m_package;
185 newModule->m_propertyFlags = m_propertyFlags;
186 newModule->m_logConfig = m_logConfig;
187 newModule->m_conditions = m_conditions;
188
189 return newModule;
190}
std::shared_ptr< Module > registerModule(const std::string &moduleName, std::string sharedLibPath="") noexcept(false)
Creates an instance of a module and registers it to the ModuleManager.
static ModuleManager & Instance()
Exception is thrown if the requested module could not be created by the ModuleManager.
const ModuleParamList & getParamList() const
Return module param list.
Definition: Module.h:363
const std::string & getName() const
Returns the name of the module.
Definition: Module.h:187
const std::string & getType() const
Returns the type of the module (i.e.
Definition: Module.cc:41
unsigned int m_propertyFlags
The properties of the module as bitwise or (with |) of EModulePropFlags.
Definition: Module.h:512
LogConfig m_logConfig
The log system configuration of the module.
Definition: Module.h:514
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition: Module.h:521
std::string m_package
Package this module is found in (may be empty).
Definition: Module.h:510
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition: Module.h:43

◆ def_beginRun()

virtual void def_beginRun ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 426 of file Module.h.

426{ beginRun(); }
virtual void beginRun()
Called when entering a new run.
Definition: Module.h:147

◆ def_endRun()

virtual void def_endRun ( )
inlineprotectedvirtualinherited

This method can receive that the current run ends as a call from the Python side.

For regular C++-Modules that forwards the call to the regular endRun() method.

Reimplemented in PyModule.

Definition at line 439 of file Module.h.

439{ endRun(); }
virtual void endRun()
This method is called if the current run ends.
Definition: Module.h:166

◆ def_event()

virtual void def_event ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 432 of file Module.h.

432{ event(); }
virtual void event()
This method is the core of the module.
Definition: Module.h:157

◆ def_initialize()

virtual void def_initialize ( )
inlineprotectedvirtualinherited

Wrappers to make the methods without "def_" prefix callable from Python.

Overridden in PyModule. Wrapper method for the virtual function initialize() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 420 of file Module.h.

420{ initialize(); }
virtual void initialize()
Initialize the Module.
Definition: Module.h:109

◆ def_terminate()

virtual void def_terminate ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 445 of file Module.h.

445{ terminate(); }
virtual void terminate()
This method is called at the end of the event processing.
Definition: Module.h:176

◆ endRun()

virtual void endRun ( void  )
inlinevirtualinherited

This method is called if the current run ends.

Use this method to store information, which should be aggregated over one run.

This method can be implemented by subclasses.

Reimplemented in BeamabortModule, BgoModule, CaveModule, ClawModule, CLAWSModule, DosiModule, FANGSModule, He3tubeModule, MicrotpcModule, Ph1bpipeModule, Ph1sustrModule, PindiodeModule, PlumeModule, QcsmonitorModule, SrsensorModule, GetEventFromSocketModule, CalibrationCollectorModule, AlignDQMModule, CosmicsAlignmentValidationModule, CurlTaggerModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, arichBtestModule, ARICHDQMModule, B2BIIMCParticlesMonitorModule, B2BIIConvertMdstModule, B2BIIMdstInputModule, BelleMCOutputModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BGOverlayInputModule, AnalysisPhase1StudyModule, NtuplePhase1_v6Module, ReprocessorModule, BeamabortStudyModule, BeamDigitizerModule, BgoDigitizerModule, BgoStudyModule, ClawDigitizerModule, ClawStudyModule, ClawsDigitizerModule, ClawsStudyModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, DosiDigitizerModule, DosiStudyModule, FANGSDigitizerModule, FANGSStudyModule, He3DigitizerModule, He3tubeStudyModule, MicrotpcStudyModule, TpcDigitizerModule, TPCStudyModule, PinDigitizerModule, PindiodeStudyModule, PlumeDigitizerModule, QcsmonitorDigitizerModule, QcsmonitorStudyModule, CDCCosmicAnalysisModule, CDCCRTestModule, cdcDQM7Module, CDCDQMModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, DAQPerfModule, RxSocketModule, TxSocketModule, DqmHistoManagerModule, MonitorDataModule, TrackAnaModule, Ds2SampleModule, ReceiveEventModule, HLTDQM2ZMQModule, HLTDs2ZMQModule, ElapsedTimeModule, DeSerializerPXDModule, GenRawSendModule, Root2RawModule, SerializerModule, CertifyParallelModule, Ds2RawModule, Ds2RbufModule, EvReductionModule, FastRbuf2DsModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, Ds2RawFileModule, PartialSeqRootReaderModule, SeqRootMergerModule, StorageDeserializerModule, StorageRootOutputModule, StorageSerializerModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, ECLBackgroundModule, ECLChargedPIDModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLClusterPSDModule, ECLCovarianceMatrixModule, ECLCRFinderModule, ECLDataAnalysisModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMModule, ECLDQMEXTENDEDModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLocalRunCalibratorModule, ECLLOMModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLUnpackerModule, ECLWaveformFitModule, HistoModule, SubEventModule, SwitchDataStoreModule, EventInfoPrinterModule, RandomBarrierModule, HistoManagerModule, StatisticsSummaryModule, SeqRootInputModule, SeqRootOutputModule, RxModule, TxModule, ZMQTxInputModule, ZMQTxWorkerModule, EvtGenDecayModule, OverrideGenerationFlagsModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, EKLMDataCheckerModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDQMModule, KLMDQM2Module, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMUnpackerModule, AWESOMEBasicModule, PXDBackgroundModule, PXDClustersFromTracksModule, PXDPerformanceModule, Convert2RawDetModule, PrintDataModule, PrintEventRateModule, Root2BinaryModule, CDCDedxDQMModule, CDCDedxValidationModule, EventT0ValidationModule, DataWriterModule, KlongValidationModule, KLMMuonIDDNNExpertModule, FullSimModule, SVDBackgroundModule, SVDClusterCalibrationsMonitorModule, SVDHotStripFinderModule, SVDLatencyCalibrationModule, SVDLocalCalibrationsMonitorModule, SVDPositionErrorScaleFactorImporterModule, SVDTimeCalibrationsMonitorModule, svdDumpModule, SVDPackerModule, SVDB4CommissioningPlotsModule, SVDClusterEvaluationModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDOccupancyAnalysisModule, SVDPerformanceModule, SVDShaperDigitsFromTracksModule, SVDClusterizerModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, SVDRecoDigitCreatorModule, SVD3SamplesEmulatorModule, SVDTriggerQualityGeneratorModule, SVDUnpackerModule, TOPBackgroundModule, TOPChannelT0MCModule, TOPTriggerDigitizerModule, TOPDoublePulseGeneratorModule, TOPGainEfficiencyCalculatorModule, TOPLaserHitSelectorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPMCTrackMakerModule, TOPNtupleModule, TOPPackerModule, TOPRawDigitConverterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPWaveformQualityPlotterModule, TOPXTalkChargeShareSetterModule, ExtModule, GenfitVisModule, MCV0MatcherModule, MCTrackCandClassifierModule, MuidModule, MCSlowPionPXDROICreatorModule, PXDROIFinderModule, SVDROIDQMModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, RT2SPTCConverterModule, SPTCmomentumSeedRetrieverModule, SPTCvirtualIPRemoverModule, TrackFinderMCTruthRecoTracksModule, EffPlotsModule, HitXPModule, TrackingPerformanceEvaluationModule, V0findingPerformanceEvaluationModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, TrackFinderVXDAnalizerModule, VXDSimpleClusterizerModule, NoKickCutsEvalModule, SectorMapBootstrapModule, VXDTFTrainingDataCollectorModule, FindletModule< AFindlet >, FindletModule< HitBasedT0Extractor >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromHitsFindlet >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromSegmentsFindlet >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< FacetCreator >, FindletModule< HitReclaimer >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinder >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerNDFinderModule, TRGCDCModule, TRGCDCETFUnpackerModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSFUnpackerModule, TRGCDCTSStreamModule, MCMatcherTRGECLModule, TRGECLFAMModule, TRGECLModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGGDLModule, TRGEFFDQMModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLSummaryModule, TRGGDLUnpackerModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLDQMModule, TRGGRLUnpackerModule, KLMTriggerModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TRGRAWDATAModule, DQMHistAnalysisARICHModule, DQMHistAnalysisARICHMonObjModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisDAQMonObjModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLOutOfTimeDigitsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisExampleModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisHLTMonObjModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLMModule, DQMHistAnalysisKLM2Module, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisMonObjModule, DQMHistAnalysisOutputFileModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisSVDClustersOnTrackModule, DQMHistAnalysisSVDDoseModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOccupancyModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisSVDUnpackerModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTRGECLModule, DQMHistAnalysisTRGEFFModule, DQMHistAnalysisTRGGDLModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DQMHistReferenceModule, DQMHistSnapshotsModule, PyModule, SVDUnpackerDQMModule, TrackSetEvaluatorHopfieldNNDEVModule, vxdDigitMaskingModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisEpicsOutputModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisTRGModule, and DQMHistOutputToEPICSModule.

Definition at line 166 of file Module.h.

166{};

◆ evalCondition()

bool evalCondition ( ) const
inherited

If at least one condition was set, it is evaluated and true returned if at least one condition returns true.

If no condition or result value was defined, the method returns false. Otherwise, the condition is evaluated and true returned, if at least one condition returns true. To speed up the evaluation, the condition strings were already parsed in the method if_value().

Returns
True if at least one condition and return value exists and at least one condition expression was evaluated to true.

Definition at line 96 of file Module.cc.

97{
98 if (m_conditions.empty()) return false;
99
100 //okay, a condition was set for this Module...
101 if (!m_hasReturnValue) {
102 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
103 }
104
105 for (const auto& condition : m_conditions) {
106 if (condition.evaluate(m_returnValue)) {
107 return true;
108 }
109 }
110 return false;
111}
int m_returnValue
The return value.
Definition: Module.h:519
bool m_hasReturnValue
True, if the return value is set.
Definition: Module.h:518

◆ event()

void event ( void  )
overridevirtual

event: check SpacePointTrackCand for curling behaviour, split if needed (and wanted by user)

Reimplemented from Module.

Definition at line 235 of file CurlingTrackCandSplitterModule.cc.

236{
237 StoreObjPtr<EventMetaData> eventMetaDataPtr("EventMetaData", DataStore::c_Event);
238 const int eventCounter = eventMetaDataPtr->getEvent();
239 B2DEBUG(21, "CurlingTrackCandSplitter::event(). -------------- Processing event " << eventCounter << " ----------------");
240
241 // StoreArrays that will be used for storing
242 int nTCs = m_spacePointTCs.getEntries();
243
244 B2DEBUG(21, "Found " << nTCs << " SpacePointTrackCands in StoreArray " << m_spacePointTCs.getName() << " for this event");
245
246 RootVariables rootVariables;
247
248 for (int iTC = 0; iTC < nTCs; ++iTC) {
249 SpacePointTrackCand* spacePointTC = m_spacePointTCs[iTC];
251
252 B2DEBUG(21, "=========================== Processing SpacePointTrackCand " << iTC << " ===============================");
253 try {
254 const std::vector<int> splittingIndices = checkTrackCandForCurling(*spacePointTC, rootVariables);
255
256 if (splittingIndices.empty()) {
257 B2DEBUG(21, "This SpacePointTrackCand shows no curling behaviour and will be added to collection: " << m_PARAMcurlingOutFirstName);
258 spacePointTC->setTrackStubIndex(0); // set TrackStubIndex to 0 (indicates, that this TrackCandidate shows no curling behaviour)
259 // add this spacePoint to the StoreArray with the first outgoing parts since the whole TC is outgoing
260 SpacePointTrackCand* newSPTC = m_curlingFirstOuts.appendNew(*spacePointTC);
261 newSPTC->addRelationTo(spacePointTC);
263 } else {
264 B2DEBUG(21, "This SpacePointTrackCand shows curling behaviour");
265 if (!m_PARAMsplitCurlers) {
266 B2DEBUG(21, "This SpacePointTrackCand could be split into " << splittingIndices.size() + 1 <<
267 " but will not, because splitCurlers is set to false");
268 continue; // should jump to enclosing for-loop!!! (process the next SpacePointTrackCand)
269 }
271 // get the TrackCand Stubs
272 std::vector<SpacePointTrackCand> trackStubs = splitCurlingTrackCand(*spacePointTC, m_PARAMnTrackStubs, splittingIndices);
273
274 // add the stubs to the appropriate StoreArray
275 for (SpacePointTrackCand trackStub : trackStubs) {
279 newSPTC->addRelationTo(spacePointTC);
280 B2DEBUG(21, "Added SpacePointTrackCand " << newSPTC->getArrayIndex() << " to StoreArray " << newSPTC->getArrayName());
281 }
282 if (!trackStub.isOutgoing()) {
283 SpacePointTrackCand* newSPTC = m_curlingAllIns.appendNew(trackStub);
284 newSPTC->addRelationTo(spacePointTC);
285 B2DEBUG(21, "Added SpacePointTrackCand " << newSPTC->getArrayIndex() << " to StoreArray " << newSPTC->getArrayName());
286 } else { // if not ingoing differentiate between first part and all of the rest
287 if (trackStub.getTrackStubIndex() > 1) {
288 SpacePointTrackCand* newSPTC = m_curlingRestOuts.appendNew(trackStub);
289 newSPTC->addRelationTo(spacePointTC);
290 B2DEBUG(21, "Added SpacePointTrackCand " << newSPTC->getArrayIndex() << " to StoreArray " << newSPTC->getArrayName());
291 } else {
293 newSPTC->addRelationTo(spacePointTC);
294 B2DEBUG(21, "Added SpacePointTrackCand " << newSPTC->getArrayIndex() << " to StoreArray " << newSPTC->getArrayName());
295 }
296 }
297 }
298 }
299 } catch (FoundNoTrueHit& anE) {
300 B2WARNING("Caught an exception during checking for curling behaviour: " << anE.what() <<
301 " This TrackCandidate cannot be checked for curling behaviour");
303 } catch (FoundNoCluster& anE) {
304 B2WARNING("Caught an exception during checking for curling behaviour: " << anE.what() <<
305 " This TrackCandidate cannot be checked for curling behaviour");
307 } catch (TrueHitsNotMatching& anE) {
308 B2WARNING("Caught an exception during checking for curling behaviour: " << anE.what() <<
309 " This TrackCandidate cannot be checked for curling behaviour");
311 } catch (SpacePointTrackCand::UnsupportedDetType& anE) {
312 B2WARNING("Caught an exception during checking for curling behaviour: " << anE.what() <<
313 " This TrackCandidate cannot be checked for curling behaviour");
315 }
316 }
317 // only write to root once per event
318 if (m_PARAMpositionAnalysis) { writeToRoot(rootVariables); }
319}
int m_NoCurlingTCsCtr
Counter for SPTCs that were not curling and hence were added to the StoreArray of first out parts.
StoreArray< SpacePointTrackCand > m_spacePointTCs
SpacePointTrackCand StoreArray.
StoreArray< SpacePointTrackCand > m_curlingAllIns
Curling SpacePointTrackCand StoreArray.
StoreArray< SpacePointTrackCand > m_curlingFirstOuts
Curling SpacePointTrackCand StoreArray.
int m_createdTrackStubsCtr
Counter for created TrackCand Stubs by splitting a SpacePointTrackCand.
const std::vector< int > checkTrackCandForCurling(const Belle2::SpacePointTrackCand &, RootVariables &rootVariables)
Check if the track candidate is curling.
StoreArray< SpacePointTrackCand > m_curlingCompletes
Curling SpacePointTrackCand StoreArray.
void writeToRoot(const RootVariables &rootVariables)
Write previously collected values to ROOT file.
int m_noDecisionPossibleCtr
Counter for TrackCands where a decision if curling or not is not possible.
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_curlingTCCtr
Counter for TrackCands that show curling behaviour.
int m_spacePointTCCtr
Counter for presented SpacePointTrackCands.
StoreArray< SpacePointTrackCand > m_curlingRestOuts
Curling SpacePointTrackCand StoreArray.
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
Definition: DataStore.h:59
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
Storage for (VXD) SpacePoint-based track candidates.
void setTrackStubIndex(int trackStubInd)
set TrackStub index
const std::string & getName() const
Return name under which the object is saved in the DataStore.
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96

◆ exposePythonAPI()

void exposePythonAPI ( )
staticinherited

Exposes methods of the Module class to Python.

Definition at line 325 of file Module.cc.

326{
327 // to avoid confusion between std::arg and boost::python::arg we want a shorthand namespace as well
328 namespace bp = boost::python;
329
330 docstring_options options(true, true, false); //userdef, py sigs, c++ sigs
331
332 void (Module::*setReturnValueInt)(int) = &Module::setReturnValue;
333
334 enum_<Module::EAfterConditionPath>("AfterConditionPath",
335 R"(Determines execution behaviour after a conditional path has been executed:
336
337.. attribute:: END
338
339 End processing of this path after the conditional path. (this is the default for if_value() etc.)
340
341.. attribute:: CONTINUE
342
343 After the conditional path, resume execution after this module.)")
344 .value("END", Module::EAfterConditionPath::c_End)
345 .value("CONTINUE", Module::EAfterConditionPath::c_Continue)
346 ;
347
348 /* Do not change the names of >, <, ... we use them to serialize conditional pathes */
349 enum_<Belle2::ModuleCondition::EConditionOperators>("ConditionOperator")
356 ;
357
358 enum_<Module::EModulePropFlags>("ModulePropFlags",
359 R"(Flags to indicate certain low-level features of modules, see :func:`Module.set_property_flags()`, :func:`Module.has_properties()`. Most useful flags are:
360
361.. attribute:: PARALLELPROCESSINGCERTIFIED
362
363 This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)
364
365.. attribute:: HISTOGRAMMANAGER
366
367 This module is used to manage histograms accumulated by other modules
368
369.. attribute:: TERMINATEINALLPROCESSES
370
371 When using parallel processing, call this module's terminate() function in all processes. This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.
372)")
373 .value("INPUT", Module::EModulePropFlags::c_Input)
374 .value("OUTPUT", Module::EModulePropFlags::c_Output)
375 .value("PARALLELPROCESSINGCERTIFIED", Module::EModulePropFlags::c_ParallelProcessingCertified)
376 .value("HISTOGRAMMANAGER", Module::EModulePropFlags::c_HistogramManager)
377 .value("INTERNALSERIALIZER", Module::EModulePropFlags::c_InternalSerializer)
378 .value("TERMINATEINALLPROCESSES", Module::EModulePropFlags::c_TerminateInAllProcesses)
379 ;
380
381 //Python class definition
382 class_<Module, PyModule> module("Module", R"(
383Base class for Modules.
384
385A module is the smallest building block of the framework.
386A typical event processing chain consists of a Path containing
387modules. By inheriting from this base class, various types of
388modules can be created. To use a module, please refer to
389:func:`Path.add_module()`. A list of modules is available by running
390``basf2 -m`` or ``basf2 -m package``, detailed information on parameters is
391given by e.g. ``basf2 -m RootInput``.
392
393The 'Module Development' section in the manual provides detailed information
394on how to create modules, setting parameters, or using return values/conditions:
395https://xwiki.desy.de/xwiki/rest/p/f4fa4/#HModuleDevelopment
396
397)");
398 module
399 .def("__str__", &Module::getPathString)
400 .def("name", &Module::getName, return_value_policy<copy_const_reference>(),
401 "Returns the name of the module. Can be changed via :func:`set_name() <Module.set_name()>`, use :func:`type() <Module.type()>` for identifying a particular module class.")
402 .def("type", &Module::getType, return_value_policy<copy_const_reference>(),
403 "Returns the type of the module (i.e. class name minus 'Module')")
404 .def("set_name", &Module::setName, args("name"), R"(
405Set custom name, e.g. to distinguish multiple modules of the same type.
406
407>>> path.add_module('EventInfoSetter')
408>>> ro = path.add_module('RootOutput', branchNames=['EventMetaData'])
409>>> ro.set_name('RootOutput_metadata_only')
410>>> print(path)
411[EventInfoSetter -> RootOutput_metadata_only]
412
413)")
414 .def("description", &Module::getDescription, return_value_policy<copy_const_reference>(),
415 "Returns the description of this module.")
416 .def("package", &Module::getPackage, return_value_policy<copy_const_reference>(),
417 "Returns the package this module belongs to.")
418 .def("available_params", &_getParamInfoListPython,
419 "Return list of all module parameters as `ModuleParamInfo` instances")
420 .def("has_properties", &Module::hasProperties, (bp::arg("properties")),
421 R"DOCSTRING(Allows to check if the module has the given properties out of `ModulePropFlags` set.
422
423>>> if module.has_properties(ModulePropFlags.PARALLELPROCESSINGCERTIFIED):
424>>> ...
425
426Parameters:
427 properties (int): bitmask of `ModulePropFlags` to check for.
428)DOCSTRING")
429 .def("set_property_flags", &Module::setPropertyFlags, args("property_mask"),
430 "Set module properties in the form of an OR combination of `ModulePropFlags`.");
431 {
432 // python signature is too crowded, make ourselves
433 docstring_options subOptions(true, false, false); //userdef, py sigs, c++ sigs
434 module
435 .def("if_value", &Module::if_value,
436 (bp::arg("expression"), bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
437 R"DOCSTRING(if_value(expression, condition_path, after_condition_path=AfterConditionPath.END)
438
439Sets a conditional sub path which will be executed after this
440module if the return value set in the module passes the given ``expression``.
441
442Modules can define a return value (int or bool) using ``setReturnValue()``,
443which can be used in the steering file to split the Path based on this value, for example
444
445>>> module_with_condition.if_value("<1", another_path)
446
447In case the return value of the ``module_with_condition`` for a given event is
448less than 1, the execution will be diverted into ``another_path`` for this event.
449
450You could for example set a special return value if an error occurs, and divert
451the execution into a path containing :b2:mod:`RootOutput` if it is found;
452saving only the data producing/produced by the error.
453
454After a conditional path has executed, basf2 will by default stop processing
455the path for this event. This behaviour can be changed by setting the
456``after_condition_path`` argument.
457
458Parameters:
459 expression (str): Expression to determine if the conditional path should be executed.
460 This should be one of the comparison operators ``<``, ``>``, ``<=``,
461 ``>=``, ``==``, or ``!=`` followed by a numerical value for the return value
462 condition_path (Path): path to execute in case the expression is fulfilled
463 after_condition_path (AfterConditionPath): What to do once the ``condition_path`` has been executed.
464)DOCSTRING")
465 .def("if_false", &Module::if_false,
466 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
467 R"DOC(if_false(condition_path, after_condition_path=AfterConditionPath.END)
468
469Sets a conditional sub path which will be executed after this module if
470the return value of the module evaluates to False. This is equivalent to
471calling `if_value` with ``expression=\"<1\"``)DOC")
472 .def("if_true", &Module::if_true,
473 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
474 R"DOC(if_true(condition_path, after_condition_path=AfterConditionPath.END)
475
476Sets a conditional sub path which will be executed after this module if
477the return value of the module evaluates to True. It is equivalent to
478calling `if_value` with ``expression=\">=1\"``)DOC");
479 }
480 module
481 .def("has_condition", &Module::hasCondition,
482 "Return true if a conditional path has been set for this module "
483 "using `if_value`, `if_true` or `if_false`")
484 .def("get_all_condition_paths", &_getAllConditionPathsPython,
485 "Return a list of all conditional paths set for this module using "
486 "`if_value`, `if_true` or `if_false`")
487 .def("get_all_conditions", &_getAllConditionsPython,
488 "Return a list of all conditional path expressions set for this module using "
489 "`if_value`, `if_true` or `if_false`")
490 .add_property("logging", make_function(&Module::getLogConfig, return_value_policy<reference_existing_object>()),
@ c_GE
Greater or equal than: ">=".
@ c_SE
Smaller or equal than: "<=".
@ c_GT
Greater than: ">"
@ c_NE
Not equal: "!=".
@ c_EQ
Equal: "=" or "=="
@ c_ST
Smaller than: "<"
Base class for Modules.
Definition: Module.h:72
LogConfig & getLogConfig()
Returns the log system configuration.
Definition: Module.h:225
void if_value(const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
Add a condition to the module.
Definition: Module.cc:79
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
void if_true(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to set the condition of the module.
Definition: Module.cc:90
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition: Module.cc:220
void setLogConfig(const LogConfig &logConfig)
Set the log system configuration.
Definition: Module.h:230
const std::string & getDescription() const
Returns the description of the module.
Definition: Module.h:202
void if_false(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to add a condition to the module.
Definition: Module.cc:85
bool hasCondition() const
Returns true if at least one condition was set for the module.
Definition: Module.h:311
const std::string & getPackage() const
Returns the package this module is in.
Definition: Module.h:197
void setName(const std::string &name)
Set the name of the module.
Definition: Module.h:214
bool hasProperties(unsigned int propertyFlags) const
Returns true if all specified property flags are available in this module.
Definition: Module.cc:160
std::string getPathString() const override
return the module name.
Definition: Module.cc:192

◆ getAfterConditionPath()

Module::EAfterConditionPath getAfterConditionPath ( ) const
inherited

What to do after the conditional path is finished.

(defaults to c_End if no condition is set)

Definition at line 133 of file Module.cc.

134{
135 if (m_conditions.empty()) return EAfterConditionPath::c_End;
136
137 //okay, a condition was set for this Module...
138 if (!m_hasReturnValue) {
139 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
140 }
141
142 for (const auto& condition : m_conditions) {
143 if (condition.evaluate(m_returnValue)) {
144 return condition.getAfterConditionPath();
145 }
146 }
147
148 return EAfterConditionPath::c_End;
149}

◆ getAllConditionPaths()

std::vector< std::shared_ptr< Path > > getAllConditionPaths ( ) const
inherited

Return all condition paths currently set (no matter if the condition is true or not).

Definition at line 150 of file Module.cc.

151{
152 std::vector<std::shared_ptr<Path>> allConditionPaths;
153 for (const auto& condition : m_conditions) {
154 allConditionPaths.push_back(condition.getPath());
155 }
156
157 return allConditionPaths;
158}

◆ getAllConditions()

const std::vector< ModuleCondition > & getAllConditions ( ) const
inlineinherited

Return all set conditions for this module.

Definition at line 324 of file Module.h.

325 {
326 return m_conditions;
327 }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

Return a pointer to the first condition (or nullptr, if none was set)

Definition at line 314 of file Module.h.

315 {
316 if (m_conditions.empty()) {
317 return nullptr;
318 } else {
319 return &m_conditions.front();
320 }
321 }

◆ getConditionPath()

std::shared_ptr< Path > getConditionPath ( ) const
inherited

Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).


Definition at line 113 of file Module.cc.

114{
115 PathPtr p;
116 if (m_conditions.empty()) return p;
117
118 //okay, a condition was set for this Module...
119 if (!m_hasReturnValue) {
120 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
121 }
122
123 for (const auto& condition : m_conditions) {
124 if (condition.evaluate(m_returnValue)) {
125 return condition.getPath();
126 }
127 }
128
129 // if none of the conditions were true, return a null pointer.
130 return p;
131}
std::shared_ptr< Path > PathPtr
Defines a pointer to a path object as a boost shared pointer.
Definition: Path.h:35

◆ getDescription()

const std::string & getDescription ( ) const
inlineinherited

Returns the description of the module.

Definition at line 202 of file Module.h.

202{return m_description;}
std::string m_description
The description of the module.
Definition: Module.h:511

◆ getDirectionOfFlight()

bool getDirectionOfFlight ( std::pair< const B2Vector3D, const B2Vector3D > const &  hitPosAndMom,
const B2Vector3D origin 
)
protected

determine the direction of flight of a particle for a given hit and the origin (assumed interaction point).

True is outwards, false is inwards

Definition at line 545 of file CurlingTrackCandSplitterModule.cc.

548{
549 B2Vector3D originToHit = hitPosAndMom.first - origin;
550 B2Vector3D momentumAtHit = hitPosAndMom.second + originToHit;
551
552
553 B2DEBUG(21, "Position of hit relative to origin is (" << originToHit.X() << "," << originToHit.Y() << "," << originToHit.Z() <<
554 "). Momentum relative to hit (relative to origin) (" << momentumAtHit.X() << "," << momentumAtHit.Y() << "," << momentumAtHit.Z() <<
555 ")");
556
557 // cylindrical coordinates (?) -> use B2Vector3.Perp() to get the radial component of a given vector
558 // for spherical coordinates -> use B2Vector3.Mag() for the same purposes
559 double hitRadComp = originToHit.Perp(); // radial component of hit coordinates
560 double hitMomRadComp =
561 momentumAtHit.Perp(); // radial component of the tip of the momentum vector, when its origin would be the hit position (as it is only the direction of the momentum that matters here, units are completely ignored -> COULDDO: use the unit() method from B2Vector3
562
563 B2DEBUG(21, " radial component of hit coordinates: " << hitRadComp <<
564 ", radial component of tip of momentum vector with its origin set to hit position: " << hitMomRadComp);
565
566 if (hitMomRadComp < hitRadComp) {
567 B2DEBUG(21, "Direction of flight is inwards for this hit");
568 return false;
569 } else {
570 B2DEBUG(21, "Direction of flight is outwards for this hit");
571 return true;
572 }
573}
DataType Perp() const
The transverse component (R in cylindrical coordinate system).
Definition: B2Vector3.h:200

◆ getFileNames()

virtual std::vector< std::string > getFileNames ( bool  outputFiles)
inlinevirtualinherited

Return a list of output filenames for this modules.

This will be called when basf2 is run with "--dry-run" if the module has set either the c_Input or c_Output properties.

If the parameter outputFiles is false (for modules with c_Input) the list of input filenames should be returned (if any). If outputFiles is true (for modules with c_Output) the list of output files should be returned (if any).

If a module has sat both properties this member is called twice, once for each property.

The module should return the actual list of requested input or produced output filenames (including handling of input/output overrides) so that the grid system can handle input/output files correctly.

This function should return the same value when called multiple times. This is especially important when taking the input/output overrides from Environment as they get consumed when obtained so the finalized list of output files should be stored for subsequent calls.

Reimplemented in RootInputModule, StorageRootOutputModule, and RootOutputModule.

Definition at line 134 of file Module.h.

135 {
136 return std::vector<std::string>();
137 }

◆ getGlobalPositionAndMomentum() [1/2]

std::pair< const B2Vector3D, const B2Vector3D > getGlobalPositionAndMomentum ( TrueHit *  aTrueHit)
protected

Get the global position and momentum for a given TrueHit (PXD or SVD at the moment).

Template Parameters
TrueHitTrueHit type
Parameters
aTrueHitpointer to a trueHit
Returns
pair of global position and momentum for a given TrueHit. .first is position, .second is momentum

◆ getGlobalPositionAndMomentum() [2/2]

std::pair< const Belle2::B2Vector3D, const Belle2::B2Vector3D > getGlobalPositionAndMomentum ( TrueHit *  aTrueHit)

Helper class to retrieve the global position and momentum of a TrueHit.

Definition at line 519 of file CurlingTrackCandSplitterModule.cc.

520{
521 // get sensor stuff (needed for pointToGlobal)
522 VxdID aVxdId = aTrueHit->getSensorID();
523
524 B2DEBUG(21, "Getting global position and momentum vectors for TrueHit " << aTrueHit->getArrayIndex() << " from Array " <<
525 aTrueHit->getArrayName() << ". This hit has VxdID " << aVxdId);
526
527 const VXD::GeoCache& geometry = VXD::GeoCache::getInstance();
528 const VXD::SensorInfoBase& sensorInfoBase = geometry.getSensorInfo(aVxdId);
529
530 // get position
531 B2Vector3D hitLocal = B2Vector3D(aTrueHit->getU(), aTrueHit->getV(), 0);
532 B2Vector3D hitGlobal = sensorInfoBase.pointToGlobal(
533 hitLocal, true); // should work like this, since local coordinates are only 2D
534 B2DEBUG(21, "Local position of hit is (" << hitLocal.X() << "," << hitLocal.Y() << "," << hitLocal.Z() <<
535 "), Global position of hit is (" << hitGlobal.X() << "," << hitGlobal.Y() << "," << hitGlobal.Z() << ")");
536
537 // get momentum
538 B2Vector3D pGlobal = sensorInfoBase.vectorToGlobal(aTrueHit->getMomentum(), true);
539 B2DEBUG(21, "Global momentum of hit is (" << pGlobal.X() << "," << pGlobal.Y() << "," << pGlobal.Z() << ")");
540
541 return std::make_pair(hitGlobal, pGlobal);
542}
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Base class to provide Sensor Information for PXD and SVD.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.
ROOT::Math::XYZVector vectorToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a vector from local to global coordinates.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 225 of file Module.h.

225{return m_logConfig;}

◆ getModules()

std::list< ModulePtr > getModules ( ) const
inlineoverrideprivatevirtualinherited

no submodules, return empty list

Implements PathElement.

Definition at line 506 of file Module.h.

506{ return std::list<ModulePtr>(); }

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns the name of the module.

This can be changed via e.g. set_name() in the steering file to give more useful names if there is more than one module of the same type.

For identifying the type of a module, using getType() (or type() in Python) is recommended.

Definition at line 187 of file Module.h.

187{return m_name;}
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition: Module.h:508

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 197 of file Module.h.

197{return m_package;}

◆ getParamInfoListPython()

std::shared_ptr< boost::python::list > getParamInfoListPython ( ) const
inherited

Returns a python list of all parameters.

Each item in the list consists of the name of the parameter, a string describing its type, a python list of all default values and the description of the parameter.

Returns
A python list containing the parameters of this parameter list.

Definition at line 279 of file Module.cc.

280{
282}
std::shared_ptr< boost::python::list > getParamInfoListPython() const
Returns a python list of all parameters.
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition: Module.h:516

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 363 of file Module.h.

363{ return m_moduleParamList; }

◆ getPathString()

std::string getPathString ( ) const
overrideprivatevirtualinherited

return the module name.

Implements PathElement.

Definition at line 192 of file Module.cc.

193{
194
195 std::string output = getName();
196
197 for (const auto& condition : m_conditions) {
198 output += condition.getString();
199 }
200
201 return output;
202}

◆ getReturnValue()

int getReturnValue ( ) const
inlineinherited

Return the return value set by this module.

This value is only meaningful if hasReturnValue() is true

Definition at line 381 of file Module.h.

381{ return m_returnValue; }

◆ getType()

const std::string & getType ( ) const
inherited

Returns the type of the module (i.e.

class name minus 'Module')

Definition at line 41 of file Module.cc.

42{
43 if (m_type.empty())
44 B2FATAL("Module type not set for " << getName());
45 return m_type;
46}
std::string m_type
The type of the module, saved as a string.
Definition: Module.h:509

◆ getUV()

CurlingTrackCandSplitterModule::TaggedUVPos getUV ( const SpacePoint spacePoint)
protected

get U&V for a SpacePoint (via its relation to Clusters) (SpacePoint can only return normalized U&V coordinates).

Returning a TaggedUVPos makes it possible to properly analyze SpacePoints with only one Cluster

Definition at line 761 of file CurlingTrackCandSplitterModule.cc.

762{
763 TaggedUVPos returnVals; // initialized to: both bools false, both doubles to 0.
764
765 // get the normalized local coordinates from SpacePoint and convert them to local coordinates (have to do so because at the slanted parts the local U-position is dependent on the local V-position)
766 double normU = spacePoint->getNormalizedLocalU();
767 double normV = spacePoint->getNormalizedLocalV();
768
769 // convert normalized coordinates to local coordinates (those are already 'unwedged')
770 std::pair<double, double> localUV = SpacePoint::convertNormalizedToLocalCoordinates(std::make_pair(normU, normV),
771 spacePoint->getVxdID());
772 //double unwedgedU = SpacePoint::getUUnwedged(localUV, spacePoint->getVxdID());
773
774 // set values for return: set both m_U and m_V regardless if they have actually been set in the SpacePoint and simply assign the m_setX tags, as they decide if a value is actually used
775 std::pair<bool, bool> setCoords = spacePoint->getIfClustersAssigned();
776
777 returnVals.m_setU = setCoords.first;
778 returnVals.m_setV = setCoords.second;
779 returnVals.m_U = localUV.first;
780 returnVals.m_V = localUV.second;
781
782 return returnVals;
783}
double getNormalizedLocalV() const
Return normalized local coordinates of the cluster in v (0 <= posV <= 1).
Definition: SpacePoint.h:154
std::pair< bool, bool > getIfClustersAssigned() const
Returns, if u(v)-coordinate is based on cluster information.
Definition: SpacePoint.h:162
VxdID getVxdID() const
Return the VxdID of the sensor on which the the cluster of the SpacePoint lives.
Definition: SpacePoint.h:148
static std::pair< double, double > convertNormalizedToLocalCoordinates(const std::pair< double, double > &hitNormalized, Belle2::VxdID vxdID, const Belle2::VXD::SensorInfoBase *aSensorInfo=nullptr)
converts a hit in sensor-independent relative coordinates into local coordinate of given sensor.
Definition: SpacePoint.cc:178
double getNormalizedLocalU() const
Return normalized local coordinates of the cluster in u (0 <= posU <= 1).
Definition: SpacePoint.h:151

◆ getValuesForRoot()

void getValuesForRoot ( const SpacePoint spacePoint,
const TrueHit *  trueHit,
RootVariables rootVariables 
)
protected

Get The Values that are later written to a ROOT file.

Definition at line 642 of file CurlingTrackCandSplitterModule.cc.

644{
645 B2DEBUG(21, "Getting positions (for ROOT output) of SpacePoint " << spacePoint->getArrayIndex() << " from Array " <<
646 spacePoint->getArrayName() << " and TrueHit " << trueHit->getArrayIndex() << " from Array " << trueHit->getArrayName());
647
648 // get VxdIDs of spacePoint and trueHit (and their according layer numbers for storing the information in the appropriate arrays)
649 VxdID spacePointVxdId = spacePoint->getVxdID();
650 VxdID trueHitVxdId = trueHit->getSensorID();
651
652 // get positions from SpacePoint
653 const B2Vector3D& spacePointGlobal =
654 spacePoint->getPosition(); // COULDDO: unnecessary, spacePoint->X(), etc. returns the same information!
655// std::pair<double, double> spacePointUV = getUV(spacePoint);
656 TaggedUVPos spacePointUV = getUV(spacePoint);
657 const B2Vector3D spacePointLocal = B2Vector3D(spacePointUV.m_U, spacePointUV.m_V, 0);
658
659 // get local position from TrueHit
660 const B2Vector3D trueHitLocal = B2Vector3D(trueHit->getU(), trueHit->getV(), 0);
661
662 // get sensor Info for global position of TrueHit
663 const VXD::GeoCache& geometry = VXD::GeoCache::getInstance();
664 const VXD::SensorInfoBase& sensorInfoBase = geometry.getSensorInfo(trueHitVxdId);
665
666 // get global position from TrueHit
667 const B2Vector3D trueHitGlobal = sensorInfoBase.pointToGlobal(trueHitLocal, true);
668
669 // Layer numbering starts at 1 not at 0 so deduce layer by one to access array
670 int spLayer = spacePointVxdId.getLayerNumber() - 1;
671 int thLayer = trueHitVxdId.getLayerNumber() - 1;
672
673 if (spLayer != thLayer) {
674 B2FATAL("Layer numbers of TrueHit and SpacePoint do not match!"); // this should never happen -> FATAL if it does, because something has gone amiss then
675 }
676
677 // all positions collected, but only write the values to ROOT that have been set appropriately!
678 bool singleCluster = true; // for debug output
679 if (spacePointUV.m_setU) {
680 rootVariables.SpacePointULocal.at(spLayer).push_back(spacePointUV.m_U);
681 rootVariables.TrueHitULocal.at(thLayer).push_back(trueHit->getU());
682 rootVariables.PosResidueULocal.at(spLayer).push_back((spacePointUV.m_U - trueHit->getU()));
683 }
684 if (spacePointUV.m_setV) {
685 rootVariables.SpacePointVLocal.at(spLayer).push_back(spacePointUV.m_V);
686 rootVariables.TrueHitVLocal.at(thLayer).push_back(trueHit->getV());
687 rootVariables.PosResidueVLocal.at(spLayer).push_back((spacePointUV.m_V - trueHit->getV()));
688 }
689 if (spacePointUV.m_setU && spacePointUV.m_setV) {
690 rootVariables.SpacePointXGlobal.at(spLayer).push_back(spacePoint->X());
691 rootVariables.SpacePointYGlobal.at(spLayer).push_back(spacePoint->Y());
692 rootVariables.SpacePointZGlobal.at(spLayer).push_back(spacePoint->Z());
693
694 rootVariables.TrueHitXGlobal.at(thLayer).push_back(trueHitGlobal.X());
695 rootVariables.TrueHitYGlobal.at(thLayer).push_back(trueHitGlobal.Y());
696 rootVariables.TrueHitZGlobal.at(thLayer).push_back(trueHitGlobal.Z());
697
698 rootVariables.PosResidueXGlobal.at(spLayer).push_back((spacePointGlobal - trueHitGlobal).X());
699 rootVariables.PosResidueYGlobal.at(spLayer).push_back((spacePointGlobal - trueHitGlobal).Y());
700 rootVariables.PosResidueZGlobal.at(spLayer).push_back((spacePointGlobal - trueHitGlobal).Z());
701
702 rootVariables.PosResiduesGlobal.at(spLayer).push_back((spacePointGlobal - trueHitGlobal).Mag());
703 rootVariables.PosResiduesLocal.at(spLayer).push_back((spacePointLocal - trueHitLocal).Mag());
704
705 singleCluster = false;
706 }
707
708 B2DEBUG(21, "Global (x,y,z)/Local (U,V) positions of SpacePoint: (" << spacePointGlobal.X() << "," << spacePointGlobal.Y() << ","
709 << spacePointGlobal.Z() << ")/(" << spacePointLocal.X() << "," << spacePointLocal.Y() << "). This was a singleCluster SpacePoint: "
710 << singleCluster);
711
712 B2DEBUG(21, "Global (x,y,z)/Local (U,V) positions of TrueHit: (" << trueHitGlobal.X() << "," << trueHitGlobal.Y() << "," <<
713 trueHitGlobal.Z() << ")/(" << trueHitLocal.X() << "," << trueHitLocal.Y() << ")");
714
715 B2DEBUG(21, "This leads to position differences global/local: " << (spacePointGlobal - trueHitGlobal).Mag() << "/" <<
716 (spacePointLocal - trueHitLocal).Mag());
717
718}
TaggedUVPos getUV(const SpacePoint *spacePoint)
get U&V for a SpacePoint (via its relation to Clusters) (SpacePoint can only return normalized U&V co...
const B2Vector3D & getPosition() const
return the position vector in global coordinates
Definition: SpacePoint.h:138
double Z() const
return the z-value of the global position of the SpacePoint
Definition: SpacePoint.h:129
double X() const
return the x-value of the global position of the SpacePoint
Definition: SpacePoint.h:123
double Y() const
return the y-value of the global position of the SpacePoint
Definition: SpacePoint.h:126
baseType getLayerNumber() const
Get the layer id.
Definition: VxdID.h:96

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

Returns true if at least one condition was set for the module.

Definition at line 311 of file Module.h.

311{ return not m_conditions.empty(); };

◆ hasProperties()

bool hasProperties ( unsigned int  propertyFlags) const
inherited

Returns true if all specified property flags are available in this module.

Parameters
propertyFlagsOred EModulePropFlags which should be compared with the module flags.

Definition at line 160 of file Module.cc.

161{
162 return (propertyFlags & m_propertyFlags) == propertyFlags;
163}

◆ hasReturnValue()

bool hasReturnValue ( ) const
inlineinherited

Return true if this module has a valid return value set.

Definition at line 378 of file Module.h.

378{ return m_hasReturnValue; }

◆ hasUnsetForcedParams()

bool hasUnsetForcedParams ( ) const
inherited

Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.

Definition at line 166 of file Module.cc.

167{
169 std::string allMissing = "";
170 for (const auto& s : missing)
171 allMissing += s + " ";
172 if (!missing.empty())
173 B2ERROR("The following required parameters of Module '" << getName() << "' were not specified: " << allMissing <<
174 "\nPlease add them to your steering file.");
175 return !missing.empty();
176}
std::vector< std::string > getUnsetForcedParams() const
Returns list of unset parameters (if they are required to have a value.

◆ if_false()

void if_false ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression "<1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is false.
afterConditionPathWhat to do after executing 'path'.

Definition at line 85 of file Module.cc.

86{
87 if_value("<1", path, afterConditionPath);
88}

◆ if_true()

void if_true ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to set the condition of the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression ">=1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 90 of file Module.cc.

91{
92 if_value(">=1", path, afterConditionPath);
93}

◆ if_value()

void if_value ( const std::string &  expression,
const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

Add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

See https://xwiki.desy.de/xwiki/rest/p/a94f2 or ModuleCondition for a description of the syntax.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

Parameters
expressionThe expression of the condition.
pathShared pointer to the Path which will be executed if the condition is evaluated to true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 79 of file Module.cc.

80{
81 m_conditions.emplace_back(expression, path, afterConditionPath);
82}

◆ initialize()

void initialize ( void  )
overridevirtual

initialize: initialize counters, register stuff in DataStore, check if all necessary StoreArrays are present, etc.

Reimplemented from Module.

Definition at line 89 of file CurlingTrackCandSplitterModule.cc.

90{
92 B2INFO("CurlingTrackCandSplitter ----------------------------- initialize() -------------------------------------");
93 B2WARNING("CurlingTrackCandSplitter is deprecated and will be removed from framework in the near future! use SPTCReferee instead!");
94 // check if all necessary StoreArrays are present
96
97 // count all empty input parameter strings, and issue a warning if more than one is empty (COULDDO: B2FATAL instead of warning)
98 int emptyCtr = 0;
99 if (m_PARAMcurlingOutFirstName.empty()) { emptyCtr++; }
100 if (m_PARAMcurlingAllInName.empty()) { emptyCtr++; }
101 if (m_PARAMcurlingOutRestName.empty()) { emptyCtr++; }
102
103 if (emptyCtr > 1) {
104 B2WARNING("CurlingTrackCandSplitter::initialize: More than one of your input strings for the collection names is empty. This can lead to undeterministic behaviour since two or more collections will be stored under the same name!");
105 }
106
107 // register new StoreArrays, and relation to original TrackCand
110
113
116
117 // have to do this here, because in event() I do not want to check every time if this string is empty or not and act accordingly. If I register this with an empty string here, I can use it with an empty string in event() and only store stuff into it, when it is actually named with a non-empty string
120
121 if (!m_PARAMcompleteCurlerName.empty()) {
123 B2DEBUG(21, "You put in " << m_PARAMcompleteCurlerName <<
124 " as collection name for complete curling TrackCands. Complete curling TrackCands will hence be stored.");
125 } else {
126 B2DEBUG(21,
127 "You did not put in any under which complete curling TrackCands should be stored, hence curling TrackCands will only be stored in parts.");
128 m_saveCompleteCurler = false;
129 }
130
131 // check value for nTrackStubs and reset if necessary
132 if (m_PARAMnTrackStubs < 0) {
133 B2WARNING("CurlingTrackCandSplitter::initialize> Value of nTrackStubs is below 0: nTrackStubs = " << m_PARAMnTrackStubs <<
134 ". Resetting this value to 0 now! This means that all parts of curling TrackCands will be stored.");
136 } else { B2DEBUG(21, "Entered value for nTrackStubs = " << m_PARAMnTrackStubs); }
137
138 B2DEBUG(21, "Entered Value for splitCurlers: " << m_PARAMsplitCurlers);
139
140 if (m_PARAMsetOrigin.size() != 3) {
141 B2WARNING("CurlingTrackCandSplitter::initialize: Provided origin is not a 3D point! Please provide 3 values (x,y,z). Rejecting user input and setting origin to (0,0,0) for now!");
142 m_PARAMsetOrigin.clear();
143 m_PARAMsetOrigin.assign(3, 0);
144 }
146 B2DEBUG(21, "Set origin to (x,y,z): (" << m_origin.X() << "," << m_origin.Y() << "," << m_origin.Z() << ")");
147
149 // check if there are two entries and if the second value is either UPDATE or RECREATE
150 if (m_PARAMrootFileName.size() != 2 || (m_PARAMrootFileName[1] != "UPDATE" && m_PARAMrootFileName[1] != "RECREATE")) {
151 std::string output;
152 for (std::string entry : m_PARAMrootFileName) { output += "'" + entry + "' "; }
153 B2FATAL("CurlingTrackCandSplitter::initialize() : rootFileName is set wrong: entries are: " << output);
154 }
155 // create ROOT file
156 m_PARAMrootFileName[0] += ".root";
157 m_rootFilePtr = new TFile(m_PARAMrootFileName[0].c_str(), m_PARAMrootFileName[1].c_str());
158 m_treePtr = new TTree("m_treePtr", "aTree");
159
160 // link everything to the according variables
161 for (int layer = 0; layer < c_nPlanes; ++layer) {
162 std::string layerString = (boost::format("%1%") % (layer +
163 1)).str(); // layer numbering starts at 1 this way (plus cppcheck complains about division by zero otherwise)
164
165 std::string name = "SpacePointXGlobal_" + layerString;
166 m_treePtr->Branch(name.c_str(), &m_rootSpacePointXGlobals.at(layer));
167 name = "SpacePointYGlobal_" + layerString;
168 m_treePtr->Branch(name.c_str(), &m_rootSpacePointYGlobals.at(layer));
169 name = "SpacePointZGlobal_" + layerString;
170 m_treePtr->Branch(name.c_str(), &m_rootSpacePointZGlobals.at(layer));
171
172 name = "SpacePointULocal_" + layerString;
173 m_treePtr->Branch(name.c_str(), &m_rootSpacePointULocals.at(layer));
174 name = "SpacePointVlocal_" + layerString;
175 m_treePtr->Branch(name.c_str(), &m_rootSpacePointVLocals.at(layer));
176
177 name = "TrueHitXGlobal_" + layerString;
178 m_treePtr->Branch(name.c_str(), &m_rootTrueHitXGlobals.at(layer));
179 name = "TrueHitYGlobal_" + layerString;
180 m_treePtr->Branch(name.c_str(), &m_rootTrueHitYGlobals.at(layer));
181 name = "TrueHitZGlobal_" + layerString;
182 m_treePtr->Branch(name.c_str(), &m_rootTrueHitZGlobals.at(layer));
183
184 name = "TrueHitULocal_" + layerString;
185 m_treePtr->Branch(name.c_str(), &m_rootTrueHitULocals.at(layer));
186 name = "TrueHitVLocal_" + layerString;
187 m_treePtr->Branch(name.c_str(), &m_rootTrueHitVLocals.at(layer));
188
189 name = "PosResidualsXGlobal_" + layerString;
190 m_treePtr->Branch(name.c_str(), &m_rootPosResidueXGlobal.at(layer));
191 name = "PosResidualsYGlobal_" + layerString;
192 m_treePtr->Branch(name.c_str(), &m_rootPosResidueYGlobal.at(layer));
193 name = "PosResidualsZGlobal_" + layerString;
194 m_treePtr->Branch(name.c_str(), &m_rootPosResidueZGlobal.at(layer));
195
196 name = "PosResidualsULocal_" + layerString;
197 m_treePtr->Branch(name.c_str(), &m_rootPosResidueULocal.at(layer));
198 name = "PosResidualsVLocal_" + layerString;
199 m_treePtr->Branch(name.c_str(), &m_rootPosResidueVLocal.at(layer));
200
201
202 name = "LocalPositionResiduals_" + layerString;
203 m_treePtr->Branch(name.c_str(), &m_rootLocalPosResiduals.at(layer));
204 name = "GlobalPositionResiduals_" + layerString;
205 m_treePtr->Branch(name.c_str(), &m_rootGlobalPosResiduals.at(layer));
206
207 name = "MisMatchPosDistance_" + layerString;
208 m_treePtr->Branch(name.c_str(), &m_rootMisMatchPosDistance.at(layer));
209 name = "MisMatchPosX_" + layerString;
210 m_treePtr->Branch(name.c_str(), &m_rootMisMatchPosX.at(layer));
211 name = "MisMatchPosY_" + layerString;
212 m_treePtr->Branch(name.c_str(), &m_rootMisMatchPosY.at(layer));
213 name = "MisMatchPosZ_" + layerString;
214 m_treePtr->Branch(name.c_str(), &m_rootMisMatchPosZ.at(layer));
215
216 name = "MisMatchPosU_" + layerString;
217 m_treePtr->Branch(name.c_str(), &m_rootMisMatchPosU.at(layer));
218 name = "MisMatchPosV_" + layerString;
219 m_treePtr->Branch(name.c_str(), &m_rootMisMatchPosV.at(layer));
220
221 name = "MisMatchMomX_" + layerString;
222 m_treePtr->Branch(name.c_str(), &m_rootMisMatchMomX.at(layer));
223 name = "MisMatchMomY_" + layerString;
224 m_treePtr->Branch(name.c_str(), &m_rootMisMatchMomY.at(layer));
225 name = "MisMatchMomZ_" + layerString;
226 m_treePtr->Branch(name.c_str(), &m_rootMisMatchMomZ.at(layer));
227 }
228 } else {
229 m_rootFilePtr = nullptr;
230 m_treePtr = nullptr;
231 }
232}
void SetXYZ(DataType x, DataType y, DataType z)
set all coordinates using data type
Definition: B2Vector3.h:464
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_rootMisMatchPosV
Difference of V-positions (local) for mismatched TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueYGlobal
Y-position (global) difference between TrueHit and SpacePoint (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointZGlobals
Global Z-Positions of SpacePoints (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_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 > m_rootSpacePointYGlobals
Global Y-Positions of SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootGlobalPosResiduals
Global Position Residuals between TrueHits and SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitXGlobals
Global U-Positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosDistance
Distance of TrueHits that do not match but are related from one SpacePoint (layerwise)
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 > 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 > m_rootSpacePointXGlobals
Global X-Positions of SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointULocals
Local U-Positions of SpacePoints (layerwise)
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 > m_rootMisMatchPosZ
Difference of Z-positions (global) for mismatched TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootSpacePointVLocals
Local V-Positions of SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootPosResidueZGlobal
Z-position (global) difference between TrueHit and SpacePoint (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootLocalPosResiduals
Local Position Residuals between TrueHits and SpacePoints (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitYGlobals
Global V-Positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitVLocals
Local Y-Positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootMisMatchPosY
Difference of Y-positions (global) for mismatched TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitULocals
Local X-Positions of TrueHits (layerwise)
std::array< std::vector< double >, c_nPlanes > m_rootTrueHitZGlobals
Global Z-Positions of TrueHits (layerwise)
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 > m_rootPosResidueULocal
U-position (local) difference between TrueHit and SpacePoint (layerwise)
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition: DataStore.h:72
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Definition: StoreArray.h:140

◆ initializeCounters()

void initializeCounters ( )
protected

initialize all counters to 0 for avoiding undeterministic behaviour.

Definition at line 786 of file CurlingTrackCandSplitterModule.cc.

◆ setAbortLevel()

void setAbortLevel ( int  abortLevel)
inherited

Configure the abort log level.

Definition at line 67 of file Module.cc.

68{
69 m_logConfig.setAbortLevel(static_cast<LogConfig::ELogLevel>(abortLevel));
70}
ELogLevel
Definition of the supported log levels.
Definition: LogConfig.h:26
void setAbortLevel(ELogLevel abortLevel)
Configure the abort level.
Definition: LogConfig.h:112

◆ setDebugLevel()

void setDebugLevel ( int  debugLevel)
inherited

Configure the debug messaging level.

Definition at line 61 of file Module.cc.

62{
63 m_logConfig.setDebugLevel(debugLevel);
64}
void setDebugLevel(int debugLevel)
Configure the debug messaging level.
Definition: LogConfig.h:98

◆ setDescription()

void setDescription ( const std::string &  description)
protectedinherited

Sets the description of the module.

Parameters
descriptionA description of the module.

Definition at line 214 of file Module.cc.

215{
216 m_description = description;
217}

◆ setLogConfig()

void setLogConfig ( const LogConfig logConfig)
inlineinherited

Set the log system configuration.

Definition at line 230 of file Module.h.

230{m_logConfig = logConfig;}

◆ setLogInfo()

void setLogInfo ( int  logLevel,
unsigned int  logInfo 
)
inherited

Configure the printed log information for the given level.

Parameters
logLevelThe log level (one of LogConfig::ELogLevel)
logInfoWhat kind of info should be printed? ORed combination of LogConfig::ELogInfo flags.

Definition at line 73 of file Module.cc.

74{
75 m_logConfig.setLogInfo(static_cast<LogConfig::ELogLevel>(logLevel), logInfo);
76}
void setLogInfo(ELogLevel logLevel, unsigned int logInfo)
Configure the printed log information for the given level.
Definition: LogConfig.h:127

◆ setLogLevel()

void setLogLevel ( int  logLevel)
inherited

Configure the log level.

Definition at line 55 of file Module.cc.

56{
57 m_logConfig.setLogLevel(static_cast<LogConfig::ELogLevel>(logLevel));
58}
void setLogLevel(ELogLevel logLevel)
Configure the log level.
Definition: LogConfig.cc:25

◆ setName()

void setName ( const std::string &  name)
inlineinherited

Set the name of the module.

Note
The module name is set when using the REG_MODULE macro, but the module can be renamed before calling process() using the set_name() function in your steering file.
Parameters
nameThe name of the module

Definition at line 214 of file Module.h.

214{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 501 of file Module.h.

501{ m_moduleParamList = params; }

◆ setParamPython()

void setParamPython ( const std::string &  name,
const boost::python::object &  pyObj 
)
privateinherited

Implements a method for setting boost::python objects.

The method supports the following types: list, dict, int, double, string, bool The conversion of the python object to the C++ type and the final storage of the parameter value is done in the ModuleParam class.

Parameters
nameThe unique name of the parameter.
pyObjThe object which should be converted and stored as the parameter value.

Definition at line 234 of file Module.cc.

235{
236 LogSystem& logSystem = LogSystem::Instance();
237 logSystem.updateModule(&(getLogConfig()), getName());
238 try {
240 } catch (std::runtime_error& e) {
241 throw std::runtime_error("Cannot set parameter '" + name + "' for module '"
242 + m_name + "': " + e.what());
243 }
244
245 logSystem.updateModule(nullptr);
246}
Class for logging debug, info and error messages.
Definition: LogSystem.h:46
void updateModule(const LogConfig *moduleLogConfig=nullptr, const std::string &moduleName="")
Sets the log configuration to the given module log configuration and sets the module name This method...
Definition: LogSystem.h:191
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition: LogSystem.cc:31
void setParamPython(const std::string &name, const PythonObject &pyObj)
Implements a method for setting boost::python objects.

◆ setParamPythonDict()

void setParamPythonDict ( const boost::python::dict &  dictionary)
privateinherited

Implements a method for reading the parameter values from a boost::python dictionary.

The key of the dictionary has to be the name of the parameter and the value has to be of one of the supported parameter types.

Parameters
dictionaryThe python dictionary from which the parameter values are read.

Definition at line 249 of file Module.cc.

250{
251
252 LogSystem& logSystem = LogSystem::Instance();
253 logSystem.updateModule(&(getLogConfig()), getName());
254
255 boost::python::list dictKeys = dictionary.keys();
256 int nKey = boost::python::len(dictKeys);
257
258 //Loop over all keys in the dictionary
259 for (int iKey = 0; iKey < nKey; ++iKey) {
260 boost::python::object currKey = dictKeys[iKey];
261 boost::python::extract<std::string> keyProxy(currKey);
262
263 if (keyProxy.check()) {
264 const boost::python::object& currValue = dictionary[currKey];
265 setParamPython(keyProxy, currValue);
266 } else {
267 B2ERROR("Setting the module parameters from a python dictionary: invalid key in dictionary!");
268 }
269 }
270
271 logSystem.updateModule(nullptr);
272}
void setParamPython(const std::string &name, const boost::python::object &pyObj)
Implements a method for setting boost::python objects.
Definition: Module.cc:234

◆ setPropertyFlags()

void setPropertyFlags ( unsigned int  propertyFlags)
inherited

Sets the flags for the module properties.

Parameters
propertyFlagsbitwise OR of EModulePropFlags

Definition at line 208 of file Module.cc.

209{
210 m_propertyFlags = propertyFlags;
211}

◆ setReturnValue() [1/2]

void setReturnValue ( bool  value)
protectedinherited

Sets the return value for this module as bool.

The bool value is saved as an integer with the convention 1 meaning true and 0 meaning false. The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 227 of file Module.cc.

228{
229 m_hasReturnValue = true;
230 m_returnValue = value;
231}

◆ setReturnValue() [2/2]

void setReturnValue ( int  value)
protectedinherited

Sets the return value for this module as integer.

The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 220 of file Module.cc.

221{
222 m_hasReturnValue = true;
223 m_returnValue = value;
224}

◆ setType()

void setType ( const std::string &  type)
protectedinherited

Set the module type.

Only for use by internal modules (which don't use the normal REG_MODULE mechanism).

Definition at line 48 of file Module.cc.

49{
50 if (!m_type.empty())
51 B2FATAL("Trying to change module type from " << m_type << " is not allowed, the value is assumed to be fixed.");
52 m_type = type;
53}

◆ splitCurlingTrackCand()

const std::vector< Belle2::SpacePointTrackCand > splitCurlingTrackCand ( const Belle2::SpacePointTrackCand SPTrackCand,
int  NTracklets,
const std::vector< int > &  splitIndices 
)
protected

Split a culring track candidate into (up to NTracklets) tracklets.

Definition at line 577 of file CurlingTrackCandSplitterModule.cc.

579{
580 std::vector<SpacePointTrackCand> spacePointTCs;
581
582 std::vector<std::pair<int, int> >
583 rangeIndices; // store pairs of Indices indicating the first and the last index of a TrackStub inside a SpacePointTrackCand
584
585 int firstIndex = 0; // first 'first index' is 0
586 for (int index : splitIndices) {
587 rangeIndices.push_back({firstIndex, index});
588 firstIndex = index + 1; // next first index is last index + 1
589 }
590 rangeIndices.push_back({firstIndex, SPTrackCand.getNHits() - 1}); // the last TrackStub contains all hits from the last splitIndex to the end of the SpacePointTrackCand
591
592 // NOTE: if the first index of splitIndices is zero, this means that the direction of flight for the first SpacePoint (i.e. TrueHit) of the TrackCand was not outgoing.
593 // WARNING: This is only true as long as this behaviour is not changed in checkTrackCandForCurling(...), as there the assumption is made that the direction of flight of the first hit is outgoing, and only if it is not 0 is the first entry of the returnVector of the latter.
594 bool outgoing = splitIndices[0] != 0;
595
596 // return NTracklets (user defined) at most, or if NTracklets is 0, return all
597 // if NTracklets is 0 set it to the appropriate size for the following for-loop
598 if (NTracklets < 1) { NTracklets = rangeIndices.size(); }
599 for (unsigned iTr = 0; iTr < rangeIndices.size() && iTr < uint(NTracklets); ++iTr) {
600
601 int lastInd = rangeIndices[iTr].second;
602 int firstInd = rangeIndices[iTr].first;
603
604 B2DEBUG(21, "Creating Track Stub " << iTr << " of " << splitIndices.size() <<
605 " possible Track Stub for this SpacePointTrackCand. The indices for this Tracklet are (first,last): (" << firstInd << "," << lastInd
606 << "). This SpacePointTrackCand contains " << SPTrackCand.getNHits() << " SpacePoints in total.");
607
608 // encapsulate these functions into a try-clause since both throw
609 try {
610 const std::vector<const SpacePoint*> trackletSpacePoints = SPTrackCand.getHitsInRange(firstInd, lastInd);
611 const std::vector<double> trackletSortingParams = SPTrackCand.getSortingParametersInRange(firstInd, lastInd);
612
613 SpacePointTrackCand newSPTrackCand = SpacePointTrackCand(trackletSpacePoints, SPTrackCand.getPdgCode(), SPTrackCand.getChargeSeed(),
614 SPTrackCand.getMcTrackID());
615 newSPTrackCand.setSortingParameters(trackletSortingParams);
616
617 // TODO: set state seed and cov seed for all but the first tracklets (first is just the seed of the original TrackCand)
618 if (iTr < 1) {
619 newSPTrackCand.set6DSeed(SPTrackCand.getStateSeed());
620 newSPTrackCand.setCovSeed(SPTrackCand.getCovSeed());
621 }
622
623 // set direction of flight and flip it for the next track stub (track is split where the direction of flight changes so this SHOULD not introduce any errors)
624 newSPTrackCand.setFlightDirection(outgoing);
625 outgoing = !outgoing;
626
627 // if the TrackCandidate curls this index starts at 1, if it is a curling TrackCand
628 newSPTrackCand.setTrackStubIndex(iTr + 1);
629
630 spacePointTCs.push_back(newSPTrackCand);
631 } catch (SpacePointTrackCand::SPTCIndexOutOfBounds& anE) {
632 B2WARNING("Caught an exception while trying to split SpacePointTrackCands: " << anE.what() <<
633 " This SPTC will be skipped from splitting!");
634 }
635 }
636
637 return spacePointTCs;
638}
void setSortingParameters(const std::vector< double > &sortParams)
set the sorting parameters
void set6DSeed(const TVectorD &state6D)
set the 6D state seed
int getPdgCode() const
get pdg code
const TMatrixDSym & getCovSeed() const
get the covariance matrix seed (6D).
void setCovSeed(const TMatrixDSym &cov)
set the covariance matrix seed
int getMcTrackID() const
get the MC Track ID
const std::vector< const Belle2::SpacePoint * > getHitsInRange(int firstInd, int lastInd) const
get hits (SpacePoints) in range (indices of SpacePoint inside SpacePointTrackCand) including first in...
const std::vector< double > getSortingParametersInRange(int firstIndex, int lastIndex) const
get the sorting parameters in range (indices of SpacePoints inside SpacePointTrackCand) including fir...
double getChargeSeed() const
get charge
const TVectorD & getStateSeed() const
get state seed as 6D vector
void setFlightDirection(bool direction)
set the direction of flight (true is outgoing, false is ingoing).

◆ terminate()

void terminate ( void  )
overridevirtual

terminate: print some summary on the modules work

Reimplemented from Module.

Definition at line 322 of file CurlingTrackCandSplitterModule.cc.

323{
324 B2INFO("CurlingTrackCandSplitter::terminate(): checked " << m_spacePointTCCtr << " SpacePointTrackCands for curling behaviour. " <<
325 m_curlingTCCtr << " of them were curling and " << m_createdTrackStubsCtr << " TrackStubs were created. " << m_NoCurlingTCsCtr <<
326 " SPTCs were not curling and were merely copied into StoreArray " << m_PARAMcurlingOutFirstName << ". In " <<
327 m_noDecisionPossibleCtr << " cases no decision could be made. There were " << m_NoSingleTrueHitCtr <<
328 " SpacePoints that were related to more than one TrueHit");
329 // do ROOT file stuff
330 if (m_treePtr != nullptr) {
331 m_rootFilePtr->cd(); //important! without this the famework root I/O (SimpleOutput etc) could mix with the root I/O of this module
332 m_treePtr->Write();
333 m_rootFilePtr->Close();
334 }
335}

◆ writeToRoot()

void writeToRoot ( const RootVariables rootVariables)
protected

Write previously collected values to ROOT file.

Definition at line 721 of file CurlingTrackCandSplitterModule.cc.

722{
723 m_rootGlobalPosResiduals = rootVariables.PosResiduesGlobal;
724 m_rootLocalPosResiduals = rootVariables.PosResiduesLocal;
725
726 m_rootSpacePointULocals = rootVariables.SpacePointULocal;
727 m_rootSpacePointVLocals = rootVariables.SpacePointVLocal;
728
729 m_rootSpacePointXGlobals = rootVariables.SpacePointXGlobal;
730 m_rootSpacePointYGlobals = rootVariables.SpacePointYGlobal;
731 m_rootSpacePointZGlobals = rootVariables.SpacePointZGlobal;
732
733 m_rootTrueHitULocals = rootVariables.TrueHitULocal;
734 m_rootTrueHitVLocals = rootVariables.TrueHitVLocal;
735
736 m_rootTrueHitXGlobals = rootVariables.TrueHitXGlobal;
737 m_rootTrueHitYGlobals = rootVariables.TrueHitYGlobal;
738 m_rootTrueHitZGlobals = rootVariables.TrueHitZGlobal;
739
740 m_rootPosResidueXGlobal = rootVariables.PosResidueXGlobal;
741 m_rootPosResidueYGlobal = rootVariables.PosResidueYGlobal;
742 m_rootPosResidueZGlobal = rootVariables.PosResidueZGlobal;
743 m_rootPosResidueULocal = rootVariables.PosResidueULocal;
744 m_rootPosResidueVLocal = rootVariables.PosResidueVLocal;
745
746 m_rootMisMatchPosDistance = rootVariables.MisMatchPosResiduals;
747 m_rootMisMatchPosX = rootVariables.MisMatchPosX;
748 m_rootMisMatchPosY = rootVariables.MisMatchPosY;
749 m_rootMisMatchPosZ = rootVariables.MisMatchPosZ;
750
751 m_rootMisMatchPosU = rootVariables.MisMatchPosU;
752 m_rootMisMatchPosV = rootVariables.MisMatchPosV;
753
754 m_rootMisMatchMomX = rootVariables.MisMatchMomX;
755 m_rootMisMatchMomY = rootVariables.MisMatchMomY;
756 m_rootMisMatchMomZ = rootVariables.MisMatchMomZ;
757
758 m_treePtr->Fill();
759}

Member Data Documentation

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 521 of file Module.h.

◆ m_createdTrackStubsCtr

int m_createdTrackStubsCtr
protected

Counter for created TrackCand Stubs by splitting a SpacePointTrackCand.

Definition at line 168 of file CurlingTrackCandSplitterModule.h.

◆ m_curlingAllIns

StoreArray<SpacePointTrackCand> m_curlingAllIns
protected

◆ m_curlingCompletes

StoreArray<SpacePointTrackCand> m_curlingCompletes
protected

◆ m_curlingFirstOuts

StoreArray<SpacePointTrackCand> m_curlingFirstOuts
protected

◆ m_curlingRestOuts

StoreArray<SpacePointTrackCand> m_curlingRestOuts
protected

◆ m_curlingTCCtr

int m_curlingTCCtr
protected

Counter for TrackCands that show curling behaviour.

Definition at line 166 of file CurlingTrackCandSplitterModule.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 511 of file Module.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 518 of file Module.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 514 of file Module.h.

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 516 of file Module.h.

◆ m_name

std::string m_name
privateinherited

The name of the module, saved as a string (user-modifiable)

Definition at line 508 of file Module.h.

◆ m_NoCurlingTCsCtr

int m_NoCurlingTCsCtr
protected

Counter for SPTCs that were not curling and hence were added to the StoreArray of first out parts.

Definition at line 174 of file CurlingTrackCandSplitterModule.h.

◆ m_noDecisionPossibleCtr

int m_noDecisionPossibleCtr
protected

Counter for TrackCands where a decision if curling or not is not possible.

Definition at line 170 of file CurlingTrackCandSplitterModule.h.

◆ m_NoSingleTrueHitCtr

int m_NoSingleTrueHitCtr
protected

Counter for SpacePoints that relate to more than one TrueHit.

Definition at line 172 of file CurlingTrackCandSplitterModule.h.

◆ m_origin

B2Vector3D m_origin
protected

origin used internally (set from user set value)

Definition at line 162 of file CurlingTrackCandSplitterModule.h.

◆ m_package

std::string m_package
privateinherited

Package this module is found in (may be empty).

Definition at line 510 of file Module.h.

◆ m_PARAMcompleteCurlerName

std::string m_PARAMcompleteCurlerName
protected

collection name of all parts of a curling TrackCand

Definition at line 147 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMcurlingAllInName

std::string m_PARAMcurlingAllInName
protected

collection name of all ingoing parts of a curling TrackCand

Definition at line 143 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMcurlingOutFirstName

std::string m_PARAMcurlingOutFirstName
protected

collection name of the first outgoing (i.e.

coming from the interaction point) parts of a curling TrackCand

Definition at line 141 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMcurlingOutRestName

std::string m_PARAMcurlingOutRestName
protected

collection name of all but the first outgoing parts of a curling TrackCand

Definition at line 145 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMnTrackStubs

int m_PARAMnTrackStubs
protected

maximum number of TrackCand Stubs to be stored for a curling TrackCand

Definition at line 158 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMpositionAnalysis

bool m_PARAMpositionAnalysis
protected

Set to true if output to ROOT file is desired with the positions and position differences of SpacePoints and TrueHits.

Definition at line 220 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMrootFileName

std::vector<std::string> m_PARAMrootFileName
protected

two entries accepted.

First is filename, second is 'RECREATE' or 'UPDATE' (write mode)

Definition at line 222 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMsetOrigin

std::vector<double> m_PARAMsetOrigin
protected

set the origin to a specific point.

Needed for determining the direction of flight of the particle for a given hit

Definition at line 150 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMsplitCurlers

bool m_PARAMsplitCurlers
protected

indicating if the SpacePointTrackCands should only be analyzed for curling behaviour, or analyzed and split into TrackCand Stubs

Definition at line 136 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMsptcName

std::string m_PARAMsptcName
protected

collection name of the SpacePointTrackCands to be analyzed

Definition at line 138 of file CurlingTrackCandSplitterModule.h.

◆ m_PARAMuseNonSingleTHinPA

bool m_PARAMuseNonSingleTHinPA
protected

Switch for using SpacePoints in position Analysis that are related to more than one TrueHit.

NOTE: probably only here while developing

Definition at line 176 of file CurlingTrackCandSplitterModule.h.

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

The properties of the module as bitwise or (with |) of EModulePropFlags.

Definition at line 512 of file Module.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 519 of file Module.h.

◆ m_rootFilePtr

TFile* m_rootFilePtr
protected

Pointer to ROOT file.

Definition at line 223 of file CurlingTrackCandSplitterModule.h.

◆ m_rootGlobalPosResiduals

std::array<std::vector<double>, c_nPlanes> m_rootGlobalPosResiduals
protected

Global Position Residuals between TrueHits and SpacePoints (layerwise)

Definition at line 257 of file CurlingTrackCandSplitterModule.h.

◆ m_rootLocalPosResiduals

std::array<std::vector<double>, c_nPlanes> m_rootLocalPosResiduals
protected

Local Position Residuals between TrueHits and SpacePoints (layerwise)

Definition at line 255 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchMomX

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchMomX
protected

Difference of Momentum in X-Direction for TrueHits that do not match but are related from one SpacePoint (layerwise)

Definition at line 274 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchMomY

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchMomY
protected

Difference of Momentum in Y-Direction for TrueHits that do not match but are related from one SpacePoint (layerwise)

Definition at line 276 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchMomZ

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchMomZ
protected

Difference of Momentum in Z-Direction for TrueHits that do not match but are related from one SpacePoint (layerwise)

Definition at line 278 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchPosDistance

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchPosDistance
protected

Distance of TrueHits that do not match but are related from one SpacePoint (layerwise)

Definition at line 260 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchPosU

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchPosU
protected

Difference of U-positions (local) for mismatched TrueHits (layerwise)

Definition at line 269 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchPosV

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchPosV
protected

Difference of V-positions (local) for mismatched TrueHits (layerwise)

Definition at line 271 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchPosX

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchPosX
protected

Difference of X-positions (global) for mismatched TrueHits (layerwise)

Definition at line 262 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchPosY

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchPosY
protected

Difference of Y-positions (global) for mismatched TrueHits (layerwise)

Definition at line 264 of file CurlingTrackCandSplitterModule.h.

◆ m_rootMisMatchPosZ

std::array<std::vector<double>, c_nPlanes> m_rootMisMatchPosZ
protected

Difference of Z-positions (global) for mismatched TrueHits (layerwise)

Definition at line 266 of file CurlingTrackCandSplitterModule.h.

◆ m_rootPosResidueULocal

std::array<std::vector<double>, c_nPlanes> m_rootPosResidueULocal
protected

U-position (local) difference between TrueHit and SpacePoint (layerwise)

Definition at line 250 of file CurlingTrackCandSplitterModule.h.

◆ m_rootPosResidueVLocal

std::array<std::vector<double>, c_nPlanes> m_rootPosResidueVLocal
protected

V-position (local) difference between TrueHit and SpacePoint (layerwise)

Definition at line 252 of file CurlingTrackCandSplitterModule.h.

◆ m_rootPosResidueXGlobal

std::array<std::vector<double>, c_nPlanes> m_rootPosResidueXGlobal
protected

X-position (global) difference between TrueHit and SpacePoint (layerwise)

Definition at line 243 of file CurlingTrackCandSplitterModule.h.

◆ m_rootPosResidueYGlobal

std::array<std::vector<double>, c_nPlanes> m_rootPosResidueYGlobal
protected

Y-position (global) difference between TrueHit and SpacePoint (layerwise)

Definition at line 245 of file CurlingTrackCandSplitterModule.h.

◆ m_rootPosResidueZGlobal

std::array<std::vector<double>, c_nPlanes> m_rootPosResidueZGlobal
protected

Z-position (global) difference between TrueHit and SpacePoint (layerwise)

Definition at line 247 of file CurlingTrackCandSplitterModule.h.

◆ m_rootSpacePointULocals

std::array<std::vector<double>, c_nPlanes> m_rootSpacePointULocals
protected

Local U-Positions of SpacePoints (layerwise)

Definition at line 230 of file CurlingTrackCandSplitterModule.h.

◆ m_rootSpacePointVLocals

std::array<std::vector<double>, c_nPlanes> m_rootSpacePointVLocals
protected

Local V-Positions of SpacePoints (layerwise)

Definition at line 231 of file CurlingTrackCandSplitterModule.h.

◆ m_rootSpacePointXGlobals

std::array<std::vector<double>, c_nPlanes> m_rootSpacePointXGlobals
protected

Global X-Positions of SpacePoints (layerwise)

Definition at line 226 of file CurlingTrackCandSplitterModule.h.

◆ m_rootSpacePointYGlobals

std::array<std::vector<double>, c_nPlanes> m_rootSpacePointYGlobals
protected

Global Y-Positions of SpacePoints (layerwise)

Definition at line 227 of file CurlingTrackCandSplitterModule.h.

◆ m_rootSpacePointZGlobals

std::array<std::vector<double>, c_nPlanes> m_rootSpacePointZGlobals
protected

Global Z-Positions of SpacePoints (layerwise)

Definition at line 228 of file CurlingTrackCandSplitterModule.h.

◆ m_rootTrueHitULocals

std::array<std::vector<double>, c_nPlanes> m_rootTrueHitULocals
protected

Local X-Positions of TrueHits (layerwise)

Definition at line 238 of file CurlingTrackCandSplitterModule.h.

◆ m_rootTrueHitVLocals

std::array<std::vector<double>, c_nPlanes> m_rootTrueHitVLocals
protected

Local Y-Positions of TrueHits (layerwise)

Definition at line 239 of file CurlingTrackCandSplitterModule.h.

◆ m_rootTrueHitXGlobals

std::array<std::vector<double>, c_nPlanes> m_rootTrueHitXGlobals
protected

Global U-Positions of TrueHits (layerwise)

Definition at line 234 of file CurlingTrackCandSplitterModule.h.

◆ m_rootTrueHitYGlobals

std::array<std::vector<double>, c_nPlanes> m_rootTrueHitYGlobals
protected

Global V-Positions of TrueHits (layerwise)

Definition at line 235 of file CurlingTrackCandSplitterModule.h.

◆ m_rootTrueHitZGlobals

std::array<std::vector<double>, c_nPlanes> m_rootTrueHitZGlobals
protected

Global Z-Positions of TrueHits (layerwise)

Definition at line 236 of file CurlingTrackCandSplitterModule.h.

◆ m_saveCompleteCurler

bool m_saveCompleteCurler
protected

set to true if all parts of a curling TrackCand should be stored in a separate StoreArray (no parameter!)

Definition at line 160 of file CurlingTrackCandSplitterModule.h.

◆ m_spacePointTCCtr

int m_spacePointTCCtr
protected

Counter for presented SpacePointTrackCands.

Definition at line 164 of file CurlingTrackCandSplitterModule.h.

◆ m_spacePointTCs

StoreArray<SpacePointTrackCand> m_spacePointTCs
protected

◆ m_treePtr

TTree* m_treePtr
protected

Pointer to ROOT tree.

Definition at line 224 of file CurlingTrackCandSplitterModule.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 509 of file Module.h.


The documentation for this class was generated from the following files: