11 #include <framework/core/Module.h>
12 #include <framework/datastore/StoreObjPtr.h>
13 #include <framework/dataobjects/EventMetaData.h>
14 #include <framework/logging/LogConfig.h>
15 #include <framework/datastore/StoreArray.h>
16 #include <framework/gearbox/Const.h>
17 #include <framework/database/DBObjPtr.h>
19 #include <analysis/dataobjects/Particle.h>
20 #include <analysis/dataobjects/ParticleList.h>
21 #include <analysis/VariableManager/Manager.h>
22 #include <analysis/VariableManager/Utility.h>
23 #include <analysis/DecayDescriptor/DecayDescriptor.h>
24 #include <analysis/dbobjects/PIDDetectorWeights.h>
47 DetSurfCylBoundaries(
float rho,
float zfwd,
float zbwd,
float th_fwd,
float th_fwd_brl,
float th_bwd_brl,
float th_bwd)
99 void event()
override;
160 {
"CDC", {0, 1, 2, 3, 4, 5, 6, 7, 8}},
297 if (detName ==
"CDC")
return Const::CDC;
298 else if (detName ==
"TOP")
return Const::TOP;
299 else if (detName ==
"ARICH")
return Const::ARICH;
300 else if (detName ==
"ECL")
return Const::ECL;
301 else if (detName ==
"KLM")
return Const::KLM;
302 else B2FATAL(
"Unknown detector component: " << detName);
EDetector
Enum for identifying the detector components (detector and subdetector).
static std::string parseDetectors(EDetector det)
Converts Const::EDetector object to string.
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
Simple class to encapsulate a detector surface's boundaries in cylindrical coordinates.
DetSurfCylBoundaries()
Default constructor.
DetSurfCylBoundaries(float rho, float zfwd, float zbwd, float th_fwd, float th_fwd_brl, float th_bwd_brl, float th_bwd)
Constructor with parameters.
float m_zfwd
Inner surface z fwd [cm].
float m_th_fwd_brl
fwd/barrel separation theta [rad]
float m_th_fwd
Lower theta edge of fwd region [rad].
float m_th_bwd_brl
bwd/barrel separation theta [rad]
float m_zbwd
Inner surface z bwd [cm].
float m_rho
Inner surface radius [cm].
float m_th_bwd
Upper theta edge of bwd region [rad].
Class to store reconstructed particles.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
Calculate track isolation variables on the input ParticleList.
StoreObjPtr< EventMetaData > m_event_metadata
The event information.
std::unique_ptr< DBObjPtr< PIDDetectorWeights > > m_DBWeights
Interface to get the database payload with the PID detector weights.
std::unordered_map< std::string, std::vector< int > > m_detToLayers
Map that associates to each detector its list of valid layers.
~TrackIsoCalculatorModule() override
Destructor, use this to clean up anything you created in the constructor.
void initialize() override
Use this to initialize resources or memory your module needs.
double getDistAtDetSurface(const Particle *iParticle, const Particle *jParticle, const std::string &detLayerName) const
Calculate the distance between the points where the two input extrapolated track helices cross the gi...
void event() override
Called once for each event.
std::unordered_map< std::string, std::string > m_detLayerToDistVariable
Map that associates to each detector layer the name of the variable representing the distance to the ...
std::string m_decayString
The name of the input charged stable particle list, or composite particle w/ charged stable daughters...
StoreObjPtr< ParticleList > m_pListTarget
The input ParticleList object for which distances are to be calculated.
std::string m_isoScoreVariable
The name of the variable representing the track isolation score in this detector.
StoreArray< Particle > m_particles
StoreArray of Particles.
std::string m_payloadName
The name of the database payload object with the MVA weights.
Const::EDetector getDetEnum(const std::string &detName) const
Get the enum type for this detector name.
std::string m_detName
The name of the detector at whose inner (cylindrical) surface we extrapolate each track's polar and a...
std::string m_pListReferenceName
The name of the input ParticleList of reference tracks.
std::unordered_map< std::string, std::string > m_detLayerToRefPartIdxVariable
Map that associates to each detector layer the name of the variable representing the mdst array index...
double getDistThreshold(Const::EDetector det, int layer) const
Get the threshold value per detctor layer for the distance to closest ext.
bool onlySelectedStdChargedInDecay()
Check whether input particle list and reference list are of a valid charged stable particle.
std::map< std::pair< std::string, int >, double > m_distThreshPerDetLayer
Threshold values for the distance (in [cm]) to closest ext.
bool m_excludePIDDetWeights
Exclude the PID detector weights for the isolation score definition.
double getIsoScore(const Particle *iParticle) const
Define a semi-continuous variable to quantify the isolation of a standard charged particle in the giv...
DecayDescriptor m_decaydescriptor
< Decay descriptor of decays to look for.
std::unordered_map< std::string, DetSurfCylBoundaries > m_detLayerToSurfBoundaries
Map that associates to each detector layer its valid cylindrical surface's boundaries.
TrackIsoCalculatorModule()
Constructor: Sets the description, the properties and the parameters of the module.
unsigned int m_nLayers
The number of layers for the input detector.
unsigned short m_nSelectedDaughters
The number of selected daughters in the decay string.
StoreObjPtr< ParticleList > m_pListReference
The input ParticleList object of reference tracks.
bool m_useHighestProbMassForExt
If this option is set, the helix extrapolation for the target and reference particles will use the tr...
Abstract base class for different kinds of events.