Belle II Software development
TagVertexModule Class Reference

Tag side Vertex Fitter module for modular analysis. More...

#include <TagVertexModule.h>

Inheritance diagram for TagVertexModule:
Module PathElement

Public Types

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

 TagVertexModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module.
 
virtual void beginRun () override
 Called when entering a new run.
 
virtual void event () override
 Event processor.
 
const BeamSpotgetBeamSpot () const
 returns the BeamSpot object
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
virtual void endRun ()
 This method is called if the current run ends.
 
virtual void terminate ()
 This method is called at the end of the event processing.
 
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

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.
 

Private Member Functions

bool doVertexFit (const Particle *Breco)
 central method for the tag side vertex fit
 
ParticledoVertexFitForBTube (const Particle *mother, std::string fitType) const
 it returns an intersection between B rec and beam spot (= origin of BTube)
 
std::pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraint (const Particle *Breco, double cut) const
 calculate the constraint for the vertex fit on the tag side using Breco information
 
std::pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraintBoost (double cut) const
 calculate the standard constraint for the vertex fit on the tag side
 
std::pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraintBTube (const Particle *Breco, double cut)
 calculate constraint for the vertex fit on the tag side using the B tube (cylinder along the expected BTag line of flights
 
void BtagMCVertex (const Particle *Breco)
 get the vertex of the MC B particle associated to Btag.
 
std::vector< const Particle * > getTagTracks_standardAlgorithm (const Particle *Breco, int nPXDHits) const
 performs the fit using the standard algorithm - using all tracks in RoE The user can specify a request on the PXD hits left by the tracks
 
analysis::VertexFitKFit doSingleKfit (std::vector< ParticleAndWeight > &particleAndWeights)
 performs single KFit on particles stored in particleAndWeights this function can be iterated several times until chi2/ndf of the resulting fit is sufficient
 
std::vector< ParticleAndWeightgetParticlesAndWeights (const std::vector< const Particle * > &tagParticles) const
 Get a list of particles with attached weight and associated MC particle.
 
bool makeGeneralFit ()
 TO DO: tag side vertex fit in the case of semileptonic tag side decay.
 
bool makeGeneralFitRave ()
 make the vertex fit on the tag side: RAVE AVF tracks coming from Ks removed all other tracks used
 
void fillParticles (std::vector< ParticleAndWeight > &particleAndWeights)
 Fill sorted list of particles into external variable.
 
void fillTagVinfo (const ROOT::Math::XYZVector &tagVpos, const TMatrixDSym &tagVposErr)
 Fill tagV vertex info.
 
bool makeGeneralFitKFit ()
 make the vertex fit on the tag side: KFit tracks coming from Ks removed all other tracks used
 
void deltaT (const Particle *Breco)
 calculate DeltaT and MC-DeltaT (rec - tag) in ps from Breco and Btag vertices DT = Dl / gamma beta c , l = boost direction
 
void resetReturnParams ()
 Reset all parameters that are computed in each event and then used to compute tuple variables.
 
TrackFitResult getTrackWithTrueCoordinates (ParticleAndWeight const &paw) const
 If the fit has to be done with the truth info, Rave is fed with a track where the momentum is replaced by the true momentum and the position replaced by the point on the true particle trajectory closest to the measured track position The function below takes care of that.
 
TrackFitResult getTrackWithRollBackCoordinates (ParticleAndWeight const &paw)
 If the fit has to be done with the rolled back tracks, Rave or KFit is fed with a track where the position of track is shifted by the vector difference of mother B and production point of track from truth info The function below takes care of that.
 
ROOT::Math::XYZVector getRollBackPoca (ParticleAndWeight const &paw)
 This shifts the position of tracks by the vector difference of mother B and production point of track from truth info.
 
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.
 

Static Private Member Functions

static bool compBrecoBgen (const Particle *Breco, const MCParticle *Bgen)
 compare Breco with the two MC B particles
 
static std::string printVector (const ROOT::Math::XYZVector &vec)
 Print a XYZVector (useful for debugging)
 
static std::string printMatrix (const TMatrixD &mat)
 Print a TMatrix (useful for debugging)
 
static std::string printMatrix (const TMatrixDSym &mat)
 Print a TMatrixFSym (useful for debugging)
 
static ROOT::Math::XYZVector getTruePoca (ParticleAndWeight const &paw)
 This finds the point on the true particle trajectory closest to the measured track position.
 

Private Attributes

StoreArray< TagVertexm_verArray
 StoreArray of TagVertexes.
 
StoreArray< MCParticlem_mcParticles
 StoreArray of MCParticles.
 
StoreObjPtr< ParticleListm_plist
 input particle list
 
std::string m_listName
 Breco particle list name.
 
double m_confidenceLevel
 required fit confidence level
 
std::string m_useMCassociation
 No MC association or standard Breco particle or internal MCparticle association.
 
std::string m_constraintType
 Choose constraint: noConstraint, IP, tube, boost, (breco)
 
std::string m_trackFindingType
 Choose how to find the tag tracks: standard, standard_PXD.
 
int m_reqPXDHits
 N of PXD hits for a track to be used.
 
std::string m_roeMaskName
 ROE particles from this mask will be used for vertex fitting.
 
double m_Bfield
 magnetic field from data base
 
std::vector< const Particle * > m_tagParticles
 tracks of the rest of the event
 
std::vector< const Particle * > m_raveParticles
 tracks given to rave for the track fit (after removing Kshorts
 
std::vector< double > m_raveWeights
 Store the weights used by Rave in the vtx fit so that they can be accessed later.
 
std::vector< const MCParticle * > m_raveMCParticles
 Store the MC particles corresponding to each track used by Rave in the vtx fit.
 
bool m_useTruthInFit
 Set to true if the tag fit is to be made with the TRUE tag track momentum and position.
 
int m_fitTruthStatus
 Store info about whether the fit was performed with the truth info 0 fit performed with measured parameters 1 fit performed with true parameters 2 unable to recover truth parameters.
 
bool m_useRollBack
 Set to true if the tag fit is to be made with the tag track position rolled back to mother B.
 
int m_rollbackStatus
 Store info about whether the fit was performed with the rolled back tracks 0 fit performed with measured parameters 1 fit performed with rolled back parameters 2 unable to recover truth parameters.
 
double m_fitPval
 P value of the tag side fit result.
 
ROOT::Math::XYZVector m_tagV
 tag side fit result
 
TMatrixDSym m_tagVErrMatrix
 Error matrix of the tag side fit result.
 
ROOT::Math::XYZVector m_mcTagV
 generated tag side vertex
 
double m_mcTagLifeTime
 generated tag side life time of B-decay
 
int m_mcPDG
 generated tag side B flavor
 
ROOT::Math::XYZVector m_mcVertReco
 generated Breco decay vertex
 
double m_mcLifeTimeReco
 generated Breco life time
 
double m_deltaT
 reconstructed DeltaT
 
double m_deltaTErr
 reconstructed DeltaT error
 
double m_mcDeltaTau
 generated DeltaT
 
double m_mcDeltaT
 generated DeltaT with boost-direction approximation
 
TMatrixDSym m_constraintCov
 constraint to be used in the tag vertex fit
 
ROOT::Math::XYZVector m_constraintCenter
 centre position of the constraint for the tag Vertex fit
 
ROOT::Math::XYZVector m_BeamSpotCenter
 Beam spot position.
 
TMatrixDSym m_BeamSpotCov
 size of the beam spot == covariance matrix on the beam spot position
 
bool m_mcInfo
 true if user wants to retrieve MC information out from the tracks used in the fit
 
DBObjPtr< BeamSpotm_beamSpotDB
 Beam spot database object.
 
int m_FitType
 fit algo used
 
double m_tagVl
 tagV component in the boost direction
 
double m_truthTagVl
 MC tagV component in the boost direction.
 
double m_tagVlErr
 Error of the tagV component in the boost direction.
 
double m_tagVol
 tagV component in the direction orthogonal to the boost
 
double m_truthTagVol
 MC tagV component in the direction orthogonal to the boost.
 
double m_tagVolErr
 Error of the tagV component in the direction orthogonal to the boost.
 
double m_tagVNDF
 Number of degrees of freedom in the tag vertex fit.
 
double m_tagVChi2
 chi^2 value of the tag vertex fit result
 
double m_tagVChi2IP
 IP component of the chi^2 of the tag vertex fit result.
 
std::string m_fitAlgo
 Algorithm used for the tag fit (Rave or KFit)
 
double m_kFitReqReducedChi2
 The required chi2/ndf to accept the kFit result, if it is higher, iteration procedure is applied.
 
bool m_verbose
 choose if you want to print extra infos
 
TMatrixDSym m_pvCov
 covariance matrix of the PV (useful with tube and KFit)
 
ROOT::Math::PxPyPzEVector m_tagMomentum
 B tag momentum computed from fully reconstructed B sig.
 
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

Tag side Vertex Fitter module for modular analysis.

This module fits the Btag Vertex *

Definition at line 49 of file TagVertexModule.h.

Member Typedef Documentation

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.h.

Member Enumeration Documentation

◆ 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,
80 c_ParallelProcessingCertified = 4,
81 c_HistogramManager = 8,
82 c_InternalSerializer = 16,
83 c_TerminateInAllProcesses = 32,
84 c_DontCollectStatistics = 64,
85 };
@ c_Output
Output Process.
Definition ProcHelper.h:19
@ c_Input
Input Process.
Definition ProcHelper.h:17

Constructor & Destructor Documentation

◆ TagVertexModule()

Constructor.

Definition at line 85 of file TagVertexModule.cc.

85 : Module(),
88 m_FitType(0), m_tagVl(0),
91 m_verbose(true)
92{
93 // Set module properties
94 setDescription("Tag side Vertex Fitter for modular analysis");
96
97 // Parameter definitions
98 addParam("listName", m_listName, "name of particle list", string(""));
99 addParam("confidenceLevel", m_confidenceLevel,
100 "required confidence level of fit to keep particles in the list. Note that even with confidenceLevel == 0.0, errors during the fit might discard Particles in the list. confidenceLevel = -1 if an error occurs during the fit",
101 0.001);
102 addParam("MCAssociation", m_useMCassociation,
103 "'': no MC association. breco: use standard Breco MC association. internal: use internal MC association", string("breco"));
104 addParam("constraintType", m_constraintType,
105 "Choose the type of the constraint: noConstraint, IP (tag tracks constrained to be within the beam spot), tube (long tube along the BTag line of flight, only for fully reconstruced B rec), boost (long tube along the Upsilon(4S) boost direction), (breco)",
106 string("tube"));
107 addParam("trackFindingType", m_trackFindingType,
108 "Choose how to reconstruct the tracks on the tag side: standard, standard_PXD",
109 string("standard_PXD"));
110 addParam("maskName", m_roeMaskName,
111 "Choose ROE mask to get particles from ", string(RestOfEvent::c_defaultMaskName));
112 addParam("askMCInformation", m_mcInfo,
113 "TRUE when requesting MC Information from the tracks performing the vertex fit", false);
114 addParam("reqPXDHits", m_reqPXDHits,
115 "Minimum number of PXD hits for a track to be used in the vertex fit", 0);
116 addParam("fitAlgorithm", m_fitAlgo,
117 "Fitter used for the tag vertex fit: Rave or KFit", string("KFit"));
118 addParam("kFitReqReducedChi2", m_kFitReqReducedChi2,
119 "The required chi2/ndf to accept the kFit result, if it is higher, iteration procedure is applied", 5.0);
120 addParam("useTruthInFit", m_useTruthInFit,
121 "Use the true track parameters in the vertex fit", false);
122 addParam("useRollBack", m_useRollBack,
123 "Use rolled back non-primary tracks", false);
124}
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition Module.cc:208
Module()
Constructor.
Definition Module.cc:30
@ 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
static constexpr const char * c_defaultMaskName
Default mask name.
Definition RestOfEvent.h:58
int m_fitTruthStatus
Store info about whether the fit was performed with the truth info 0 fit performed with measured para...
double m_truthTagVol
MC tagV component in the direction orthogonal to the boost.
double m_tagVl
tagV component in the boost direction
double m_truthTagVl
MC tagV component in the boost direction.
bool m_useTruthInFit
Set to true if the tag fit is to be made with the TRUE tag track momentum and position.
double m_mcDeltaT
generated DeltaT with boost-direction approximation
std::string m_listName
Breco particle list name.
bool m_useRollBack
Set to true if the tag fit is to be made with the tag track position rolled back to mother B.
double m_tagVlErr
Error of the tagV component in the boost direction.
std::string m_roeMaskName
ROE particles from this mask will be used for vertex fitting.
double m_tagVChi2
chi^2 value of the tag vertex fit result
bool m_mcInfo
true if user wants to retrieve MC information out from the tracks used in the fit
double m_kFitReqReducedChi2
The required chi2/ndf to accept the kFit result, if it is higher, iteration procedure is applied.
std::string m_useMCassociation
No MC association or standard Breco particle or internal MCparticle association.
double m_tagVolErr
Error of the tagV component in the direction orthogonal to the boost.
double m_mcTagLifeTime
generated tag side life time of B-decay
double m_tagVNDF
Number of degrees of freedom in the tag vertex fit.
double m_deltaTErr
reconstructed DeltaT error
std::string m_fitAlgo
Algorithm used for the tag fit (Rave or KFit)
double m_mcDeltaTau
generated DeltaT
double m_fitPval
P value of the tag side fit result.
int m_reqPXDHits
N of PXD hits for a track to be used.
double m_confidenceLevel
required fit confidence level
double m_tagVChi2IP
IP component of the chi^2 of the tag vertex fit result.
double m_tagVol
tagV component in the direction orthogonal to the boost
std::string m_constraintType
Choose constraint: noConstraint, IP, tube, boost, (breco)
double m_mcLifeTimeReco
generated Breco life time
double m_Bfield
magnetic field from data base
int m_mcPDG
generated tag side B flavor
int m_rollbackStatus
Store info about whether the fit was performed with the rolled back tracks 0 fit performed with measu...
std::string m_trackFindingType
Choose how to find the tag tracks: standard, standard_PXD.
bool m_verbose
choose if you want to print extra infos
int m_FitType
fit algo used
double m_deltaT
reconstructed DeltaT
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:559

Member Function Documentation

◆ beginRun()

void beginRun ( void )
overridevirtual

Called when entering a new run.

Set run dependent things

Reimplemented from Module.

Definition at line 154 of file TagVertexModule.cc.

155{
156 //TODO: set magnetic field for each run
157 //m_Bfield = BFieldMap::Instance().getBField(m_BeamSpotCenter).Z();
158}

◆ BtagMCVertex()

void BtagMCVertex ( const Particle * Breco)
private

get the vertex of the MC B particle associated to Btag.

It works only with signal MC

Definition at line 531 of file TagVertexModule.cc.

532{
533 //fill vector with mcB (intended order: Reco, Tag)
534 vector<const MCParticle*> mcBs;
535 for (const MCParticle& mc : m_mcParticles) {
536 if (abs(mc.getPDG()) == abs(Breco->getPDGCode()))
537 mcBs.push_back(&mc);
538 }
539 //too few Bs
540 if (mcBs.size() < 2) return;
541
542 if (mcBs.size() > 2) {
543 B2WARNING("TagVertexModule:: Too many Bs found in MC");
544 }
545
546 auto isReco = [&](const MCParticle * mc) {
547 return (m_useMCassociation == "breco") ? (mc == Breco->getRelated<MCParticle>())
548 : compBrecoBgen(Breco, mc); //internal association
549 };
550
551 //nothing matched?
552 if (!isReco(mcBs[0]) && !isReco(mcBs[1])) {
553 return;
554 }
555
556 //first is Tag, second Reco -> swap the order
557 if (!isReco(mcBs[0]) && isReco(mcBs[1]))
558 swap(mcBs[0], mcBs[1]);
559
560 //both matched -> use closest vertex dist as Reco
561 if (isReco(mcBs[0]) && isReco(mcBs[1])) {
562 double dist0 = (mcBs[0]->getDecayVertex() - Breco->getVertex()).Mag2();
563 double dist1 = (mcBs[1]->getDecayVertex() - Breco->getVertex()).Mag2();
564 if (dist0 > dist1)
565 swap(mcBs[0], mcBs[1]);
566 }
567
568 m_mcVertReco = mcBs[0]->getDecayVertex();
569 m_mcLifeTimeReco = getProperLifeTime(mcBs[0]);
570 m_mcTagV = mcBs[1]->getDecayVertex();
571 m_mcTagLifeTime = getProperLifeTime(mcBs[1]);
572 m_mcPDG = mcBs[1]->getPDG();
573}
ROOT::Math::XYZVector getVertex() const
Returns vertex position (POCA for charged, IP for neutral FS particles)
Definition Particle.h:651
int getPDGCode(void) const
Returns PDG code.
Definition Particle.h:465
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
ROOT::Math::XYZVector m_mcVertReco
generated Breco decay vertex
StoreArray< MCParticle > m_mcParticles
StoreArray of MCParticles.
static bool compBrecoBgen(const Particle *Breco, const MCParticle *Bgen)
compare Breco with the two MC B particles
ROOT::Math::XYZVector m_mcTagV
generated tag side vertex

◆ 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{
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.
void setParameters(const ModuleParamList &params)
Set values for parameters from other parameter list.
const ModuleParamList & getParamList() const
Return module param list.
Definition Module.h:362
const std::string & getName() const
Returns the name of the module.
Definition Module.h:186
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:511
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition Module.h:515
void setName(const std::string &name)
Set the name of the module.
Definition Module.h:213
LogConfig m_logConfig
The log system configuration of the module.
Definition Module.h:513
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition Module.h:520
std::string m_package
Package this module is found in (may be empty).
Definition Module.h:509
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition Module.h:43

◆ compBrecoBgen()

bool compBrecoBgen ( const Particle * Breco,
const MCParticle * Bgen )
staticprivate

compare Breco with the two MC B particles

Definition at line 576 of file TagVertexModule.cc.

577{
578
579 bool isDecMode = true;
580
581 const std::vector<Particle*> recDau = Breco->getDaughters();
582 const std::vector<MCParticle*> genDau = Bgen->getDaughters();
583
584 if (recDau.size() > 0 && genDau.size() > 0) {
585 for (auto dauRec : recDau) {
586 bool isDau = false;
587 for (auto dauGen : genDau) {
588 if (dauGen->getPDG() == dauRec->getPDGCode())
589 isDau = compBrecoBgen(dauRec, dauGen) ;
590 }
591 if (!isDau) isDecMode = false;
592 }
593 } else {
594 if (recDau.size() == 0) { //&& genDau.size()==0){
595 if (Bgen->getPDG() != Breco->getPDGCode()) isDecMode = false;;
596 } else {isDecMode = false;}
597 }
598
599 return isDecMode;
600}
std::vector< Belle2::MCParticle * > getDaughters() const
Get vector of all daughter particles, empty vector if none.
Definition MCParticle.cc:52
int getPDG() const
Return PDG code of particle.
Definition MCParticle.h:101
std::vector< Particle * > getDaughters() const
Returns a vector of pointers to daughter particles.
Definition Particle.cc:668

◆ 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 425 of file Module.h.

425{ beginRun(); }

◆ 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 438 of file Module.h.

438{ endRun(); }

◆ 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 431 of file Module.h.

431{ event(); }

◆ 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 419 of file Module.h.

419{ initialize(); }

◆ 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 444 of file Module.h.

444{ terminate(); }

◆ deltaT()

void deltaT ( const Particle * Breco)
private

calculate DeltaT and MC-DeltaT (rec - tag) in ps from Breco and Btag vertices DT = Dl / gamma beta c , l = boost direction

Definition at line 891 of file TagVertexModule.cc.

892{
893
894 ROOT::Math::XYZVector boost = PCmsLabTransform().getBoostVector();
895 ROOT::Math::XYZVector boostDir = boost.Unit();
896 double bg = boost.R() / sqrt(1 - boost.Mag2());
897 double c = Const::speedOfLight / 1000.; // cm ps-1
898
899 //Reconstructed DeltaL & DeltaT in the boost direction
900 ROOT::Math::XYZVector dVert = Breco->getVertex() - m_tagV; //reconstructed vtxReco - vtxTag
901 double dl = dVert.Dot(boostDir);
902 m_deltaT = dl / (bg * c);
903
904 //Truth DeltaL & approx DeltaT in the boost direction
905 ROOT::Math::XYZVector MCdVert = m_mcVertReco - m_mcTagV; //truth vtxReco - vtxTag
906 double MCdl = MCdVert.Dot(boostDir);
907 m_mcDeltaT = MCdl / (bg * c);
908
909 // MCdeltaTau=tauRec-tauTag
911 if (m_mcLifeTimeReco == -1 || m_mcTagLifeTime == -1)
913
914 TVectorD bVec = toVec(boostDir);
915
916 //TagVertex error in boost dir
917 m_tagVlErr = sqrt(m_tagVErrMatrix.Similarity(bVec));
918
919 //bReco error in boost dir
920 double bRecoErrL = sqrt(Breco->getVertexErrorMatrix().Similarity(bVec));
921
922 //Delta t error
923 m_deltaTErr = hypot(m_tagVlErr, bRecoErrL) / (bg * c);
924
925 m_tagVl = m_tagV.Dot(boostDir);
926 m_truthTagVl = m_mcTagV.Dot(boostDir);
927
928 // calculate tagV component and error in the direction orthogonal to the boost
929 ROOT::Math::XYZVector oboost = getUnitOrthogonal(boostDir);
930 TVectorD oVec = toVec(oboost);
931
932 //TagVertex error in boost-orthogonal dir
933 m_tagVolErr = sqrt(m_tagVErrMatrix.Similarity(oVec));
934
935 m_tagVol = m_tagV.Dot(oboost);
936 m_truthTagVol = m_mcTagV.Dot(oboost);
937}
static const double speedOfLight
[cm/ns]
Definition Const.h:695
TMatrixFSym getVertexErrorMatrix() const
Returns the 3x3 position error sub-matrix.
Definition Particle.cc:478
ROOT::Math::XYZVector m_tagV
tag side fit result
TMatrixDSym m_tagVErrMatrix
Error matrix of the tag side fit result.
static const double realNaN
This collects the B-meson properties in the hadronic B-decays It is used for the Ecms calibration in ...
double sqrt(double a)
sqrt for double
Definition beamHelpers.h:28

◆ doSingleKfit()

analysis::VertexFitKFit doSingleKfit ( std::vector< ParticleAndWeight > & particleAndWeights)
private

performs single KFit on particles stored in particleAndWeights this function can be iterated several times until chi2/ndf of the resulting fit is sufficient

Definition at line 754 of file TagVertexModule.cc.

755{
756 //initialize KFit
757 analysis::VertexFitKFit kFit;
758 kFit.setMagneticField(m_Bfield);
759
760 // apply constraint
761 if (m_constraintType != "noConstraint") {
762 if (m_constraintType == "tube") {
763 CLHEP::HepSymMatrix err(7, 0);
764 //copy m_pvCov to the end of err matrix
765 err.sub(5, ROOTToCLHEP::getHepSymMatrix(m_pvCov));
766 kFit.setIpTubeProfile(
767 ROOTToCLHEP::getHepLorentzVector(m_tagMomentum),
768 ROOTToCLHEP::getPoint3D(m_constraintCenter),
769 err,
770 0.);
771 } else {
772 kFit.setIpProfile(ROOTToCLHEP::getPoint3D(m_constraintCenter),
773 ROOTToCLHEP::getHepSymMatrix(m_constraintCov));
774 }
775 }
776
777
778 for (auto& pawi : particleAndWeights) {
779 int addedOK = 1;
780 if (m_useTruthInFit) {
781 if (pawi.mcParticle) {
782 addedOK = kFit.addTrack(
783 ROOTToCLHEP::getHepLorentzVector(pawi.mcParticle->get4Vector()),
784 ROOTToCLHEP::getPoint3D(getTruePoca(pawi)),
785 ROOTToCLHEP::getHepSymMatrix(pawi.particle->getMomentumVertexErrorMatrix()),
786 pawi.particle->getCharge());
787 } else {
789 }
790 } else if (m_useRollBack) {
791 if (pawi.mcParticle) {
792 addedOK = kFit.addTrack(
793 ROOTToCLHEP::getHepLorentzVector(pawi.mcParticle->get4Vector()),
794 ROOTToCLHEP::getPoint3D(getRollBackPoca(pawi)),
795 ROOTToCLHEP::getHepSymMatrix(pawi.particle->getMomentumVertexErrorMatrix()),
796 pawi.particle->getCharge());
797 } else {
799 }
800 } else {
801 addedOK = kFit.addParticle(pawi.particle);
802 }
803
804 if (addedOK == 0) {
805 pawi.weight = 1.;
806 } else {
807 B2WARNING("TagVertexModule::makeGeneralFitKFit: failed to add a track");
808 pawi.weight = 0.;
809 }
810 }
811
812
813 int nTracksAdded = kFit.getTrackCount();
814
815 //perform fit if there are enough tracks
816 if ((nTracksAdded < 2 && m_constraintType == "noConstraint") || nTracksAdded < 1)
817 return analysis::VertexFitKFit();
818
819 int isGoodFit = kFit.doFit();
820 if (isGoodFit != 0) return analysis::VertexFitKFit();
821
822 return kFit;
823}
TMatrixDSym m_constraintCov
constraint to be used in the tag vertex fit
TMatrixDSym m_pvCov
covariance matrix of the PV (useful with tube and KFit)
static ROOT::Math::XYZVector getTruePoca(ParticleAndWeight const &paw)
This finds the point on the true particle trajectory closest to the measured track position.
ROOT::Math::XYZVector m_constraintCenter
centre position of the constraint for the tag Vertex fit
ROOT::Math::XYZVector getRollBackPoca(ParticleAndWeight const &paw)
This shifts the position of tracks by the vector difference of mother B and production point of track...
ROOT::Math::PxPyPzEVector m_tagMomentum
B tag momentum computed from fully reconstructed B sig.

◆ doVertexFit()

bool doVertexFit ( const Particle * Breco)
private

central method for the tag side vertex fit

Definition at line 256 of file TagVertexModule.cc.

257{
258 //reset the fit truth status in case it was set to 2 in a previous fit
259
261
262 //reset the roll back status in case it was set to 2 in a previous fit
263
265
266 //set constraint type, reset pVal and B field
267
268 m_fitPval = 1;
269
270 if (!(Breco->getRelatedTo<RestOfEvent>())) {
271 m_FitType = -1;
272 return false;
273 }
274
275 if (m_Bfield == 0) {
276 B2ERROR("TagVertex: No magnetic field");
277 return false;
278 }
279
280 // recover beam spot info
281
282 m_BeamSpotCenter = m_beamSpotDB->getIPPosition();
283 m_BeamSpotCov.ResizeTo(3, 3);
284 m_BeamSpotCov = m_beamSpotDB->getCovVertex();
285
286 //make the beam spot bigger for the standard constraint
287
288 double beta = PCmsLabTransform().getBoostVector().R();
289 double bg = beta / sqrt(1 - beta * beta);
290
291 //TODO: What's the origin of these numbers?
292 double tauB = 1.519; //B0 lifetime in ps
293 double c = Const::speedOfLight / 1000.; // cm ps-1
294 double lB0 = tauB * bg * c;
295
296 //tube length here set to 20 * 2 * c tau beta gamma ~= 0.5 cm, should be enough to not bias the decay
297 //time but should still help getting rid of some pions from kshorts
298 m_constraintCov.ResizeTo(3, 3);
300 else if (m_constraintType == "tube") tie(m_constraintCenter, m_constraintCov) = findConstraintBTube(Breco, 200 * lB0);
301 else if (m_constraintType == "boost") tie(m_constraintCenter, m_constraintCov) = findConstraintBoost(200 * lB0);
302 else if (m_constraintType == "breco") tie(m_constraintCenter, m_constraintCov) = findConstraint(Breco, 200 * lB0);
303 else if (m_constraintType == "noConstraint") m_constraintCenter = ROOT::Math::XYZVector(); //zero vector
304 else {
305 B2ERROR("TagVertex: Invalid constraintType selected");
306 return false;
307 }
308
309 if (m_constraintCenter == vecNaN) {
310 B2ERROR("TagVertex: No correct fit constraint");
311 return false;
312 }
313
314 /* Depending on the user's choice, one of the possible algorithms is chosen for the fit. In case the algorithm does not converge, in order to assure
315 high efficiency, the next algorithm less restrictive is used. I.e, if standard_PXD does not work, the program tries with standard.
316 */
317
318 m_FitType = 0;
319 double minPVal = (m_fitAlgo != "KFit") ? 0.001 : 0.;
320 bool ok = false;
321
322 if (m_trackFindingType == "standard_PXD") {
324 if (m_tagParticles.size() > 0) {
325 ok = makeGeneralFit();
326 m_FitType = 3;
327 }
328 }
329
330 if (ok == false || m_fitPval < minPVal || m_trackFindingType == "standard") {
332 ok = m_tagParticles.size() > 0;
333 if (ok) {
334 ok = makeGeneralFit();
335 m_FitType = 4;
336 }
337 }
338
339 if ((ok == false || (m_fitPval <= 0. && m_fitAlgo == "Rave")) && m_constraintType != "noConstraint") {
341 ok = (m_constraintCenter != vecNaN);
342 if (ok) {
344 ok = (m_tagParticles.size() > 0);
345 }
346 if (ok) {
347 ok = makeGeneralFit();
348 m_FitType = 5;
349 }
350 }
351
352 return ok;
353}
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
std::vector< const Particle * > m_tagParticles
tracks of the rest of the event
std::vector< const Particle * > getTagTracks_standardAlgorithm(const Particle *Breco, int nPXDHits) const
performs the fit using the standard algorithm - using all tracks in RoE The user can specify a reques...
std::pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraintBoost(double cut) const
calculate the standard constraint for the vertex fit on the tag side
std::pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraintBTube(const Particle *Breco, double cut)
calculate constraint for the vertex fit on the tag side using the B tube (cylinder along the expected...
std::pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraint(const Particle *Breco, double cut) const
calculate the constraint for the vertex fit on the tag side using Breco information
ROOT::Math::XYZVector m_BeamSpotCenter
Beam spot position.
bool makeGeneralFit()
TO DO: tag side vertex fit in the case of semileptonic tag side decay.
DBObjPtr< BeamSpot > m_beamSpotDB
Beam spot database object.
TMatrixDSym m_BeamSpotCov
size of the beam spot == covariance matrix on the beam spot position

◆ doVertexFitForBTube()

Particle * doVertexFitForBTube ( const Particle * mother,
std::string fitType ) const
private

it returns an intersection between B rec and beam spot (= origin of BTube)

Definition at line 939 of file TagVertexModule.cc.

940{
941 //make a copy of motherIn to not modify the original object
942 Particle* mother = ParticleCopy::copyParticle(motherIn);
943
944 //Here rave is used to find the upsilon(4S) vtx as the intersection
945 //between the mother B trajectory and the beam spot
947
948 analysis::RaveVertexFitter rsg;
949 rsg.addTrack(mother);
950 int nvert = rsg.fit(fitType);
951 if (nvert != 1) {
952 mother->setPValue(-1); //error
953 return mother;
954 } else {
955 rsg.updateDaughters();
956 return mother;
957 }
958}
void setPValue(double pValue)
Sets chi^2 probability of fit.
Definition Particle.h:377
static RaveSetup * getInstance()
get the pointer to the instance to get/set any of options stored in RaveSetup
Definition RaveSetup.h:40
void setBeamSpot(const ROOT::Math::XYZVector &beamSpot, const TMatrixDSym &beamSpotCov)
The beam spot position and covariance is known you can set it here so that and a vertex in the beam s...
Definition RaveSetup.cc:74
int fit(std::string options="default")
do the vertex fit with all tracks previously added with the addTrack or addMother function.
void addTrack(const Particle *const aParticlePtr)
add a track (in the format of a Particle) to set of tracks that should be fitted to a vertex
void updateDaughters()
update the Daughters particles
Particle * copyParticle(const Particle *original)
Function takes argument Particle and creates a copy of it and copies of all its (grand-)^n-daughters.

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

Definition at line 165 of file Module.h.

165{};

◆ 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:518
bool m_hasReturnValue
True, if the return value is set.
Definition Module.h:517

◆ event()

void event ( void )
overridevirtual

Event processor.

Reimplemented from Module.

Definition at line 160 of file TagVertexModule.cc.

161{
162 if (!m_plist) {
163 B2ERROR("TagVertexModule: ParticleList " << m_listName << " not found");
164 return;
165 }
166
167 // output
169
170 std::vector<unsigned int> toRemove;
171
172 for (unsigned i = 0; i < m_plist->getListSize(); ++i) {
174
175 Particle* particle = m_plist->getParticle(i);
176 if (m_useMCassociation == "breco" || m_useMCassociation == "internal") BtagMCVertex(particle);
177 bool ok = doVertexFit(particle);
178 if (ok) deltaT(particle);
179
182 toRemove.push_back(particle->getArrayIndex());
183 } else {
184 // save information in the Vertex StoreArray
185 TagVertex* ver = m_verArray.appendNew();
186 // create relation: Particle <-> Vertex
187 particle->addRelationTo(ver);
188 // fill Vertex with content
189 if (ok) {
190 ver->setTagVertex(m_tagV);
193 ver->setDeltaT(m_deltaT);
199 ver->setFitType(m_FitType);
200 ver->setNTracks(m_tagParticles.size());
201 ver->setTagVl(m_tagVl);
204 ver->setTagVol(m_tagVol);
207 ver->setTagVNDF(m_tagVNDF);
218 } else {
219 ver->setTagVertex(m_tagV);
220 ver->setTagVertexPval(-1.);
221 ver->setDeltaT(m_deltaT);
224 ver->setMCTagBFlavor(0.);
227 ver->setFitType(m_FitType);
228 ver->setNTracks(m_tagParticles.size());
229 ver->setTagVl(m_tagVl);
232 ver->setTagVol(m_tagVol);
235 ver->setTagVNDF(-1111.);
236 ver->setTagVChi2(-1111.);
237 ver->setTagVChi2IP(-1111.);
246 }
247 }
248 }
249 m_plist->removeParticles(toRemove);
250
251 //free memory allocated by rave. initialize() would be enough, except that we must clean things up before program end...
252 //
254}
bool doVertexFit(const Particle *Breco)
central method for the tag side vertex fit
std::vector< double > m_raveWeights
Store the weights used by Rave in the vtx fit so that they can be accessed later.
void BtagMCVertex(const Particle *Breco)
get the vertex of the MC B particle associated to Btag.
StoreArray< TagVertex > m_verArray
StoreArray of TagVertexes.
void deltaT(const Particle *Breco)
calculate DeltaT and MC-DeltaT (rec - tag) in ps from Breco and Btag vertices DT = Dl / gamma beta c ...
std::vector< const Particle * > m_raveParticles
tracks given to rave for the track fit (after removing Kshorts
void resetReturnParams()
Reset all parameters that are computed in each event and then used to compute tuple variables.
StoreObjPtr< ParticleList > m_plist
input particle list
std::vector< const MCParticle * > m_raveMCParticles
Store the MC particles corresponding to each track used by Rave in the vtx fit.
void setConstraintType(const std::string &constraintType)
Set the type of the constraint for the tag fit.
Definition TagVertex.cc:316
void setTagVlErr(float TagVlErr)
Set the error of the tagV component in the boost direction.
Definition TagVertex.cc:254
void setTruthTagVl(float TruthTagVl)
Set the MC tagV component in the boost direction.
Definition TagVertex.cc:249
void setTruthTagVol(float TruthTagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:264
void setMCTagBFlavor(int mcTagBFlavor)
Set generated Btag PDG code.
Definition TagVertex.cc:219
void setTagVolErr(float TagVolErr)
Set the error of the tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:269
void setTagVNDF(float TagVNDF)
Set the number of degrees of freedom in the tag vertex fit.
Definition TagVertex.cc:274
void setDeltaTErr(float DeltaTErr)
Set DeltaTErr.
Definition TagVertex.cc:209
void setConstraintCenter(const ROOT::Math::XYZVector &constraintCenter)
Set the centre of the constraint for the tag fit.
Definition TagVertex.cc:305
void setNTracks(int nTracks)
Set number of tracks used in the fit.
Definition TagVertex.cc:239
void setTagVChi2(float TagVChi2)
Set the chi^2 value of the tag vertex fit result.
Definition TagVertex.cc:279
void setMCDeltaT(float mcDeltaT)
Set generated DeltaT (in kin.
Definition TagVertex.cc:229
void setRollBackStatus(int backStatus)
Set the status of the fit performed with the rolled back tracks.
Definition TagVertex.cc:340
void setVertexFitMCParticles(const std::vector< const MCParticle * > &vtxFitMCParticles)
Set a vector of pointers to the MC p'cles corresponding to the tracks in the tag vtx fit.
Definition TagVertex.cc:295
void setTagVol(float TagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:259
void setDeltaT(float DeltaT)
Set DeltaT.
Definition TagVertex.cc:204
void setRaveWeights(const std::vector< double > &raveWeights)
Set the weights used by Rave in the tag vtx fit.
Definition TagVertex.cc:300
void setTagVertexPval(float TagVertexPval)
Set BTag Vertex P value.
Definition TagVertex.cc:199
void setTagVertex(const ROOT::Math::XYZVector &TagVertex)
Set BTag Vertex.
Definition TagVertex.cc:189
void setMCDeltaTau(float mcDeltaTau)
Set generated DeltaT.
Definition TagVertex.cc:224
void setTagVl(float TagVl)
Set the tagV component in the boost direction.
Definition TagVertex.cc:244
void setTagVertexErrMatrix(const TMatrixDSym &TagVertexErrMatrix)
Set BTag Vertex (3x3) error matrix.
Definition TagVertex.cc:194
void setConstraintCov(const TMatrixDSym &constraintCov)
Set the covariance matrix of the constraint for the tag fit.
Definition TagVertex.cc:310
void setFitType(float FitType)
Set fit algo type.
Definition TagVertex.cc:234
void setVertexFitParticles(const std::vector< const Particle * > &vtxFitParticles)
Set a vector of pointers to the tracks used in the tag vtx fit.
Definition TagVertex.cc:289
void setMCTagVertex(const ROOT::Math::XYZVector &mcTagVertex)
Set generated BTag Vertex.
Definition TagVertex.cc:214
void setTagVChi2IP(float TagVChi2IP)
Set the IP component of the chi^2 value of the tag vertex fit result.
Definition TagVertex.cc:284
void setFitTruthStatus(int truthStatus)
Set the status of the fit performed with the truth info of the tracks.
Definition TagVertex.cc:335
static void initialize(int verbosity=1, double MagneticField=1.5)
Set everything up so everything needed for vertex fitting is there.
Definition RaveSetup.cc:35
void reset()
frees memory allocated by initialize().
Definition RaveSetup.cc:60

◆ 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 paths */
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>()),
491 &Module::setLogConfig)
@ 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: "<".
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 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
@ 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_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
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
ModuleCondition::EAfterConditionPath EAfterConditionPath
Forward the EAfterConditionPath definition from the ModuleCondition.
Definition Module.h:88

◆ fillParticles()

void fillParticles ( std::vector< ParticleAndWeight > & particleAndWeights)
private

Fill sorted list of particles into external variable.

Definition at line 655 of file TagVertexModule.cc.

656{
657 unsigned n = particleAndWeights.size();
658 sort(particleAndWeights.begin(), particleAndWeights.end(),
659 [](const ParticleAndWeight & a, const ParticleAndWeight & b) { return a.weight > b.weight; });
660
661 m_raveParticles.resize(n);
662 m_raveWeights.resize(n);
663 m_raveMCParticles.resize(n);
664
665 for (unsigned i = 0; i < n; ++i) {
666 m_raveParticles.at(i) = particleAndWeights.at(i).particle;
667 m_raveMCParticles.at(i) = particleAndWeights.at(i).mcParticle;
668 m_raveWeights.at(i) = particleAndWeights.at(i).weight;
669 }
670}

◆ fillTagVinfo()

void fillTagVinfo ( const ROOT::Math::XYZVector & tagVpos,
const TMatrixDSym & tagVposErr )
private

Fill tagV vertex info.

Definition at line 672 of file TagVertexModule.cc.

673{
674 m_tagV = tagVpos;
675
676 if (m_constraintType != "noConstraint") {
677 TMatrixDSym tubeInv = m_constraintCov;
678 tubeInv.Invert();
679 TVectorD dV = toVec(m_tagV - m_BeamSpotCenter);
680 m_tagVChi2IP = tubeInv.Similarity(dV);
681 }
682
683 m_tagVErrMatrix.ResizeTo(tagVposErr);
684 m_tagVErrMatrix = tagVposErr;
685}

◆ findConstraint()

pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraint ( const Particle * Breco,
double cut ) const
private

calculate the constraint for the vertex fit on the tag side using Breco information

Definition at line 355 of file TagVertexModule.cc.

356{
357 if (Breco->getPValue() < 0.) return make_pair(vecNaN, matNaN);
358
359 TMatrixDSym beamSpotCov(3);
360 beamSpotCov = m_beamSpotDB->getCovVertex();
361
363
364 double pmag = Breco->getMomentumMagnitude();
365 double xmag = (Breco->getVertex() - m_BeamSpotCenter).R();
366
367
368 TMatrixDSym TerrMatrix = Breco->getMomentumVertexErrorMatrix();
369 TMatrixDSym PerrMatrix(7);
370
371 for (int i = 0; i < 3; ++i) {
372 for (int j = 0; j < 3; ++j) {
373 if (i == j) {
374 PerrMatrix(i, j) = (beamSpotCov(i, j) + TerrMatrix(i, j)) * pmag / xmag;
375 } else {
376 PerrMatrix(i, j) = TerrMatrix(i, j);
377 }
378 PerrMatrix(i + 4, j + 4) = TerrMatrix(i + 4, j + 4);
379 }
380 }
381
382 PerrMatrix(3, 3) = 0.;
383
384 //Copy Breco, but use errors as are in PerrMatrix
385 Particle* Breco2 = ParticleCopy::copyParticle(Breco);
386 Breco2->setMomentumVertexErrorMatrix(PerrMatrix);
387
388
389 const Particle* BRecoRes = doVertexFitForBTube(Breco2, "kalman");
390 if (BRecoRes->getPValue() < 0) return make_pair(vecNaN, matNaN); //problems
391
392 // Overall error matrix
393 TMatrixDSym errFinal = TMatrixDSym(Breco->getVertexErrorMatrix() + BRecoRes->getVertexErrorMatrix());
394
395 // TODO : to be developed the extraction of the momentum from the rave fitted track
396
397 // Get expected pBtag 4-momentum using transverse-momentum conservation
398 ROOT::Math::XYZVector BvertDiff = pmag * (Breco->getVertex() - BRecoRes->getVertex()).Unit();
399 ROOT::Math::PxPyPzMVector pBrecEstimate(BvertDiff.X(), BvertDiff.Y(), BvertDiff.Z(), Breco->getPDGMass());
400 ROOT::Math::PxPyPzMVector pBtagEstimate = PCmsLabTransform::labToCms(pBrecEstimate);
401 pBtagEstimate.SetPxPyPzE(-pBtagEstimate.px(), -pBtagEstimate.py(), -pBtagEstimate.pz(), pBtagEstimate.E());
402 pBtagEstimate = PCmsLabTransform::cmsToLab(pBtagEstimate);
403
404 // rotate err-matrix such that pBrecEstimate goes to eZ
405 TMatrixD TubeZ = rotateTensorInv(pBrecEstimate.Vect(), errFinal);
406
407 TubeZ(2, 2) = cut * cut;
408 TubeZ(2, 0) = 0; TubeZ(0, 2) = 0;
409 TubeZ(2, 1) = 0; TubeZ(1, 2) = 0;
410
411
412 // rotate err-matrix such that eZ goes to pBtagEstimate
413 TMatrixD Tube = rotateTensor(pBtagEstimate.Vect(), TubeZ);
414
415 // Standard algorithm needs no shift
416 return make_pair(m_BeamSpotCenter, toSymMatrix(Tube));
417}
static ROOT::Math::PxPyPzMVector labToCms(const ROOT::Math::PxPyPzMVector &vec)
Transforms Lorentz vector into CM System.
static ROOT::Math::PxPyPzMVector cmsToLab(const ROOT::Math::PxPyPzMVector &vec)
Transforms Lorentz vector into Laboratory System.
double getPValue() const
Returns chi^2 probability of fit if done or -1.
Definition Particle.h:687
double getPDGMass(void) const
Returns uncertainty on the invariant mass (requires valid momentum error matrix)
Definition Particle.cc:635
void setMomentumVertexErrorMatrix(const TMatrixFSym &errMatrix)
Sets 7x7 error matrix.
Definition Particle.cc:424
TMatrixFSym getMomentumVertexErrorMatrix() const
Returns 7x7 error matrix.
Definition Particle.cc:451
double getMomentumMagnitude() const
Returns momentum magnitude.
Definition Particle.h:589
Particle * doVertexFitForBTube(const Particle *mother, std::string fitType) const
it returns an intersection between B rec and beam spot (= origin of BTube)

◆ findConstraintBoost()

pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraintBoost ( double cut) const
private

calculate the standard constraint for the vertex fit on the tag side

Definition at line 502 of file TagVertexModule.cc.

503{
504 double d = 20e-4; //average transverse distance flown by B0
505
506 //make a long error matrix along boost direction
507 TMatrixD longerror(3, 3); longerror(2, 2) = cut * cut;
508 longerror(0, 0) = longerror(1, 1) = d * d;
509
510 ROOT::Math::XYZVector boostDir = PCmsLabTransform().getBoostVector().Unit();
511
512 TMatrixD longerrorRotated = rotateTensor(boostDir, longerror);
513
514 //Extend error of BeamSpotCov matrix in the boost direction
515 TMatrixDSym beamSpotCov = m_beamSpotDB->getCovVertex();
516 TMatrixD Tube = TMatrixD(beamSpotCov) + longerrorRotated;
517
518 // Standard algorithm needs no shift
519 ROOT::Math::XYZVector constraintCenter = m_BeamSpotCenter;
520
521 return make_pair(constraintCenter, toSymMatrix(Tube));
522}

◆ findConstraintBTube()

pair< ROOT::Math::XYZVector, TMatrixDSym > findConstraintBTube ( const Particle * Breco,
double cut )
private

calculate constraint for the vertex fit on the tag side using the B tube (cylinder along the expected BTag line of flights

Definition at line 419 of file TagVertexModule.cc.

420{
421 //Use Breco as the creator of the B tube.
422 if ((Breco->getVertexErrorMatrix()(2, 2)) == 0.0) {
423 B2WARNING("In TagVertexModule::findConstraintBTube: cannot get a proper vertex for BReco. BTube constraint replaced by Boost.");
424 return findConstraintBoost(cut);
425 }
426
427
428 //vertex fit will give the intersection between the beam spot and the trajectory of the B
429 //(base of the BTube, or primary vtx cov matrix)
430 const Particle* tubecreatorBCopy = doVertexFitForBTube(Breco, "avf");
431 if (tubecreatorBCopy->getPValue() < 0) return make_pair(vecNaN, matNaN); //if problems
432
433
434 //get direction of B tag = opposite direction of B rec in CMF
435 ROOT::Math::PxPyPzEVector pBrec = tubecreatorBCopy->get4Vector();
436
437 //if we want the true info, replace the 4vector by the true one
438 if (m_useTruthInFit) {
439 const MCParticle* mcBr = Breco->getRelated<MCParticle>();
440 if (mcBr)
441 pBrec = mcBr->get4Vector();
442 else
444 }
445 ROOT::Math::PxPyPzEVector pBtag = PCmsLabTransform::labToCms(pBrec);
446 pBtag.SetPxPyPzE(-pBtag.px(), -pBtag.py(), -pBtag.pz(), pBtag.E());
447 pBtag = PCmsLabTransform::cmsToLab(pBtag);
448
449 //To create the B tube, strategy is: take the primary vtx cov matrix, and add to it a cov
450 //matrix corresponding to an very big error in the direction of the B tag
451 TMatrixDSym pv = tubecreatorBCopy->getVertexErrorMatrix();
452
453 //print some stuff if wanted
454 if (m_verbose) {
455 B2DEBUG(10, "Brec decay vertex before fit: " << printVector(Breco->getVertex()));
456 B2DEBUG(10, "Brec decay vertex after fit: " << printVector(tubecreatorBCopy->getVertex()));
457 B2DEBUG(10, "Brec direction before fit: " << printVector(float(1. / Breco->getP()) * Breco->getMomentum()));
458 B2DEBUG(10, "Brec direction after fit: " << printVector(float(1. / tubecreatorBCopy->getP()) * tubecreatorBCopy->getMomentum()));
459 B2DEBUG(10, "IP position: " << printVector(m_BeamSpotCenter));
460 B2DEBUG(10, "IP covariance: " << printMatrix(m_BeamSpotCov));
461 B2DEBUG(10, "Brec primary vertex: " << printVector(tubecreatorBCopy->getVertex()));
462 B2DEBUG(10, "Brec PV covariance: " << printMatrix(pv));
463 B2DEBUG(10, "BTag direction: " << printVector((1. / pBtag.P())*pBtag.Vect()));
464 }
465
466 //make a long error matrix along BTag direction
467 TMatrixD longerror(3, 3); longerror(2, 2) = cut * cut;
468
469
470 // make rotation matrix from z axis to BTag line of flight
471 TMatrixD longerrorRotated = rotateTensor(pBtag.Vect(), longerror);
472
473 //pvNew will correspond to the covariance matrix of the B tube
474 TMatrixD pvNew = TMatrixD(pv) + longerrorRotated;
475
476 //set the constraint
477 ROOT::Math::XYZVector constraintCenter = tubecreatorBCopy->getVertex();
478
479 //if we want the true info, set the centre of the constraint to the primary vertex
480 if (m_useTruthInFit) {
481 const MCParticle* mcBr = Breco->getRelated<MCParticle>();
482 if (mcBr) {
483 constraintCenter = mcBr->getProductionVertex();
484 }
485 }
486
487 if (m_verbose) {
488 B2DEBUG(10, "IPTube covariance: " << printMatrix(pvNew));
489 }
490
491 //The following is done to do the BTube constraint with a virtual track
492 //(ie KFit way)
493
494 m_tagMomentum = pBtag;
495
496 m_pvCov.ResizeTo(pv);
497 m_pvCov = pv;
498
499 return make_pair(constraintCenter, toSymMatrix(pvNew));
500}
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex position.
Definition MCParticle.h:178
ROOT::Math::PxPyPzEVector get4Vector() const
Return 4Vector of particle.
Definition MCParticle.h:196
ROOT::Math::PxPyPzEVector get4Vector() const
Returns Lorentz vector.
Definition Particle.h:567
ROOT::Math::XYZVector getMomentum() const
Returns momentum vector.
Definition Particle.h:580
double getP() const
Returns momentum magnitude (same as getMomentumMagnitude but with shorter name)
Definition Particle.h:598
static std::string printVector(const ROOT::Math::XYZVector &vec)
Print a XYZVector (useful for debugging)
static std::string printMatrix(const TMatrixD &mat)
Print a TMatrix (useful for debugging)

◆ 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 323 of file Module.h.

324 {
325 return m_conditions;
326 }

◆ getBeamSpot()

const BeamSpot & getBeamSpot ( ) const
inline

returns the BeamSpot object

Definition at line 78 of file TagVertexModule.h.

78{ return *m_beamSpotDB; }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

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

Definition at line 313 of file Module.h.

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

◆ 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 201 of file Module.h.

201{return m_description;}

◆ 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, RootOutputModule, and StorageRootOutputModule.

Definition at line 133 of file Module.h.

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

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 224 of file Module.h.

224{return m_logConfig;}

◆ getModules()

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

no submodules, return empty list

Implements PathElement.

Definition at line 505 of file Module.h.

505{ 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 186 of file Module.h.

186{return m_name;}

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 196 of file Module.h.

196{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.

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 362 of file Module.h.

362{ return m_moduleParamList; }

◆ getParticlesAndWeights()

vector< ParticleAndWeight > getParticlesAndWeights ( const std::vector< const Particle * > & tagParticles) const
private

Get a list of particles with attached weight and associated MC particle.

Definition at line 626 of file TagVertexModule.cc.

627{
628 vector<ParticleAndWeight> particleAndWeights;
629
630 for (const Particle* particle : tagParticles) {
631 ROOT::Math::PxPyPzEVector mom = particle->get4Vector();
632 if (!isfinite(mom.mag2())) continue;
633
634 ParticleAndWeight particleAndWeight;
635 particleAndWeight.mcParticle = 0;
636 particleAndWeight.weight = -1111.;
637 particleAndWeight.particle = particle;
638
639 if (m_useMCassociation == "breco" || m_useMCassociation == "internal")
640 particleAndWeight.mcParticle = particle->getRelatedTo<MCParticle>();
641
642 particleAndWeights.push_back(particleAndWeight);
643 }
644
645 return particleAndWeights;
646}
const Particle * particle
tag track fit result with pion mass hypo, for sorting purposes
const MCParticle * mcParticle
mc particle matched to the tag track, for sorting purposes
double weight
rave weight associated to the track, for sorting purposes

◆ 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 380 of file Module.h.

380{ return m_returnValue; }

◆ getRollBackPoca()

ROOT::Math::XYZVector getRollBackPoca ( ParticleAndWeight const & paw)
private

This shifts the position of tracks by the vector difference of mother B and production point of track from truth info.

Definition at line 1006 of file TagVertexModule.cc.

1007{
1008 if (!paw.mcParticle) {
1009 B2ERROR("In TagVertexModule::getTruePoca: no MC particle set");
1010 return ROOT::Math::XYZVector(0., 0., 0.);
1011 }
1012
1013 return paw.particle->getTrackFitResult()->getPosition() - paw.mcParticle->getProductionVertex() + m_mcTagV;
1014}

◆ getTagTracks_standardAlgorithm()

std::vector< const Particle * > getTagTracks_standardAlgorithm ( const Particle * Breco,
int nPXDHits ) const
private

performs the fit using the standard algorithm - using all tracks in RoE The user can specify a request on the PXD hits left by the tracks

Definition at line 606 of file TagVertexModule.cc.

607{
608 std::vector<const Particle*> fitParticles;
609 const RestOfEvent* roe = Breco->getRelatedTo<RestOfEvent>();
610 if (!roe) return fitParticles;
611 //load all particles from the ROE
612 std::vector<const Particle*> ROEParticles = roe->getChargedParticles(m_roeMaskName, 0, false);
613 if (ROEParticles.size() == 0) return fitParticles;
614
615 for (auto& ROEParticle : ROEParticles) {
616 HitPatternVXD roeTrackPattern = ROEParticle->getTrackFitResult()->getHitPatternVXD();
617
618 if (roeTrackPattern.getNPXDHits() >= reqPXDHits) {
619 fitParticles.push_back(ROEParticle);
620 }
621 }
622 return fitParticles;
623}
unsigned short getNPXDHits() const
Get total number of hits in the PXD.
std::vector< const Particle * > getChargedParticles(const std::string &maskName=c_defaultMaskName, unsigned int pdg=0, bool unpackComposite=true) const
Get charged particles from ROE mask.

◆ getTrackWithRollBackCoordinates()

TrackFitResult getTrackWithRollBackCoordinates ( ParticleAndWeight const & paw)
private

If the fit has to be done with the rolled back tracks, Rave or KFit is fed with a track where the position of track is shifted by the vector difference of mother B and production point of track from truth info The function below takes care of that.

Definition at line 993 of file TagVertexModule.cc.

994{
995 const TrackFitResult* tfr(paw.particle->getTrackFitResult());
996
997 return TrackFitResult(getRollBackPoca(paw),
998 tfr->getMomentum(),
999 tfr->getCovariance6(),
1000 tfr->getChargeSign(),
1001 tfr->getParticleType(),
1002 tfr->getPValue(),
1003 m_Bfield, 0, 0, tfr->getNDF());
1004}

◆ getTrackWithTrueCoordinates()

TrackFitResult getTrackWithTrueCoordinates ( ParticleAndWeight const & paw) const
private

If the fit has to be done with the truth info, Rave is fed with a track where the momentum is replaced by the true momentum and the position replaced by the point on the true particle trajectory closest to the measured track position The function below takes care of that.

Definition at line 962 of file TagVertexModule.cc.

963{
964 if (!paw.mcParticle) {
965 B2ERROR("In TagVertexModule::getTrackWithTrueCoordinate: no MC particle set");
966 return TrackFitResult();
967 }
968
969 const TrackFitResult* tfr(paw.particle->getTrackFitResult());
970
971 return TrackFitResult(getTruePoca(paw),
972 paw.mcParticle->getMomentum(),
973 tfr->getCovariance6(),
974 tfr->getChargeSign(),
975 tfr->getParticleType(),
976 tfr->getPValue(),
977 m_Bfield, 0, 0, tfr->getNDF());
978}

◆ getTruePoca()

ROOT::Math::XYZVector getTruePoca ( ParticleAndWeight const & paw)
staticprivate

This finds the point on the true particle trajectory closest to the measured track position.

Definition at line 981 of file TagVertexModule.cc.

982{
983 if (!paw.mcParticle) {
984 B2ERROR("In TagVertexModule::getTruePoca: no MC particle set");
985 return ROOT::Math::XYZVector(0., 0., 0.);
986 }
987
988 return DistanceTools::poca(paw.mcParticle->getProductionVertex(),
989 paw.mcParticle->getMomentum(),
990 paw.particle->getTrackFitResult()->getPosition());
991}
ROOT::Math::XYZVector poca(ROOT::Math::XYZVector const &trackPos, ROOT::Math::XYZVector const &trackP, ROOT::Math::XYZVector const &vtxPos)
Returns the Point Of Closest Approach of a track to a vertex.

◆ 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:508

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

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

Definition at line 310 of file Module.h.

310{ 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 377 of file Module.h.

377{ 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 the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 126 of file TagVertexModule.cc.

127{
128 // magnetic field
130 // RAVE setup
132 B2INFO("TagVertexModule : magnetic field = " << m_Bfield);
133 // truth fit status will be set to 2 only if the MC info cannot be recovered
135 // roll back status will be set to 2 only if the MC info cannot be recovered
137
138 //input
139 StoreArray<Particle>().isRequired();
140 m_plist.isRequired(m_listName);
141 // output
142 m_verArray.registerInDataStore();
143 StoreArray<Particle>().registerRelationTo(m_verArray);
144 //check if the fitting algorithm name is set correctly
145 if (m_fitAlgo != "Rave" && m_fitAlgo != "KFit")
146 B2FATAL("TagVertexModule: invalid fitting algorithm (must be set to either Rave or KFit).");
148 B2FATAL("TagVertexModule: invalid fitting option (useRollBack and useTruthInFit cannot be simultaneously set to true).");
149 //temporary while the one track fit is broken
150 if (m_trackFindingType == "singleTrack" || m_trackFindingType == "singleTrack_PXD")
151 B2FATAL("TagVertexModule : the singleTrack option is temporarily broken.");
152}
static ROOT::Math::XYZVector getFieldInTesla(const ROOT::Math::XYZVector &pos)
return the magnetic field at a given position in Tesla.

◆ makeGeneralFit()

bool makeGeneralFit ( )
private

TO DO: tag side vertex fit in the case of semileptonic tag side decay.

make the vertex fit on the tag side with chosen fit algorithm

Definition at line 648 of file TagVertexModule.cc.

649{
650 if (m_fitAlgo == "Rave") return makeGeneralFitRave();
651 else if (m_fitAlgo == "KFit") return makeGeneralFitKFit();
652 return false;
653}
bool makeGeneralFitRave()
make the vertex fit on the tag side: RAVE AVF tracks coming from Ks removed all other tracks used
bool makeGeneralFitKFit()
make the vertex fit on the tag side: KFit tracks coming from Ks removed all other tracks used

◆ makeGeneralFitKFit()

bool makeGeneralFitKFit ( )
private

make the vertex fit on the tag side: KFit tracks coming from Ks removed all other tracks used

Definition at line 843 of file TagVertexModule.cc.

844{
845 //feed KFit with tracks without Kshorts
846 vector<ParticleAndWeight> particleAndWeights = getParticlesAndWeights(m_tagParticles);
847
848 analysis::VertexFitKFit kFit;
849
850
851 // iterative procedure which removes tracks with high chi2
852 for (int iteration_counter = 0; iteration_counter < 100; ++iteration_counter) {
853 analysis::VertexFitKFit kFitTemp = doSingleKfit(particleAndWeights);
854 if (!kFitTemp.isFitted() || isnan(kFitTemp.getCHIsq()))
855 return false;
856
857 double reduced_chi2 = kFitTemp.getCHIsq() / kFitTemp.getNDF();
858 int nTracks = kFitTemp.getTrackCount();
859
860 if (nTracks != int(particleAndWeights.size()))
861 B2ERROR("TagVertexModule: Different number of tracks in kFit and particles");
862
863 if (reduced_chi2 <= m_kFitReqReducedChi2 || nTracks <= 1 || (nTracks <= 2 && m_constraintType == "noConstraint")) {
864 kFit = kFitTemp;
865 break;
866 } else { // remove particle with highest chi2/ndf and continue
867 int badTrackID = getLargestChi2ID(kFitTemp);
868 if (0 <= badTrackID && badTrackID < int(particleAndWeights.size()))
869 particleAndWeights.erase(particleAndWeights.begin() + badTrackID);
870 else
871 B2ERROR("TagVertexModule: Obtained badTrackID is not within limits");
872 }
873
874 }
875
876 //save the track info for later use
877 //Tracks are sorted by weight, i.e. pushing the tracks with 0 weight (from KS) to the end of the list
878 fillParticles(particleAndWeights);
879
880 //Save the infos related to the vertex
881 fillTagVinfo(CLHEPToROOT::getXYZVector(kFit.getVertex()),
882 CLHEPToROOT::getTMatrixDSym(kFit.getVertexError()));
883
884 m_tagVNDF = kFit.getNDF();
885 m_tagVChi2 = kFit.getCHIsq();
886 m_fitPval = TMath::Prob(m_tagVChi2, m_tagVNDF);
887
888 return true;
889}
void fillTagVinfo(const ROOT::Math::XYZVector &tagVpos, const TMatrixDSym &tagVposErr)
Fill tagV vertex info.
std::vector< ParticleAndWeight > getParticlesAndWeights(const std::vector< const Particle * > &tagParticles) const
Get a list of particles with attached weight and associated MC particle.
void fillParticles(std::vector< ParticleAndWeight > &particleAndWeights)
Fill sorted list of particles into external variable.
analysis::VertexFitKFit doSingleKfit(std::vector< ParticleAndWeight > &particleAndWeights)
performs single KFit on particles stored in particleAndWeights this function can be iterated several ...
virtual int getNDF(void) const
Get an NDF of the fit.
Definition KFitBase.cc:114
bool isFitted(void) const
Return false if fit is not performed yet or performed fit is failed; otherwise true.
Definition KFitBase.cc:728
int getTrackCount(void) const
Get the number of added tracks.
Definition KFitBase.cc:107
double getCHIsq(void) const override
Get a chi-square of the fit.

◆ makeGeneralFitRave()

bool makeGeneralFitRave ( )
private

make the vertex fit on the tag side: RAVE AVF tracks coming from Ks removed all other tracks used

Definition at line 687 of file TagVertexModule.cc.

688{
689 // apply constraint
691 if (m_constraintType != "noConstraint")
693 analysis::RaveVertexFitter rFit;
694
695 //feed rave with tracks without Kshorts
696 vector<ParticleAndWeight> particleAndWeights = getParticlesAndWeights(m_tagParticles);
697
698 for (const auto& pw : particleAndWeights) {
699 try {
700 if (m_useTruthInFit) {
701 if (pw.mcParticle) {
702 TrackFitResult tfr(getTrackWithTrueCoordinates(pw));
703 rFit.addTrack(&tfr);
704 } else
706 } else if (m_useRollBack) {
707 if (pw.mcParticle) {
708 TrackFitResult tfr(getTrackWithRollBackCoordinates(pw));
709 rFit.addTrack(&tfr);
710 } else
712 } else {
713 rFit.addTrack(pw.particle->getTrackFitResult());
714 }
715 } catch (const rave::CheckedFloatException&) {
716 B2ERROR("Exception caught in TagVertexModule::makeGeneralFitRave(): Invalid inputs (nan/inf)?");
717 }
718 }
719
720 //perform fit
721
722 int isGoodFit(-1);
723
724 try {
725 isGoodFit = rFit.fit("avf");
726 // if problems
727 if (isGoodFit < 1) return false;
728 } catch (const rave::CheckedFloatException&) {
729 B2ERROR("Exception caught in TagVertexModule::makeGeneralFitRave(): Invalid inputs (nan/inf)?");
730 return false;
731 }
732
733 //save the track info for later use
734
735 for (unsigned int i(0); i < particleAndWeights.size() && isGoodFit >= 1; ++i)
736 particleAndWeights.at(i).weight = rFit.getWeight(i);
737
738 //Tracks are sorted from highest rave weight to lowest
739
740 fillParticles(particleAndWeights);
741
742 //if the fit is good, save the infos related to the vertex
743 fillTagVinfo(ROOT::Math::XYZVector(rFit.getPos(0)), rFit.getCov(0));
744
745 //fill quality variables
746 m_tagVNDF = rFit.getNdf(0);
747 m_tagVChi2 = rFit.getChi2(0);
748 m_fitPval = rFit.getPValue();
749
750 return true;
751}
TrackFitResult getTrackWithRollBackCoordinates(ParticleAndWeight const &paw)
If the fit has to be done with the rolled back tracks, Rave or KFit is fed with a track where the pos...
TrackFitResult getTrackWithTrueCoordinates(ParticleAndWeight const &paw) const
If the fit has to be done with the truth info, Rave is fed with a track where the momentum is replace...
void unsetBeamSpot()
unset beam spot constraint
Definition RaveSetup.cc:82
TMatrixDSym getCov(VecSize vertexId=0) const
get the covariance matrix (3x3) of the of the fitted vertex position.
ROOT::Math::XYZVector getPos(VecSize vertexId=0) const
get the position of the fitted vertex.
double getNdf(VecSize vertexId=0) const
get the number of degrees of freedom (NDF) of the fitted vertex.
double getChi2(VecSize vertexId=0) const
get the χ² of the fitted vertex.
double getWeight(int trackId, VecSize vertexId=0) const
get the weight Rave assigned to a specific input track.
double getPValue(VecSize vertexId=0) const
get the p value of the fitted vertex.

◆ printMatrix() [1/2]

std::string printMatrix ( const TMatrixD & mat)
staticprivate

Print a TMatrix (useful for debugging)

Definition at line 1061 of file TagVertexModule.cc.

1062{
1063 std::ostringstream oss;
1064 int w = 14;
1065 for (int i = 0; i < mat.GetNrows(); ++i) {
1066 for (int j = 0; j < mat.GetNcols(); ++j) {
1067 oss << std::setw(w) << mat(i, j) << " ";
1068 }
1069 oss << endl;
1070 }
1071 return oss.str();
1072}

◆ printMatrix() [2/2]

std::string printMatrix ( const TMatrixDSym & mat)
staticprivate

Print a TMatrixFSym (useful for debugging)

Definition at line 1075 of file TagVertexModule.cc.

1076{
1077 std::ostringstream oss;
1078 int w = 14;
1079 for (int i = 0; i < mat.GetNrows(); ++i) {
1080 for (int j = 0; j < mat.GetNcols(); ++j) {
1081 oss << std::setw(w) << mat(i, j) << " ";
1082 }
1083 oss << endl;
1084 }
1085 return oss.str();
1086}

◆ printVector()

std::string printVector ( const ROOT::Math::XYZVector & vec)
staticprivate

Print a XYZVector (useful for debugging)

Definition at line 1052 of file TagVertexModule.cc.

1053{
1054 std::ostringstream oss;
1055 int w = 14;
1056 oss << "(" << std::setw(w) << vec.X() << ", " << std::setw(w) << vec.Y() << ", " << std::setw(w) << vec.Z() << ")" << std::endl;
1057 return oss.str();
1058}

◆ resetReturnParams()

void resetReturnParams ( )
private

Reset all parameters that are computed in each event and then used to compute tuple variables.

Definition at line 1016 of file TagVertexModule.cc.

1017{
1018 m_raveParticles.resize(0);
1019 m_raveMCParticles.resize(0);
1020 m_tagParticles.resize(0);
1021 m_raveWeights.resize(0);
1022
1024 m_tagV = vecNaN;
1025 m_tagVErrMatrix.ResizeTo(matNaN);
1026 m_tagVErrMatrix = matNaN;
1027 m_mcTagV = vecNaN;
1028 m_mcVertReco = vecNaN;
1029 m_deltaT = realNaN;
1032 m_constraintCov.ResizeTo(matNaN);
1033 m_constraintCov = matNaN;
1034 m_constraintCenter = vecNaN;
1035 m_tagVl = realNaN;
1038 m_tagVol = realNaN;
1044 m_pvCov.ResizeTo(matNaN);
1045 m_pvCov = matNaN;
1046 m_tagMomentum = ROOT::Math::PxPyPzEVector(realNaN, realNaN, realNaN, realNaN);
1047}

◆ 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}
std::string m_description
The description of the module.
Definition Module.h:510

◆ setLogConfig()

void setLogConfig ( const LogConfig & logConfig)
inlineinherited

Set the log system configuration.

Definition at line 229 of file Module.h.

229{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 213 of file Module.h.

213{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList & params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 500 of file Module.h.

500{ 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}
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:200
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition LogSystem.cc:28
LogConfig & getLogConfig()
Returns the log system configuration.
Definition Module.h:224
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition Module.h:507
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}

◆ terminate()

virtual void terminate ( void )
inlinevirtualinherited

This method is called at the end of the event processing.

This method is called only once after the event processing finished. Use this method for cleaning up, closing files, etc.

This method can be implemented by subclasses.

Reimplemented in AafhInputModule, AnalysisPhase1StudyModule, ARICHBackgroundModule, arichBtestModule, ARICHNtupleModule, arichToNtupleModule, AsyncWrapper, AWESOMEBasicModule, B2BIIConvertMdstModule, B2BIIFixMdstModule, B2BIIMCParticlesMonitorModule, B2BIIMdstInputModule, BabayagaNLOInputModule, BBBremInputModule, BeamabortModule, BeamabortStudyModule, BeamDigitizerModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BeamSpotMonitorModule, BelleMCOutputModule, BgoDigitizerModule, BgoModule, BgoStudyModule, BGOverlayInputModule, BHWideInputModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, CalibrationCollectorModule, CaveModule, CDCCosmicAnalysisModule, CDCCRTestModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, CDCCrossTalkAdderModule, CDCDedxCorrectionModule, CDCDedxDQMModule, CDCDedxPIDModule, CDCDedxScanModule, CDCDedxSkimCDSTModule, CDCDedxSkimModule, CDCDedxValidationModule, CDCDigitizerModule, cdcDQM7Module, CDCDQMModule, CDCInitialT0DeterminationModule, CDCTrigger2DFinderModule, CDCTriggerHoughETFModule, CDCTriggerNDFinderModule, CDCTriggerNeuroDataModule, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerNeuroIDHistModule, CDCTriggerTSFFirmwareModule, CDCTriggerTSFModule, CDCTriggerUnpackerModule, CertifyParallelModule, CheckErrorEventModule, Chi2MCTrackMatcherModule, ClawDigitizerModule, ClawModule, ClawStudyModule, ClawsDigitizerModule, CLAWSModule, ClawsStudyModule, CollectorTestModule, Convert2RawDetModule, CosmicsAlignmentValidationModule, CRYInputModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, CurlingTrackCandSplitterModule, CurlTaggerModule, DAQPerfModule, DataWriterModule, DeSerializerModule, DeSerializerPXDModule, DisplayModule, DosiDigitizerModule, DosiModule, DosiStudyModule, DQMHistAnalysisARICHModule, DQMHistAnalysisARICHMonObjModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisDAQMonObjModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLOutOfTimeDigitsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisEventT0EfficiencyModule, DQMHistAnalysisEventT0TriggerJitterModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisExampleModule, DQMHistAnalysisHLTModule, DQMHistAnalysisHLTMonObjModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLMModule, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisMonObjModule, DQMHistAnalysisOutputFileModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPeakModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDCMModule, DQMHistAnalysisPXDDAQModule, DQMHistAnalysisPXDEffModule, DQMHistAnalysisPXDERModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisPXDInjectionModule, DQMHistAnalysisPXDReductionModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisRunNrModule, DQMHistAnalysisSVDClustersOnTrackModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOccupancyModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisSVDUnpackerModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTrackingAbortModule, DQMHistAnalysisTRGECLModule, DQMHistAnalysisTRGEFFModule, DQMHistAnalysisTRGGDLModule, DQMHistAnalysisTRGModule, DQMHistAutoCanvasModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DqmHistoManagerModule, DQMHistOutputToEPICSModule, DQMHistReferenceModule, DQMHistSnapshotsModule, Ds2RawFileModule, Ds2RawModule, Ds2RbufModule, Ds2SampleModule, ECLLOMModule, ECLBackgroundModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLChargedPIDModule, ECLClusterPSDModule, ECLCompressBGOverlayModule, ECLCovarianceMatrixModule, EclCovMatrixNtupleModule, ECLCRFinderModule, ECLDataAnalysisModule, ECLDigiStudyModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMEXTENDEDModule, ECLDQMModule, ECLExpertModule, ECLFillCellIdMappingModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLMatchingPerformanceExpertModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLTrackClusterMatchingModule, ECLTrackClusterMatchingParametrizationExpertModule, ECLTrackClusterMatchingPerformanceModule, ECLTRGInformationModule, ECLTrimShowersAndDigitsModule, ECLUnpackerModule, eclWaveformCalibCollectorModule, ECLWaveformFitModule, EffPlotsModule, EKLMDataCheckerModule, ElapsedTimeModule, EventKinematicsModule, EvReductionModule, EvtGenDecayModule, ExtModule, FANGSDigitizerModule, FANGSModule, FANGSStudyModule, FastBDTClassifierAnalyzerModule, FastBDTClassifierTrainingModule, FastRbuf2DsModule, FillTrackFitNtupleModule, FlavorTaggerInfoFillerModule, FragmentationModule, FullSimModule, FullSimTimingModule, TRGGDLUnpackerModule, GeneratedVertexDisplacerModule, GeneratorPreselectionModule, GenfitVisModule, GenRawSendModule, GeometryModule, GetEventFromSocketModule, GFTC2SPTCConverterModule, GRLNeuroModule, GRLNeuroTrainerModule, He3DigitizerModule, He3tubeModule, He3tubeStudyModule, HepevtOutputModule, HepMCInputModule, HepMCOutputModule, HistoManagerModule, HistoModule, HitLevelInfoWriterModule, HitXPModule, HLTDQM2ZMQModule, HLTDs2ZMQModule, KinkFinderModule, KKGenInputModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDQM2Module, KLMDQMModule, KLMExpertModule, KLMMuonIDDNNExpertModule, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMTrackingModule, KLMTriggerModule, KLMUnpackerModule, KlongValidationModule, KoralWInputModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, MasterClassModule, MCMatcherTRGECLModule, MCTrackCandClassifierModule, MCV0MatcherModule, MergeDataStoreModule, MicrotpcModule, MicrotpcStudyModule, TpcDigitizerModule, MLSegmentNetworkProducerModule, MonitorDataModule, MuidModule, MVAExpertModule, MVAMultipleExpertsModule, NoKickCutsEvalModule, NtuplePhase1_v6Module, ParticleKinematicFitterModule, OverrideGenerationFlagsModule, PartialSeqRootReaderModule, ParticleLoaderModule, ParticleMassHypothesesUpdaterModule, ParticleMassUpdaterModule, ParticleMCDecayStringModule, ParticleMomentumUpdaterModule, ParticleStatsModule, ParticleWeightingLookUpCreatorModule, Ph1bpipeModule, Ph1sustrModule, PhaseSpaceAnalysisModule, PhokharaInputModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, PIDNtupleModule, PinDigitizerModule, PindiodeModule, PindiodeStudyModule, PlumeDigitizerModule, PlumeModule, ProfileModule, ProgressBarModule, PXDBackgroundModule, PXDBgTupleProducerModule, PXDMCBgTupleProducerModule, PXDPackerErrModule, PXDPackerModule, PXDReadRawBonnDAQMatchedModule, PXDReadRawBonnDAQModule, PXDReadRawONSENModule, PXDUnpackerModule, PXDUnpackerOldModule, PXDUnpackerOTModule, PXDClustersFromTracksModule, PXDDQMEfficiencyNtupleModule, PXDDQMEfficiencyNtupleSelftrackModule, PXDDQMTrackRawNtupleModule, PXDPerformanceModule, PXDROIFinderAnalysisModule, PXDSpacePointCreatorModule, PyModule, QcsmonitorDigitizerModule, QcsmonitorModule, QcsmonitorStudyModule, RandomBarrierModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, ReceiveEventModule, RemoveMCParticlesModule, RemoveParticlesNotInListsModule, ReprocessorModule, ROIDQMModule, ROIReadTestModule, ROISenderModule, Root2BinaryModule, Root2RawModule, RootInputModule, RootOutputModule, RT2SPTCConverterModule, RxModule, RxSocketModule, ScanCDCGeoModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, SegmentNetworkAnalyzerModule, SeqRootInputModule, SeqRootMergerModule, SeqRootOutputModule, SerializerModule, SkimFilterModule, SoftwareTriggerModule, SoftwareTriggerResultPrinterModule, SpacePoint2TrueHitConnectorModule, SpacePointCreatorTestModule, SPTC2GFTCConverterModule, SPTC2RTConverterModule, SPTCRefereeModule, SrsensorModule, StandardTrackingPerformanceModule, StorageDeserializerModule, StorageRootOutputModule, StorageSerializerModule, StudyMaterialEffectsModule, SubEventModule, SVD3SamplesEmulatorModule, SVDBackgroundModule, SVDDigitizerModule, SVDPackerModule, SVDVariablesToStorageModule, SVDChannelMappingModule, SVDChargeSharingAnalysisModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDClusterQualityEstimatorCalibrationModule, SVDClusterQualityEstimatorModule, SVDCoGTimeEstimatorModule, SVDCrossTalkFinderModule, SVDDataFormatCheckModule, SVDDQMClustersOnTrackModule, SVDDQMExpressRecoModule, svdDumpModule, SVDEventT0PerformanceTTreeModule, SVDHotStripFinderModule, SVDMaxStripTTreeModule, SVDPerformanceTTreeModule, SVDROIFinderAnalysisDataModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, SVDShaperDigitsFromTracksModule, SVDSpacePointCreatorModule, SVDSpacePointQICalibrationModule, SVDTriggerQualityGeneratorModule, SwitchDataStoreModule, TCConvertersTestModule, TeeggInputModule, TOPAlignerModule, TOPBackgroundModule, TOPBunchFinderModule, TOPChannelT0CalibratorModule, TOPChannelT0MCModule, TOPCommonT0CalibratorModule, TOPCosmicT0FinderModule, TOPDoublePulseGeneratorModule, TOPGainEfficiencyCalculatorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPLaserHitSelectorModule, TOPLLScannerModule, TOPMCTrackMakerModule, TOPModuleT0CalibratorModule, TOPNtupleModule, TOPPackerModule, TOPPDFCheckerModule, TOPRawDigitConverterModule, TOPRingPlotterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPTriggerDigitizerModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPXTalkChargeShareSetterModule, TrackAnaModule, TrackFilterModule, FindletModule< AFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< AxialTrackFinderLegendre >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromHitsFindlet >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromSegmentsFindlet >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< FacetCreator >, FindletModule< FacetCreator >, FindletModule< HitBasedT0Extractor >, FindletModule< HitBasedT0Extractor >, FindletModule< HitReclaimer >, FindletModule< HitReclaimer >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackExporter >, FindletModule< TrackFinder >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFindingCDC::FindletStoreArrayInput< BaseEventTimeExtractorModuleFindlet< AFindlet > > >, FindletModule< TrackFindingCDC::FindletStoreArrayInput< BaseEventTimeExtractorModuleFindlet< AFindlet > > >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< TrackRejecter >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, FindletModule< WireHitPreparer >, TrackFinderVXDAnalizerModule, TrackingPerformanceEvaluationModule, TrackQETrainingDataCollectorModule, TreeFitterModule, TrepsInputModule, TRGCDCETFUnpackerModule, TRGCDCModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSStreamModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLFAMModule, TRGECLModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGEFFDQMModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLModule, TRGGDLSummaryModule, TRGGRLDQMModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLUnpackerModule, TRGRAWDATAModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TxModule, TxSocketModule, V0FinderModule, V0findingPerformanceEvaluationModule, VariablesToEventBasedTreeModule, VariablesToHistogramModule, VariablesToNtupleModule, VXDMisalignmentModule, VXDDedxPIDModule, VXDQETrainingDataCollectorModule, VXDTFTrainingDataCollectorModule, ZMQRxOutputModule, ZMQRxWorkerModule, ZMQTxInputModule, and ZMQTxWorkerModule.

Definition at line 175 of file Module.h.

175{};

Member Data Documentation

◆ m_BeamSpotCenter

ROOT::Math::XYZVector m_BeamSpotCenter
private

Beam spot position.

Definition at line 125 of file TagVertexModule.h.

◆ m_BeamSpotCov

TMatrixDSym m_BeamSpotCov
private

size of the beam spot == covariance matrix on the beam spot position

Definition at line 126 of file TagVertexModule.h.

◆ m_beamSpotDB

DBObjPtr<BeamSpot> m_beamSpotDB
private

Beam spot database object.

Definition at line 128 of file TagVertexModule.h.

◆ m_Bfield

double m_Bfield
private

magnetic field from data base

Definition at line 95 of file TagVertexModule.h.

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 520 of file Module.h.

◆ m_confidenceLevel

double m_confidenceLevel
private

required fit confidence level

Definition at line 88 of file TagVertexModule.h.

◆ m_constraintCenter

ROOT::Math::XYZVector m_constraintCenter
private

centre position of the constraint for the tag Vertex fit

Definition at line 124 of file TagVertexModule.h.

◆ m_constraintCov

TMatrixDSym m_constraintCov
private

constraint to be used in the tag vertex fit

Definition at line 123 of file TagVertexModule.h.

◆ m_constraintType

std::string m_constraintType
private

Choose constraint: noConstraint, IP, tube, boost, (breco)

Definition at line 91 of file TagVertexModule.h.

◆ m_deltaT

double m_deltaT
private

reconstructed DeltaT

Definition at line 119 of file TagVertexModule.h.

◆ m_deltaTErr

double m_deltaTErr
private

reconstructed DeltaT error

Definition at line 120 of file TagVertexModule.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 510 of file Module.h.

◆ m_fitAlgo

std::string m_fitAlgo
private

Algorithm used for the tag fit (Rave or KFit)

Definition at line 139 of file TagVertexModule.h.

◆ m_fitPval

double m_fitPval
private

P value of the tag side fit result.

Definition at line 111 of file TagVertexModule.h.

◆ m_fitTruthStatus

int m_fitTruthStatus
private

Store info about whether the fit was performed with the truth info 0 fit performed with measured parameters 1 fit performed with true parameters 2 unable to recover truth parameters.

Definition at line 102 of file TagVertexModule.h.

◆ m_FitType

int m_FitType
private

fit algo used

Definition at line 129 of file TagVertexModule.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 517 of file Module.h.

◆ m_kFitReqReducedChi2

double m_kFitReqReducedChi2
private

The required chi2/ndf to accept the kFit result, if it is higher, iteration procedure is applied.

Definition at line 140 of file TagVertexModule.h.

◆ m_listName

std::string m_listName
private

Breco particle list name.

Definition at line 87 of file TagVertexModule.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 513 of file Module.h.

◆ m_mcDeltaT

double m_mcDeltaT
private

generated DeltaT with boost-direction approximation

Definition at line 122 of file TagVertexModule.h.

◆ m_mcDeltaTau

double m_mcDeltaTau
private

generated DeltaT

Definition at line 121 of file TagVertexModule.h.

◆ m_mcInfo

bool m_mcInfo
private

true if user wants to retrieve MC information out from the tracks used in the fit

Definition at line 127 of file TagVertexModule.h.

◆ m_mcLifeTimeReco

double m_mcLifeTimeReco
private

generated Breco life time

Definition at line 118 of file TagVertexModule.h.

◆ m_mcParticles

StoreArray<MCParticle> m_mcParticles
private

StoreArray of MCParticles.

Definition at line 84 of file TagVertexModule.h.

◆ m_mcPDG

int m_mcPDG
private

generated tag side B flavor

Definition at line 116 of file TagVertexModule.h.

◆ m_mcTagLifeTime

double m_mcTagLifeTime
private

generated tag side life time of B-decay

Definition at line 115 of file TagVertexModule.h.

◆ m_mcTagV

ROOT::Math::XYZVector m_mcTagV
private

generated tag side vertex

Definition at line 114 of file TagVertexModule.h.

◆ m_mcVertReco

ROOT::Math::XYZVector m_mcVertReco
private

generated Breco decay vertex

Definition at line 117 of file TagVertexModule.h.

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 515 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 507 of file Module.h.

◆ m_package

std::string m_package
privateinherited

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

Definition at line 509 of file Module.h.

◆ m_plist

StoreObjPtr<ParticleList> m_plist
private

input particle list

Definition at line 85 of file TagVertexModule.h.

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

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

Definition at line 511 of file Module.h.

◆ m_pvCov

TMatrixDSym m_pvCov
private

covariance matrix of the PV (useful with tube and KFit)

Definition at line 142 of file TagVertexModule.h.

◆ m_raveMCParticles

std::vector<const MCParticle*> m_raveMCParticles
private

Store the MC particles corresponding to each track used by Rave in the vtx fit.

Definition at line 100 of file TagVertexModule.h.

◆ m_raveParticles

std::vector<const Particle*> m_raveParticles
private

tracks given to rave for the track fit (after removing Kshorts

Definition at line 97 of file TagVertexModule.h.

◆ m_raveWeights

std::vector<double> m_raveWeights
private

Store the weights used by Rave in the vtx fit so that they can be accessed later.

Definition at line 98 of file TagVertexModule.h.

◆ m_reqPXDHits

int m_reqPXDHits
private

N of PXD hits for a track to be used.

Definition at line 93 of file TagVertexModule.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 518 of file Module.h.

◆ m_roeMaskName

std::string m_roeMaskName
private

ROE particles from this mask will be used for vertex fitting.

Definition at line 94 of file TagVertexModule.h.

◆ m_rollbackStatus

int m_rollbackStatus
private

Store info about whether the fit was performed with the rolled back tracks 0 fit performed with measured parameters 1 fit performed with rolled back parameters 2 unable to recover truth parameters.

Definition at line 107 of file TagVertexModule.h.

◆ m_tagMomentum

ROOT::Math::PxPyPzEVector m_tagMomentum
private

B tag momentum computed from fully reconstructed B sig.

Definition at line 143 of file TagVertexModule.h.

◆ m_tagParticles

std::vector<const Particle*> m_tagParticles
private

tracks of the rest of the event

Definition at line 96 of file TagVertexModule.h.

◆ m_tagV

ROOT::Math::XYZVector m_tagV
private

tag side fit result

Definition at line 112 of file TagVertexModule.h.

◆ m_tagVChi2

double m_tagVChi2
private

chi^2 value of the tag vertex fit result

Definition at line 137 of file TagVertexModule.h.

◆ m_tagVChi2IP

double m_tagVChi2IP
private

IP component of the chi^2 of the tag vertex fit result.

Definition at line 138 of file TagVertexModule.h.

◆ m_tagVErrMatrix

TMatrixDSym m_tagVErrMatrix
private

Error matrix of the tag side fit result.

Definition at line 113 of file TagVertexModule.h.

◆ m_tagVl

double m_tagVl
private

tagV component in the boost direction

Definition at line 130 of file TagVertexModule.h.

◆ m_tagVlErr

double m_tagVlErr
private

Error of the tagV component in the boost direction.

Definition at line 132 of file TagVertexModule.h.

◆ m_tagVNDF

double m_tagVNDF
private

Number of degrees of freedom in the tag vertex fit.

Definition at line 136 of file TagVertexModule.h.

◆ m_tagVol

double m_tagVol
private

tagV component in the direction orthogonal to the boost

Definition at line 133 of file TagVertexModule.h.

◆ m_tagVolErr

double m_tagVolErr
private

Error of the tagV component in the direction orthogonal to the boost.

Definition at line 135 of file TagVertexModule.h.

◆ m_trackFindingType

std::string m_trackFindingType
private

Choose how to find the tag tracks: standard, standard_PXD.

Definition at line 92 of file TagVertexModule.h.

◆ m_truthTagVl

double m_truthTagVl
private

MC tagV component in the boost direction.

Definition at line 131 of file TagVertexModule.h.

◆ m_truthTagVol

double m_truthTagVol
private

MC tagV component in the direction orthogonal to the boost.

Definition at line 134 of file TagVertexModule.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 508 of file Module.h.

◆ m_useMCassociation

std::string m_useMCassociation
private

No MC association or standard Breco particle or internal MCparticle association.

Definition at line 89 of file TagVertexModule.h.

◆ m_useRollBack

bool m_useRollBack
private

Set to true if the tag fit is to be made with the tag track position rolled back to mother B.

Definition at line 106 of file TagVertexModule.h.

◆ m_useTruthInFit

bool m_useTruthInFit
private

Set to true if the tag fit is to be made with the TRUE tag track momentum and position.

Definition at line 101 of file TagVertexModule.h.

◆ m_verArray

StoreArray<TagVertex> m_verArray
private

StoreArray of TagVertexes.

Definition at line 83 of file TagVertexModule.h.

◆ m_verbose

bool m_verbose
private

choose if you want to print extra infos

Definition at line 141 of file TagVertexModule.h.


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