9#include <analysis/modules/TrackFitResultEstimator/TrackFitResultEstimator.h>
11#include <framework/datastore/RelationArray.h>
12#include <framework/geometry/BFieldManager.h>
14#include <analysis/DecayDescriptor/DecayDescriptor.h>
15#include <analysis/ClusterUtility/ClusterUtils.h>
17#include <TDatabasePDG.h>
18#include <Math/Vector3D.h>
22using namespace ROOT::Math;
37Create a TrackFitResult from the momentum of the Particle assuming it originates from the IP and make a relation between them. The
38covariance, detector hit information, and fit-related information (pValue, NDF) are assigned meaningless values. The input
39Particles must not have already Track or TrackFitResult and thus are supposed to be composite particles, recoil, dummy particles,
40and so on. Since the source type is not overwritten as Track, not all track-related variables are guaranteed to be available.
45 "The name of input ParticleList.",
57 if (abs(TDatabasePDG::Instance()->GetParticle(pdg)->Charge()) > 3)
58 B2WARNING(
"The absolute value of charge of input ParticleList is grater than 1. Helix requires abs(charge) <= 1. "
59 "The sign of charge will be used instead.");
68 TMatrixDSym dummyCovariance(6);
69 for (
int row = 0; row < 6; ++row) {
70 dummyCovariance(row, row) = 10000;
73 XYZVector position(0,0,0);
83 B2ERROR(
"Particle is already related to the Track or TrackFitResult object.");
87 charge = charge / abs(charge);
static ROOT::Math::XYZVector getFieldInTesla(const ROOT::Math::XYZVector &pos)
return the magnetic field at a given position in Tesla.
The ParticleType class for identifying different particle types.
int getPDGCode() const
Return PDG code.
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
const DecayDescriptorParticle * getMother() const
return mother.
void setDescription(const std::string &description)
Sets the description of the module.
Class to store reconstructed particles.
const Track * getTrack() const
Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Trac...
int getPDGCode(void) const
Returns PDG code.
double getCharge(void) const
Returns particle charge.
ROOT::Math::XYZVector getMomentum() const
Returns momentum vector.
const TrackFitResult * getTrackFitResult() const
Returns the pointer to the TrackFitResult that was used to create this Particle (ParticleType == c_Tr...
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
StoreArray< TrackFitResult > m_trackfitresults
StoreArray of TrackFitResult objects.
virtual void initialize() override
Initialize the Module.
TrackFitResultEstimatorModule()
Constructor.
virtual void event() override
Event processor.
StoreArray< Particle > m_particles
StoreArray of Particle objects.
DBObjPtr< BeamSpot > m_beamSpotDB
Beam spot database object.
StoreObjPtr< ParticleList > m_inputparticleList
StoreObjptr for input charged ParticleList.
std::string m_inputListName
The name of input ParticleList.
Values of the result of a track fit with a given particle hypothesis.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.