Belle II Software  release-05-02-19
analysis modules
Collaboration diagram for analysis modules:

Classes

class  AllParticleCombinerModule
 This module combines all particles of the provided list to one mother particle. More...
 
class  AnalysisConfigurationModule
 Class to hold general basf2 configuration Used to intiate and configure CreateAnalysis object. More...
 
class  BestCandidateSelectionModule
 Selects Particles with the highest values of 'variable' in the input list and removes all other particles from the list. More...
 
class  BelleBremRecoveryModule
 Brem recovery module (used in past belle analyses) This module add four vector of all the brem photon to the four vector associated to the charged particle. More...
 
class  BremsFinderModule
 Bremsstrahlung finder correction module For each lepton in the input particle list, this module copies it to the output particle list and uses the results of the eclTrackBremFinder module to look for a possible bremsstrahlung photon; if this photon exists, adds its four momentum to the leptons in the output list. More...
 
class  BtubeCreatorModule
 Create a B particle from a Bbar particle. More...
 
class  ChargedPidMVAModule
 This module evaluates the response of an MVA trained for binary charged particle identification between two hypotheses, S and B. More...
 
class  ChargedPidMVAMulticlassModule
 This module evaluates the response of a multi-class MVA trained for global charged particle identification. More...
 
class  ContinuumSuppressionBuilderModule
 Creates for each Particle in given ParticleList an ContinuumSuppression dataobject and makes BASF2 relation between them. More...
 
class  CurlTaggerModule
 This module is designed to tag curl tracks. More...
 
class  DistanceCalculatorModule
 Calculates distance between two vertices, distance of closest approach between a vertex and a track, distance of closest approach between a vertex and Btube. More...
 
class  DuplicateVertexMarkerModule
 Identify duplicate vertices (distinct particles, but built from the same daughters) and mark the one with best chi2.Only works if the particle has exactly two daughters. More...
 
class  EventKinematicsModule
 Module to compute global quantities related to the event kinematics, like total missing energy and mass2, visible energy, etc. More...
 
class  EventShapeCalculatorModule
 Module to compute event shape variables starting from three lists of particle objects (tracks, gammas, Klongs). More...
 
class  ExtraInfoPrinterModule
 Prints the names of the ExtraInfos for a ParticleList or for the Event. More...
 
class  ExtraInfoRemoverModule
 This module deletes the extrainfo of each particle in the given ParticleLists. More...
 
class  FixECLClustersModule
 Sets ConnectedRegionID and ClusterID to ECLClusters on MC samples with old ECLCluster design. More...
 
class  FlavorTaggerInfoBuilderModule
 Creates for each Particle and RestOfEvent object in the DataStore a FlavorTaggerInfo dataobject and makes BASF2 relation between them. More...
 
class  FlavorTaggerInfoFillerModule
 Creates a new flavorTaggerInfoMap DataObject for the specific methods. More...
 
class  InclusiveBtagReconstructionModule
 Inclusively reconstructs anti-B:tag from input ParticleLists for given B:sig. More...
 
class  Map2Vector
 Helper class to make a vector of all possible combinations of int numbers contained in the input vectors (passed as values in a map). More...
 
class  InclusiveDstarReconstructionModule
 Inclusive D* reconstruction module. More...
 
class  KlongDecayReconstructorExpertModule
 reco missing module More...
 
class  KlongMomentumCalculatorExpertModule
 reco missing module More...
 
class  DecayTree< T >
 This is a helper class for the MCDecayFinderModule. More...
 
class  MCDecayFinderModule
 Find decays in MCParticle list matching a given DecayString. More...
 
class  MCMatcherParticlesModule
 MC matching module: module performs MC matching (sets the relation Particle -> MCParticle) for all particles and its (grand)^N-daughter particles in the user-specified ParticleList. More...
 
class  OnlyWriteOutParticleListsModule
 Marks all objects in DataStore except those of type ParticleList as WrtieOut=False. More...
 
class  ParticleCombinerModule
 particle combiner module More...
 
class  ParticleCombinerFromMCModule
 particle combiner module More...
 
class  ParticleCopierModule
 Module for creating copies of Particles. More...
 
class  ParticleListManipulatorModule
 Module for copying Particles (actually their indices) from two or more ParticleLists(s) to another ParticleList. More...
 
class  ParticleLoaderModule
 Loads MDST dataobjects as Particle objects to the StoreArray<Particle> and collects them in specified ParticleList. More...
 
class  ParticleMassUpdaterModule
 This module replaces the mass of the particles inside the given particleLists with the invariant mass of the particle corresponding to the given pdgCode. More...
 
class  ParticleMCDecayStringModule
 Adds the Monte Carlo decay string to a Particle. More...
 
class  ParticlePrinterModule
 prints particle list to screen More...
 
class  ParticleSelectorModule
 Loops over all Particles in the ParticleList and removes those Particles from the ParticleList that do not pass given selection criteria. More...
 
class  ParticleStatsModule
 This module summarises the ParticleLists in the event. More...
 
class  ParticleVertexFitterModule
 Vertex fitter module. More...
 
class  ParticleWeightingModule
 Module to apply weights from the database to particles and store added info in ExtraInfo. More...
 
class  ParticleWeightingLookUpCreatorModule
 Module that creates LookUpTable and upload it to the DB. More...
 
class  PrintMCParticlesModule
 The PrintMCParticles module. More...
 
class  PseudoVertexFitterModule
 Pseudo Vertex fitter module. More...
 
class  RemoveParticlesNotInListsModule
 Removes all Particles that are not in a given list of ParticleLists (or daughters of those). More...
 
class  RestOfEventBuilderModule
 Creates for each Particle in given ParticleList an RestOfEvent (ROE) dataobject and makes BASF2 relation between them. More...
 
class  RestOfEventInterpreterModule
 Creates a mask (vector of boolean values) for tracks and clusters in RestOfEvent regarding their usage. More...
 
class  RestOfEventPrinterModule
 prints ROE information and masks to screen More...
 
class  RestOfEventUpdaterModule
 Updates an existing mask (map of boolean values) for tracks or eclClusters in RestOfEvent with an available property (e.g. More...
 
class  SelectDaughtersModule
 Redefine (select) the daughters of a particle. More...
 
class  SignalSideParticleFilterModule
 The module returns true if the current RestOfEvent object is related to any of the Particles in the input ParticleLists. More...
 
class  SignalSideParticleListCreatorModule
 The module creates a ParticleList and fills it with one of the daughter Particles. More...
 
class  SignalSideVariablesToDaughterExtraInfoModule
 The module writes properties (values of specified variables) of the particle related to the current ROE as an ExtraInfo to the single particle in the input ParticleList. More...
 
class  SignalSideVariablesToExtraInfoModule
 The module writes property of single particle found in the input ParticleList as an ExtraInfo to the Particle related to the current ROE. More...
 
class  SkimFilterModule
 This module filters events based on presence of candidates in a list of ParticleLists. More...
 
class  TagUniqueSignalModule
 Loops through the particle list finds a unique signal candidate for each event. More...
 
class  TagVertexModule
 Tag side Vertex Fitter module for modular analysis. More...
 
struct  ParticleAndWeight
 this struct is used to store and sort the tag tracks More...
 
class  TauDecayMarkerModule
 Module to identify generated tau pair decays, using MCParticle information. More...
 
class  TrackingEfficiencyModule
 This set of module is designed for tracking systematics studies. More...
 
class  TrackingMomentumModule
 Tracking momentum systematics. More...
 
class  TreeFitterModule
 Module to fit an entire decay tree. More...
 
class  V0DaughterMassUpdaterModule
 This module replaces the mass of two daughters of the selected V0 particles inside the given particleLists with masses of given pdgCode. More...
 
class  VariablesToEventBasedTreeModule
 Module to calculate variables specified by the user for a given ParticleList and save them into a TTree. More...
 
class  VariablesToEventExtraInfoModule
 For each particle in the input list the selected variables are saved in an event-extra-info field with the given name, Can be used to save MC truth information, for example, in a ntuple of reconstructed particles. More...
 
class  VariablesToExtraInfoModule
 For each particle in the input list the selected variables are saved in an extra-info field with the given name, Can be used when wanting to save variables before modifying them, e.g. More...
 
class  VariablesToHistogramModule
 Module to calculate variables specified by the user for a given ParticleList and save them into an Histogram. More...
 
class  VariablesToNtupleModule
 Module to calculate variables specified by the user for a given ParticleList and save them into a ROOT TTree. More...
 
class  VariableToReturnValueModule
 Module to calculate variable specified by the user and set return value accordingly. More...
 

Typedefs

typedef std::tuple< double, double > BinLimitsTuple
 Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable entries with tuples and transform tuples to pairs here. More...
 
typedef std::map< std::string, BinLimitsTupleNDBinTuple
 the NDimensional tuple of bin limits
 
typedef std::tuple< WeightInfo, NDBinTuplenoIdEntry
 the ID
 
typedef std::tuple< noIdEntry, double > specificIDEntry
 the specific ID
 
typedef std::vector< noIdEntrylistOfNoIdEntries
 List of entries for table to be created from without specified ID.
 
typedef std::vector< specificIDEntrylistOfSpecificIDEntries
 List of entries for table to be created from with specified ID.
 

Functions

bool isFSP (int pdg)
 defines what is a final state particle for this purpose.
 
static const TVector3 vecNaN (realNaN, realNaN, realNaN)
 vector with NaN entries
 
static const TMatrixDSym matNaN (3,(double[]) { realNaN, realNaN, realNaN, realNaN, realNaN, realNaN, realNaN, realNaN, realNaN })
 3x3 matrix with NaN entries
 
static TLorentzVector flipVector (TLorentzVector vIn)
 
static double getProperLifeTime (const MCParticle *mc)
 proper life time, i.e. More...
 
 BelleBremRecoveryModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
 BremsFinderModule ()
 Constructor, for setting module description and parameters.
 
virtual void initialize () override
 Use this to initialize resources or memory your module needs. More...
 
virtual void event () override
 Called once for each event. More...
 
 KlongDecayReconstructorExpertModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
 KlongMomentumCalculatorExpertModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
 DecayTree ()
 Default constructor.
 
 DecayTree (T *obj)
 Constructor with decaying object (e.g. More...
 
 ~DecayTree ()
 Destructor.
 
std::vector< DecayTree< T > * > getDaughters ()
 Return list of decay daughters.
 
T * getObj ()
 Return the decaying object itself, e.g. More...
 
void setObj (T *obj)
 Set the decaying object, e.g. More...
 
void clear ()
 Frees memory occupied by m_myObject and the daughter objects.
 
void append (DecayTree< T > *t)
 Add a daughter, which is a DecayTree itself.
 
 MCMatcherParticlesModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
void setLooseMCMatch (const Particle *particle)
 Finds common mother of the majority of daughters. More...
 
 ParticleCombinerModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
 ParticleCombinerFromMCModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
void registerParticleRecursively (const DecayDescriptor &decaydescriptor)
 Register particles which have (sub-)decay recursively. More...
 
void combineRecursively (const DecayDescriptor &decaydescriptor)
 Combine particles which have (sub-)decay recursively. More...
 
 ParticleCopierModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
 ParticleListManipulatorModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
void fillUniqueIdentifier (const Particle *p, std::vector< int > &idSequence)
 Fills unique identifier for the input particle. More...
 
bool isUnique (const std::vector< int > &idSequence)
 Compares input idSequence to all sequences already included in the list. More...
 
 ParticleLoaderModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
virtual void terminate () override
 Terminate the Module. More...
 
void roeToParticles ()
 Loads ROE object as Particle of specified type to StoreArray<Particle> and adds it to the ParticleList.
 
void addROEToParticleList (RestOfEvent *roe, int pdgCode=0, bool isSelfConjugatedParticle=true)
 Helper method to load ROE object as Particle.
 
void v0sToParticles ()
 Loads V0 object as Particle of specified type to StoreArray<Particle> and adds it to the ParticleList.
 
void tracksToParticles ()
 Loads Track object as Particle to StoreArray<Particle> and adds it to the ParticleList.
 
void eclClustersToParticles ()
 Loads ECLCluster object as Particle to StoreArray<Particle> and adds it to the ParticleList.
 
void klmClustersToParticles ()
 Loads KLMCluster object as Particle to StoreArray<Particle> and adds it to the ParticleList.
 
void mcParticlesToParticles ()
 Loads specified MCParticles as Particle to StoreArray<Particle>
 
bool isValidPDGCode (const int pdgCode)
 returns true if the PDG code determined from the decayString is valid
 
void appendDaughtersRecursive (Particle *mother)
 recursively append bottom of a particle's decay chain (daughters of mother, granddaughters of daughter and so on).
 
 ParticleMCDecayStringModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the module.
 
virtual void event () override
 Called for each event.
 
virtual void terminate () override
 Terminate modules.
 
const MCParticlegetInitialParticle (const MCParticle *mcP)
 search from mcP upwards for a particle that matches specified mother PDG codes.
 
std::string getDecayString (const Particle &p)
 get the decay string for p.
 
std::string getDecayStringFromParticle (const Particle *p)
 get decay string of particle
 
std::string getMCDecayStringFromParticle (const Particle *p)
 get mc decay string from particle
 
std::string getMCDecayStringFromMCParticle (const MCParticle *mcPMatched)
 get mc decay string from mc particle
 
std::string buildMCDecayString (const MCParticle *mcPMother, const MCParticle *mcPMatched)
 return decay string for mcPMother, highlight mcPMatched.
 
void convertToConciseString (std::string &string)
 Convert the extended string to a more concise format.
 
 ParticlePrinterModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
void printVariables (const Particle *particle) const
 Prints out the values of variables specified by the user via the Variables module parameter.
 
 ParticleSelectorModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
 ParticleVertexFitterModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
bool doVertexFit (Particle *p)
 Main steering routine. More...
 
bool fillFitParticles (const Particle *mother, std::vector< const Particle * > &fitChildren, std::vector< const Particle * > &pi0Children)
 Fills valid particle's children (with valid error matrix) in the vector of Particles that will enter the fit. More...
 
bool redoPi0MassFit (Particle *pi0Temp, const Particle *pi0Orig, const analysis::VertexFitKFit &kv)
 Performs mass refit of pi0 assuming that pi0 originates from the point given by VertexFit.
 
bool doKVertexFit (Particle *p, bool ipProfileConstraint, bool ipTubeConstraint)
 Unconstrained vertex fit using KFit. More...
 
bool doKMassVertexFit (Particle *p)
 Mass-constrained vertex fit using KFit. More...
 
bool doKMassPointingVertexFit (Particle *p)
 Mass-constrained vertex fit with additional pointing constraint using KFit. More...
 
bool doKMassFit (Particle *p)
 Mass fit using KFit. More...
 
bool doKFourCFit (Particle *p)
 FourC fit using KFit. More...
 
bool makeKVertexMother (analysis::VertexFitKFit &kv, Particle *p)
 Update mother particle after unconstrained vertex fit using KFit. More...
 
bool makeKMassVertexMother (analysis::MassVertexFitKFit &kv, Particle *p)
 Update mother particle after mass-constrained vertex fit using KFit. More...
 
bool makeKMassPointingVertexMother (analysis::MassPointingVertexFitKFit &kv, Particle *p)
 Update mother particle after mass-constrained vertex fit with additional pointing constraint using KFit. More...
 
bool makeKMassMother (analysis::MassFitKFit &kv, Particle *p)
 Update mother particle after mass fit using KFit. More...
 
bool makeKFourCMother (analysis::FourCFitKFit &kv, Particle *p)
 Update mother particle after FourC fit using KFit. More...
 
void updateMapOfTrackAndDaughter (unsigned &l, std::vector< std::vector< unsigned >> &pars, std::vector< unsigned > &pard, std::vector< Particle * > &allparticles, const Particle *daughter)
 update the map of daughter and tracks, find out which tracks belong to each daughter. More...
 
bool doRaveFit (Particle *mother)
 Fit using Rave. More...
 
bool allSelectedDaughters (const Particle *mother, const std::vector< const Particle * > &tracksVertex)
 check if all the Daughters (o grand-daughters) are selected for the vertex fit
 
bool addChildofParticletoKFit (analysis::FourCFitKFit &kv, const Particle *particle)
 Adds given particle's child to the FourCFitKFit. More...
 
void addIPProfileToKFit (analysis::VertexFitKFit &kv)
 Adds IPProfile constraint to the vertex fit using KFit.
 
void addIPTubeToKFit (analysis::VertexFitKFit &kv)
 Adds IPTube constraint to the vertex fit using KFit.
 
void findConstraintBoost (double cut)
 calculate iptube constraint (quasi cylinder along boost direction) for RAVE fit
 
void smearBeamSpot (double width)
 smear beam spot covariance
 
 ParticleWeightingModule ()
 Constructor.
 
WeightInfo getInfo (const Particle *p)
 Get LookUp information for the particle. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processing by the module. More...
 
 ParticleWeightingLookUpCreatorModule ()
 Constructor.
 
NDBin NDBinTupleToNDBin (const NDBinTuple &bin_tuple)
 Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable entries with tuples and transform tuples to pairs here. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void terminate () override
 Clean up anything created in initialize().
 
 PseudoVertexFitterModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
bool add_matrix (Particle *p)
 Main steering routine. More...
 
 RestOfEventInterpreterModule ()
 Constructor: Sets the description, the properties and the parameters of the module.
 
virtual void initialize () override
 Overriden initialize method.
 
virtual void event () override
 Overriden event method.
 
 RestOfEventPrinterModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
void printMaskParticles (const std::vector< const Particle * > &maskParticles) const
 Prints out values of the specific ROE mask.
 
 RestOfEventUpdaterModule ()
 Constructor: Sets the description, the properties and the parameters of the module.
 
virtual void initialize () override
 Overriden initialize method.
 
virtual void event () override
 Overriden event method.
 
void updateMasksWithV0 (const StoreObjPtr< RestOfEvent > &roe, std::vector< const Particle * > &particlesToUpdate)
 Update ROE masks with provided composite particle collection. More...
 
void updateMasksWithParticles (const StoreObjPtr< RestOfEvent > &roe, std::vector< const Particle * > &particlesToUpdate, Particle::EParticleSourceObject listType)
 Update ROE masks by excluding or keeping particles. More...
 
 TagVertexModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
bool doVertexFit (const Particle *Breco)
 central method for the tag side vertex fit
 
std::pair< TVector3, TMatrixDSym > findConstraint (const Particle *Breco, double cut) const
 calculate the constraint for the vertex fit on the tag side using Breco information
 
std::pair< TVector3, 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
 
std::pair< TVector3, TMatrixDSym > findConstraintBoost (double cut, double shiftAlongBoost=-2000.) const
 calculate the standard constraint for the vertex fit on the tag side
 
void BtagMCVertex (const Particle *Breco)
 get the vertex of the MC B particle associated to Btag. More...
 
static bool compBrecoBgen (const Particle *Breco, const MCParticle *Bgen)
 compare Breco with the two MC B particles
 
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
 
std::vector< ParticleAndWeightgetParticlesWithoutKS (const std::vector< const Particle * > &tagParticles, double massWindowWidth=0.01) const
 Get a list of pions from a list of pions removing the Kshorts Warning: this assumes all the particles are pions, which is fine are all the particles are reconstructed as pions in the TagV module.
 
bool makeGeneralFit ()
 TO DO: tag side vertex fit in the case of semileptonic tag side decay. More...
 
void fillParticles (std::vector< ParticleAndWeight > &particleAndWeights)
 Fill sorted list of particles into external variable.
 
void fillTagVinfo (const TVector3 &tagVpos, const TMatrixDSym &tagVposErr)
 Fill tagV vertex info.
 
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
 
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
 
ParticledoVertexFitForBTube (const Particle *mother, std::string fitType) const
 it returns an intersection between B rec and beam spot (= origin of BTube)
 
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.
 
static TVector3 getTruePoca (ParticleAndWeight const &paw)
 This finds the point on the true particle trajectory closest to the measured track position.
 
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.
 
TVector3 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.
 
void resetReturnParams ()
 Reset all parameters that are computed in each event and then used to compute tuple variables.
 
static std::string printVector (const TVector3 &vec)
 Print a TVector3 (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)
 

Variables

static const double realNaN = std::numeric_limits<double>::quiet_NaN()
 shortcut for NaN of double type
 

Detailed Description

Typedef Documentation

โ—† BinLimitsTuple

typedef std::tuple<double, double> BinLimitsTuple

Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable entries with tuples and transform tuples to pairs here.

the tuple of bin limits

Definition at line 37 of file ParticleWeightingLookUpCreatorModule.h.

Function Documentation

โ—† add_matrix()

bool add_matrix ( Particle p)
private

Main steering routine.

Parameters
ppointer to particle
Returns
true for successfully adding the covariance matrix

Definition at line 74 of file PseudoVertexFitterModule.cc.

75  {
76  // steering starts here
77  if (mother->getNDaughters() < 2) return false;
78 
79  bool ok = false;
80 
81  const std::vector<Particle*> daughters = mother->getDaughters();
82  std::vector<TMatrixFSym> daughter_matrices;
83  daughter_matrices.reserve(daughters.size());
84  for (auto daughter : daughters) {
85  daughter_matrices.push_back(daughter->getMomentumVertexErrorMatrix());
86  }
87 
88  TMatrixFSym mother_errMatrix(7);
89  for (int i = 0; i < 7; i++) {
90  for (int j = 0; j < 7; j++) {
91  for (unsigned int k = 0; k < daughters.size(); k++) {
92  mother_errMatrix[i][j] += daughter_matrices[k][i][j];
93  }
94  }
95  }
96 
97  mother->setMomentumVertexErrorMatrix(mother_errMatrix);
98  if (mother->getMomentumVertexErrorMatrix() == mother_errMatrix) {
99  ok = true;
100  }
101  if (!ok) return false;
102  return true;
103  }

โ—† addChildofParticletoKFit()

bool addChildofParticletoKFit ( analysis::FourCFitKFit kv,
const Particle particle 
)
private

Adds given particle's child to the FourCFitKFit.

Parameters
kvreference to KFit FourCFit object
particlepointer to particle

Definition at line 1032 of file ParticleVertexFitterModule.cc.

1033  {
1034  for (unsigned ichild = 0; ichild < particle->getNDaughters(); ichild++) {
1035  const Particle* child = particle->getDaughter(ichild);
1036  if (child->getNDaughters() > 0) addChildofParticletoKFit(kf, child);
1037  else {
1038  if (child->getPValue() < 0) return false; // error matrix not valid
1039 
1040  kf.addParticle(child);
1041  }
1042  }
1043  return true;
1044  }

โ—† beginRun() [1/2]

void beginRun ( )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 105 of file ParticleVertexFitterModule.cc.

โ—† beginRun() [2/2]

void beginRun ( )
overridevirtual

Called when entering a new run.

Set run dependent things

Reimplemented from Module.

Definition at line 158 of file TagVertexModule.cc.

159  {
160  //TODO: set magnetic field for each run
161  //m_Bfield = BFieldMap::Instance().getBField(m_BeamSpotCenter).Z();
162  }

โ—† BtagMCVertex()

void BtagMCVertex ( const Particle Breco)
private

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

It works anly with signal MC

Definition at line 543 of file TagVertexModule.cc.

โ—† combineRecursively()

void combineRecursively ( const DecayDescriptor decaydescriptor)

Combine particles which have (sub-)decay recursively.

The function is called in event().

Definition at line 175 of file ParticleCombinerFromMCModule.cc.

176  {
177  // Mother particle
178  const DecayDescriptorParticle* mother = decaydescriptor.getMother();
179  int pdgCode = mother->getPDGCode();
180  std::string listName = mother->getFullName();
181  std::string antiListName = ParticleListName::antiParticleListName(listName);
182  bool isSelfConjugatedParticle = (listName == antiListName);
183 
184  StoreArray<Particle> particles;
185 
186  StoreObjPtr<ParticleList> outputList(listName);
187  outputList.create();
188  outputList->initialize(pdgCode, listName);
189 
190  if (!isSelfConjugatedParticle && m_chargeConjugation) {
191  StoreObjPtr<ParticleList> outputAntiList(antiListName);
192  outputAntiList.create();
193  outputAntiList->initialize(-1 * pdgCode, antiListName);
194 
195  outputList->bindAntiParticleList(*(outputAntiList));
196  }
197 
198  unsigned int numberOfLists = decaydescriptor.getNDaughters();
199 
200  for (unsigned int i = 0; i < numberOfLists; ++i) {
201  const DecayDescriptor* dDaughter = decaydescriptor.getDaughter(i);
202 
203  if (dDaughter->getNDaughters() == 0) {
204  // if daughter does not have daughters, check if it is not reconstructed particle.
205  const DecayDescriptorParticle* daughter = decaydescriptor.getDaughter(i)->getMother();
206  StoreObjPtr<ParticleList> plist(daughter->getFullName());
207  // if daughter is not created, returns error
208  if (!plist.isValid())
209  B2ERROR(daughter->getFullName() << " is not created");
210  // if daughter contains reconstructed particles, returns error.
211  unsigned nPart = plist->getListSize();
212  for (unsigned iPart = 0; iPart < nPart; iPart++) {
213  const Particle* part = plist->getParticle(iPart);
214  Particle::EParticleSourceObject particleType = part->getParticleSource();
215  if (particleType == Particle::c_Track or
216  particleType == Particle::c_ECLCluster or
217  particleType == Particle::c_KLMCluster)
218  B2ERROR(daughter->getFullName() << " contains a reconstructed particle! It is not accepted in ParticleCombinerFromMCModule!");
219  }
220  // if not, do nothing.
221  } else {
222  // if daughter has daughter, call the function recursively
223  combineRecursively(*dDaughter);
224  }
225  }
226 
227  // initialize the generator
228  m_generator = std::make_unique<ParticleGenerator>(decaydescriptor, "");
229  m_generator->init();
230 
231  while (m_generator->loadNext(m_chargeConjugation)) {
232  Particle&& particle = m_generator->getCurrentParticle();
233 
234  Particle* newParticle = particles.appendNew(particle);
235  // append to the created particle the user specified decay mode ID
236  newParticle->addExtraInfo("decayModeID", m_decayModeID);
237 
238  int iparticle = particles.getEntries() - 1;
239  outputList->addParticle(iparticle, particle.getPDGCode(), particle.getFlavorType());
240  }
241 
242  // select only signal particles
243  std::unique_ptr<Variable::Cut> cutIsSignal = Variable::Cut::compile("isSignal");
244 
245  std::vector<unsigned int> toRemove;
246  unsigned int n = outputList->getListSize();
247  for (unsigned i = 0; i < n; i++) {
248  const Particle* part = outputList->getParticle(i);
249 
252 
253  if (!cutIsSignal->check(part)) toRemove.push_back(part->getArrayIndex());
254  }
255  outputList->removeParticles(toRemove);
256 
257  }

โ—† DecayTree()

DecayTree ( T *  obj)
explicit

Constructor with decaying object (e.g.

MCParticle) provided.

Definition at line 59 of file DecayTree.h.

โ—† doKFourCFit()

bool doKFourCFit ( Particle p)
private

FourC fit using KFit.

Parameters
ppointer to particle
Returns
true for successful fit

Definition at line 611 of file ParticleVertexFitterModule.cc.

โ—† doKMassFit()

bool doKMassFit ( Particle p)
private

Mass fit using KFit.

Parameters
ppointer to particle
Returns
true for successful fit

Definition at line 584 of file ParticleVertexFitterModule.cc.

โ—† doKMassPointingVertexFit()

bool doKMassPointingVertexFit ( Particle p)
private

Mass-constrained vertex fit with additional pointing constraint using KFit.

Parameters
ppointer to particle
Returns
true for successful fit

Definition at line 539 of file ParticleVertexFitterModule.cc.

โ—† doKMassVertexFit()

bool doKMassVertexFit ( Particle p)
private

Mass-constrained vertex fit using KFit.

Parameters
ppointer to particle
Returns
true for successful fit

Definition at line 460 of file ParticleVertexFitterModule.cc.

โ—† doKVertexFit()

bool doKVertexFit ( Particle p,
bool  ipProfileConstraint,
bool  ipTubeConstraint 
)
private

Unconstrained vertex fit using KFit.

Parameters
ppointer to particle
Returns
true for successful fit

Definition at line 384 of file ParticleVertexFitterModule.cc.

โ—† doRaveFit()

bool doRaveFit ( Particle mother)
private

Fit using Rave.

Parameters
motherpointer to particle
Returns
true for successful fit and update of mother

Definition at line 853 of file ParticleVertexFitterModule.cc.

โ—† doVertexFit()

bool doVertexFit ( Particle p)
private

Main steering routine.

Parameters
ppointer to particle
Returns
true for successful fit and prob(chi^2,ndf) > m_confidenceLevel

Definition at line 193 of file ParticleVertexFitterModule.cc.

โ—† event() [1/2]

void event ( )
overridevirtual

Called once for each event.

This is most likely where your module will actually do anything.

Reimplemented from Module.

Definition at line 166 of file BremsFinderModule.cc.

167  {
168  StoreArray<Particle> particles;
169  StoreArray<MCParticle> mcParticles;
170 
171  RelationArray particlesToMCParticles(particles, mcParticles);
172 
173  // new output particle list
174  m_outputList.create();
176 
177  m_outputAntiList.create();
179  m_outputAntiList->bindAntiParticleList(*(m_outputList));
180 
181  // Number of photons (calculate it here only once)
182  const unsigned int nGamma = m_gammaList->getListSize();
183 
184  // Number of leptons (calculate it here only once)
185  const unsigned int nLep = m_inputList->getListSize();
186 
187  const std::string relationName = "Bremsstrahlung";
188 
189  //In the case of only one track per photon
190  if (m_usePhotonOnlyOnce) {
191  for (unsigned n = 0; n < nGamma; n++) {
192  Particle* gamma = m_gammaList->getParticle(n);
193  //Skip this if it the best match has already been asigned (pathological case: happens only if you use the same gamma list
194  //to correct more than once. Performance studies, in which the same list is used with different options, are an example
195  if (gamma->hasExtraInfo("bestMatchIndex")) continue;
196 
197  auto cluster = gamma->getECLCluster();
198  //Get the tracks related to each photon...
199  RelationVector<Track> relatedTracks = cluster->getRelationsTo<Track>("", relationName);
200  double bestWeight = m_maximumAcceptance;
201  unsigned bestMatchIndex = 0;
202  unsigned trkIndex = 0;
203  //Loop over the related tracks...
204  for (auto trk = relatedTracks.begin(); trk != relatedTracks.end(); trk++, trkIndex++) {
205  //... and over the input particles' tracks...
206  for (unsigned i = 0; i < nLep; i++) {
207  const Particle* lepton = m_inputList->getParticle(i);
208  auto leptonTrack = lepton->getTrack();
209  //... check that the particle track corresponds to the related track....
210  if (leptonTrack->getArrayIndex() == trk->getArrayIndex()) {
211  double weight = relatedTracks.weight(trkIndex);
212  if (weight < bestWeight) {
213  bestWeight = weight;
214  //... and only select the best match among the tracks in the input list
215  bestMatchIndex = trk->getArrayIndex();
216  }
217  break; //If the particle corresponding to the related track is found, break the loop over the particles and go for the next related track
218  }
219  }
220  }
221  //... finally, add the best match index as an extra info for the photon
222  gamma->addExtraInfo("bestMatchIndex", bestMatchIndex);
223  }
224  }
225 
226  // loop over charged particles, correct them and add them to the output list
227 
228  for (unsigned i = 0; i < nLep; i++) {
229  const Particle* lepton = m_inputList->getParticle(i);
230 
231  //Get the track of this lepton...
232  auto track = lepton->getTrack();
233 
234  //... and get the bremsstrahlung clusters related to this track
235  RelationVector<ECLCluster> bremClusters = track->getRelationsFrom<ECLCluster>("", relationName);
236 
237  std::vector<std::pair <double, Particle*> > selectedGammas;
238 
239  unsigned j = 0;
240  for (auto bremCluster = bremClusters.begin(); bremCluster != bremClusters.end(); bremCluster++, j++) {
241  double weight = bremClusters.weight(j);
242 
243  if (weight > m_maximumAcceptance) continue;
244 
245  for (unsigned k = 0; k < nGamma; k++) {
246 
247  Particle* gamma = m_gammaList->getParticle(k);
248  auto cluster = gamma->getECLCluster();
249 
250  if (bremCluster->getClusterId() == cluster->getClusterId()) {
251  if (m_usePhotonOnlyOnce) { //If only one track per photon should be used...
252  if (track->getArrayIndex() == static_cast<int>
253  (gamma->getExtraInfo("bestMatchIndex"))) //... check if this track is the best match ...
254  selectedGammas.push_back(std::make_pair(weight, gamma)); //... and if it is, add it to the selected gammas
255  } else {
256  selectedGammas.push_back(std::make_pair(weight, gamma));
257  }
258  }
259 
260  } // Closes for loop on gammas
261 
262  } // Closes for loop on brem clusters
263 
264  //The 4-momentum of the new lepton in the output particle list
265  TLorentzVector new4Vec = lepton->get4Vector();
266 
267  //Sort weight-particle pairs by weight. Smaller weights go first
268  std::sort(selectedGammas.begin(), selectedGammas.end());
269 
270  //Add to this 4-momentum those of the selected photon(s)
271  for (auto const& bremsPair : selectedGammas) {
272  Particle* g = bremsPair.second;
273  new4Vec += g->get4Vector();
274  if (! m_addMultiplePhotons) break; //stop after adding the first photon
275  }
276 
277  //Create the new particle with the 4-momentum calculated before
278  Particle correctedLepton(new4Vec, lepton->getPDGCode(), Particle::EFlavorType::c_Flavored, Particle::c_Track,
279  track->getArrayIndex());
280 
281  //And add the original lepton as its daughter
282  correctedLepton.appendDaughter(lepton, false);
283 
284  const TMatrixFSym& lepErrorMatrix = lepton->getMomentumVertexErrorMatrix();
285  TMatrixFSym corLepMatrix(lepErrorMatrix);
286 
287  double bremsGammaEnergySum = 0.0;
288  //Now, if there are any, add the brems photons as daughters as well. As before, we distinguish between the multiple and only one brems photon cases
289  int photonIndex = 0;
290  for (auto const& bremsPair : selectedGammas) {
291  //Add the weights as extra info of the mother
292  Particle* bremsGamma = bremsPair.second;
293  std::string extraInfoName = "bremsWeightWithPhoton" + std::to_string(photonIndex);
294  correctedLepton.addExtraInfo(extraInfoName, bremsPair.first);
295  photonIndex++;
296  bremsGammaEnergySum += Variable::eclClusterE(bremsGamma);
297 
298  const TMatrixFSym& gammaErrorMatrix = bremsGamma->getMomentumVertexErrorMatrix();
299  for (int irow = 0; irow <= 3; irow++) {
300  for (int icol = irow; icol <= 3; icol++) corLepMatrix(irow, icol) += gammaErrorMatrix(irow, icol);
301  }
302  correctedLepton.appendDaughter(bremsGamma, false);
303  B2DEBUG(10, "[BremsFinderModule] Found a bremsstrahlung gamma and added its 4-vector to the charged particle");
304  if (! m_addMultiplePhotons) break; //stop after adding the first photon
305  }
306 
307  correctedLepton.setMomentumVertexErrorMatrix(corLepMatrix);
308 
309  // add the info from original lepton to the new lepton
310  correctedLepton.setVertex(lepton->getVertex());
311  correctedLepton.setPValue(lepton->getPValue());
312  correctedLepton.addExtraInfo("bremsCorrected", float(selectedGammas.size() > 0));
313  correctedLepton.addExtraInfo("bremsCorrectedPhotonEnergy", bremsGammaEnergySum);
314 
315  // add the mc relation
316  Particle* newLepton = particles.appendNew(correctedLepton);
317  const MCParticle* mcLepton = lepton->getRelated<MCParticle>();
318  const PIDLikelihood* pid = lepton->getPIDLikelihood();
319 
320  if (pid) newLepton->addRelationTo(pid);
321 
322  if (mcLepton != nullptr) newLepton->addRelationTo(mcLepton);
323 
324  m_outputList->addParticle(newLepton);
325 
326  } //Closes for loop on leptons
327 
328  } //Close event()

โ—† event() [2/2]

void event ( )
overridevirtual

Event processing by the module.

This method is called once for each event.

Reimplemented from Module.

Definition at line 77 of file ParticleWeightingModule.cc.

78  {
79  if (!m_inputList) {
80  B2WARNING("Input list " << m_inputList.getName() << " was not created?");
81  return;
82  }
83  StoreArray<Particle> particles;
84  const unsigned int numParticles = m_inputList->getListSize();
85  for (unsigned int i = 0; i < numParticles; i++) {
86  const Particle* ppointer = m_inputList->getParticle(i);
87  double index = ppointer->getArrayIndex();
88  Particle* p = particles[index];
89  WeightInfo info = getInfo(p);
90  for (const auto& entry : info) {
91  p->addExtraInfo(m_tableName + "_" + entry.first, entry.second);
92  }
93  }
94  }

โ—† fillFitParticles()

bool fillFitParticles ( const Particle mother,
std::vector< const Particle * > &  fitChildren,
std::vector< const Particle * > &  pi0Children 
)
private

Fills valid particle's children (with valid error matrix) in the vector of Particles that will enter the fit.

Pi0 particles are treated separately so they are filled to another vector.

Definition at line 285 of file ParticleVertexFitterModule.cc.

โ—† fillUniqueIdentifier()

void fillUniqueIdentifier ( const Particle p,
std::vector< int > &  idSequence 
)
private

Fills unique identifier for the input particle.

The unique identifier is a sequence of pairs (PDG code of the particle, number of daughters if composite or mdstArrayIndex if final state particle) for all particles in the decay chain.

Example: B+ -> (anti-D0 -> K+ pi-) pi+ idSequence: (521, 2, -421, 2, 321, K+ mdstArrayIndex, -211, pi- mdstArrayIndex, 211, pi+ mdstArrayIndex)

Definition at line 203 of file ParticleListManipulatorModule.cc.

204  {
205  idSequence.push_back(p->getPDGCode());
206 
207  if (p->getNDaughters() == 0) {
208  idSequence.push_back(p->getMdstArrayIndex());
209  } else {
210  idSequence.push_back(p->getNDaughters());
211  auto daughters = p->getDaughters();
212  // sorting the daughters by their pdgCode to identify decay chains only differing by the order of their daughters
213  sort(daughters.begin(), daughters.end(), [](const auto a, const auto b) {
214  return a->getPDGCode() > b->getPDGCode();
215  });
216  // this is not FSP (go one level down)
217  for (const auto& daughter : daughters)
218  fillUniqueIdentifier(daughter, idSequence);
219  }
220  }

โ—† getInfo()

WeightInfo getInfo ( const Particle p)

Get LookUp information for the particle.

Parameters
pparticle
Returns
LookUp information (map: key - LookUp parameter; value - value of the parameter )

Definition at line 52 of file ParticleWeightingModule.cc.

โ—† getObj()

T * getObj

Return the decaying object itself, e.g.

an MCParticle.

Definition at line 78 of file DecayTree.h.

โ—† getProperLifeTime()

static double Belle2::getProperLifeTime ( const MCParticle mc)
static

proper life time, i.e.

in the rest system (in ps)

Definition at line 537 of file TagVertexModule.cc.

โ—† initialize() [1/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 45 of file PseudoVertexFitterModule.cc.

โ—† initialize() [2/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 59 of file RestOfEventPrinterModule.cc.

60  {
61  StoreArray<RestOfEvent>().isRequired();
62  }

โ—† initialize() [3/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 57 of file ParticlePrinterModule.cc.

58  {
59  if (!m_listName.empty()) {
60  StoreObjPtr<ParticleList> plist(m_listName);
61  plist.isRequired();
62 
63  // obtain the input and output particle lists from the decay string
64  bool valid = m_decaydescriptor.init(m_listName);
65  if (!valid)
66  B2ERROR("ParticlePrinterModule::initialize Invalid input DecayString: " << m_listName);
67 
68  int nProducts = m_decaydescriptor.getNDaughters();
69  if (nProducts > 0)
70  B2ERROR("ParticlePrinterModule::initialize Invalid input DecayString " << m_listName
71  << ". DecayString should not contain any daughters, only the mother particle.");
72  }
73  }

โ—† initialize() [4/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 70 of file KlongDecayReconstructorExpertModule.cc.

71  {
72  // clear everything, initialize private members
73  m_listName = "";
74  m_generator = nullptr;
75 
76  // obtain the input and output particle lists from the decay string
77  bool valid = m_decaydescriptor.init(m_decayString);
78  if (!valid)
79  B2ERROR("Invalid input DecayString: " << m_decayString);
80 
81  // Mother particle
82  const DecayDescriptorParticle* mother = m_decaydescriptor.getMother();
83 
84  m_pdgCode = mother->getPDGCode();
85  m_listName = mother->getFullName();
86 
89 
90  std::string newDecayString;
91  std::string kListName;
92  newDecayString = m_listName + " -> ";
93 
94  bool k_check = false;
95 
96  // Daughters
97  int nProducts = m_decaydescriptor.getNDaughters();
98  for (int i = 0; i < nProducts; ++i) {
99  const DecayDescriptorParticle* daughter = m_decaydescriptor.getDaughter(i)->getMother();
100  if (daughter->getPDGCode() != Const::Klong.getPDGCode()) {
101  StoreObjPtr<ParticleList>().isRequired(daughter->getFullName());
102  newDecayString = newDecayString + daughter->getFullName() + " ";
103  } else {
104  StoreObjPtr<ParticleList>().isRequired(daughter->getFullName() + m_recoList);
105  kListName = daughter->getFullName() + m_recoList;
106  k_check = true;
107  }
108  }
109 
110  if (!k_check)
111  B2FATAL("This module is meant to reconstruct decays with a K_L0 in the final state. There is no K_L0 in this decay!");
112  newDecayString = newDecayString + kListName;
113 
114  m_generator = std::make_unique<ParticleGenerator>(newDecayString, m_cutParameter);
115 
116  StoreObjPtr<ParticleList> particleList(m_listName);
118  particleList.registerInDataStore(flags);
120  StoreObjPtr<ParticleList> antiParticleList(m_antiListName);
121  antiParticleList.registerInDataStore(flags);
122  }
123 
125 
126  }

โ—† initialize() [5/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 70 of file KlongMomentumCalculatorExpertModule.cc.

71  {
72  // clear everything, initialize private members
73  m_pdgCode = 0;
74  m_listName = "";
76  m_generator = nullptr;
77 
78  // obtain the input and output particle lists from the decay string
79  bool valid = m_decaydescriptor.init(m_decayString);
80  if (!valid)
81  B2ERROR("Invalid input DecayString: " << m_decayString);
82 
83  // Mother particle
84  const DecayDescriptorParticle* mother = m_decaydescriptor.getMother();
85 
86  m_pdgCode = mother->getPDGCode();
87  m_listName = mother->getFullName();
88 
91 
93 
94  // Daughters
95  bool k_check = false;
96  int nProducts = m_decaydescriptor.getNDaughters();
97  for (int i = 0; i < nProducts; ++i) {
98  const DecayDescriptorParticle* daughter =
100  StoreObjPtr<ParticleList>().isRequired(daughter->getFullName());
101  if (daughter->getPDGCode() == Const::Klong.getPDGCode()) {
102  m_klistName = daughter->getFullName() + m_klistName;
103  k_check = true;
104  }
105  }
106 
107  if (!k_check)
108  B2FATAL("This module is meant to reconstruct decays with a K_L0 in the final state. There is no K_L0 in this decay!");
109 
110  m_generator = std::make_unique<ParticleGenerator>(m_decayString, m_cutParameter);
111 
112  StoreObjPtr<ParticleList> KparticleList(m_klistName);
114  KparticleList.registerInDataStore(flags);
115 
117 
118  }

โ—† initialize() [6/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 92 of file ParticleCombinerModule.cc.

93  {
94  // clear everything
95  m_pdgCode = 0;
96  m_listName = "";
97 
98  // obtain the input and output particle lists from the decay string
99  bool valid = m_decaydescriptor.init(m_decayString);
100  if (!valid)
101  B2ERROR("Invalid input DecayString: " << m_decayString);
102 
103  // Mother particle
104  const DecayDescriptorParticle* mother = m_decaydescriptor.getMother();
105 
106  m_pdgCode = mother->getPDGCode();
107  m_listName = mother->getFullName();
108 
111 
112  // Daughters
113  int nProducts = m_decaydescriptor.getNDaughters();
114  int daughtersNetCharge = 0;
115  for (int i = 0; i < nProducts; ++i) {
116  const DecayDescriptorParticle* daughter =
118  StoreObjPtr<ParticleList>().isRequired(daughter->getFullName());
119  int daughterPDGCode = daughter->getPDGCode();
120  if (m_recoilParticleType == 2 && i == 0) {
121  daughtersNetCharge -= EvtPDLUtil::charge(daughterPDGCode);
122  } else {
123  daughtersNetCharge += EvtPDLUtil::charge(daughterPDGCode);
124  }
125  }
126 
127  if (daughtersNetCharge != EvtPDLUtil::charge(m_pdgCode)) {
128  if (!m_allowChargeViolation) {
129  B2FATAL("Your decay string " << m_decayString << " violates electric charge conservation!\n"
130  "If you want to allow this you can set the argument 'allowChargeViolation' to True. Something like:\n"
131  "modularAnalysis.reconstructDecay(" << m_decayString << ", your_cuts, allowChargeViolation=True, path=mypath)");
132  }
133  B2WARNING("Your decay string " << m_decayString << " violates electric charge conservation!\n"
134  "Processing is continued assuming that you allowed this deliberately, e.g. for systematic studies etc.");
135  }
136 
137  m_generator = std::make_unique<ParticleGenerator>(m_decayString, m_cutParameter);
138 
139  StoreObjPtr<ParticleList> particleList(m_listName);
141  particleList.registerInDataStore(flags);
143  StoreObjPtr<ParticleList> antiParticleList(m_antiListName);
144  antiParticleList.registerInDataStore(flags);
145  }
146 
148  B2FATAL("Invalid recoil particle type = " << m_recoilParticleType <<
149  "! Valid values are 0 (not a recoil), 1 (recoiling against e+e- and daughters), 2 (daughter of a recoil)");
150  }

โ—† initialize() [7/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 75 of file ParticleCombinerFromMCModule.cc.

โ—† initialize() [8/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 56 of file ParticleSelectorModule.cc.

57  {
58  // obtain the input and output particle lists from the decay string
59  bool valid = m_decaydescriptor.init(m_decayString);
60  if (!valid)
61  B2ERROR("ParticleSelectorModule::initialize Invalid input DecayString: " << m_decayString);
62 
63  int nProducts = m_decaydescriptor.getNDaughters();
64  if (nProducts > 0)
65  B2ERROR("ParticleSelectorModule::initialize Invalid input DecayString " << m_decayString
66  << ". DecayString should not contain any daughters, only the mother particle.");
67 
68  // Mother particle
69  const DecayDescriptorParticle* mother = m_decaydescriptor.getMother();
70 
71  m_listName = mother->getFullName();
72 
73  StoreObjPtr<ParticleList> particleList(m_listName);
74  particleList.isRequired(m_listName);
75 
77 
78  B2INFO("ParticleSelector: " << m_listName);
79  B2INFO(" -> With cuts : " << m_cutParameter);
80  }

โ—† initialize() [9/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 79 of file BelleBremRecoveryModule.cc.

80  {
81  // check the validity of output ParticleList name
83  if (!valid)
84  B2ERROR("[BelleBremRecoveryModule] Invalid output ParticleList name: " << m_outputListName);
85 
86  // output particle
87  const DecayDescriptorParticle* mother = m_decaydescriptor.getMother();
88  m_pdgCode = mother->getPDGCode();
90 
91  // get existing particle lists
93  B2ERROR("[BelleBremRecoveryModule] Input and output particle list names are the same: " << m_inputListName);
94  } else if (!m_decaydescriptor.init(m_inputListName)) {
95  B2ERROR("[BelleBremRecoveryModule] Invalid input particle list name: " << m_inputListName);
96  } else {
98  }
99 
101  B2ERROR("[BelleBremRecoveryModule] Invalid gamma particle list name: " << m_gammaListName);
102  } else {
103  m_gammaList.isRequired(m_gammaListName);
104  }
105 
106  // make output list
108  m_outputparticleList.registerInDataStore(m_outputListName, flags);
109  m_outputAntiparticleList.registerInDataStore(m_outputAntiListName, flags);
110 
111  StoreArray<Particle> particles;
112  StoreArray<PIDLikelihood> pidlikelihoods;
113  particles.registerRelationTo(pidlikelihoods);
114  }

โ—† initialize() [10/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 61 of file ParticleCopierModule.cc.

62  {
63  // Input lists
64  for (const std::string& listName : m_inputListNames) {
65  StoreObjPtr<ParticleList>().isRequired(listName);
66  }
67  }

โ—† initialize() [11/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 78 of file ParticleListManipulatorModule.cc.

โ—† initialize() [12/18]

void initialize ( )
overridevirtual

Use this to initialize resources or memory your module needs.

Also register any outputs of your module (StoreArrays, RelationArrays, StoreObjPtrs) here, see the respective class documentation for details.

Reimplemented from Module.

Definition at line 120 of file BremsFinderModule.cc.

โ—† initialize() [13/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 69 of file ParticleWeightingModule.cc.

โ—† initialize() [14/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 82 of file ParticleVertexFitterModule.cc.

โ—† initialize() [15/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 128 of file TagVertexModule.cc.

โ—† initialize() [16/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 70 of file ParticleWeightingLookUpCreatorModule.cc.

71  {
72  ParticleWeightingLookUpTable table = ParticleWeightingLookUpTable();
73 
74  if (!m_outOfRangeWeight.empty()) {
75  table.defineOutOfRangeWeight(m_outOfRangeWeight);
76  }
77 
78  if (!m_tableIDNotSpec.empty() and m_tableIDSpec.empty()) {
79  for (auto entry : m_tableIDNotSpec) {
80  WeightInfo info = std::get<0>(entry);
81  NDBin bin = NDBinTupleToNDBin(std::get<1>(entry));
82  table.addEntry(info, bin);
83  }
84  } else if (!m_tableIDSpec.empty() and m_tableIDNotSpec.empty()) {
85  for (auto entry : m_tableIDSpec) {
86  noIdEntry noid = std::get<0>(entry);
87  double bin_id = std::get<1>(entry);
88  WeightInfo info = std::get<0>(noid);
89  NDBin bin = NDBinTupleToNDBin(std::get<1>(noid));
90  table.addEntry(info, bin, bin_id);
91  }
92  } else {
93  B2ERROR("Please define one table: with OR without specific bin IDs");
94  }
95 
96  if (!m_outOfRangeWeight.empty()) {
97  table.defineOutOfRangeWeight(m_outOfRangeWeight);
98  }
99  B2INFO("Printing LookUp table");
100  table.printParticleWeightingLookUpTable();
101 
103  importer.construct(table);
105 
106  }

โ—† initialize() [17/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 70 of file MCMatcherParticlesModule.cc.

71  {
72  // check that there are MCParticles: shout if not
73  if (!m_mcparticles.isValid()) {
74  B2WARNING("No MCParticles array found!"
75  << " This is obvously fine if you're analysing real data,"
76  << " but you have added the MCMatcher module to your path,"
77  << " did you mean to do this?");
78  return;
79  }
80 
81  // if we have MCParticles then continue with the initialisation
82  m_particles.isRequired();
84  m_plist.isRequired(m_listName);
85 
86  bool legacyAlgorithm = AnalysisConfiguration::instance()->useLegacyMCMatching();
87  B2INFO("MCMatcher module will search for Particle -> MCParticle associations for the ParticleList " << m_listName << ".");
88  if (legacyAlgorithm)
89  B2INFO(" - The MCMatcher will use legacy algorithm suitable for analysis of Belle MC or Belle II MC5.");
90  else
91  B2INFO(" - The MCMatcher will use default algorithm suitable for analysis of Belle II MC (for MC5 use legacy algorithm).");
92  }

โ—† initialize() [18/18]

void initialize ( )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 109 of file ParticleLoaderModule.cc.

110  {
111  B2INFO("ParticleLoader's Summary of Actions:");
112 
113  StoreArray<Particle> particles;
114  StoreArray<MCParticle> mcparticles;
115  StoreArray<PIDLikelihood> pidlikelihoods;
116  StoreArray<TrackFitResult> trackfitresults;
117  StoreObjPtr<ParticleExtraInfoMap> extraInfoMap;
118  StoreObjPtr<EventExtraInfo> eventExtraInfo;
119 
120  particles.registerInDataStore();
121  extraInfoMap.registerInDataStore();
122  eventExtraInfo.registerInDataStore();
123  //register relations if these things exists
124  if (mcparticles.isOptional()) {
125  particles.registerRelationTo(mcparticles);
126  }
127  if (pidlikelihoods.isOptional()) {
128  particles.registerRelationTo(pidlikelihoods);
129  }
130  if (trackfitresults.isOptional()) {
131  particles.registerRelationTo(trackfitresults);
132  }
133 
134  if (m_useMCParticles) {
135  mcparticles.isRequired();
136  }
137 
138  if (m_decayStringsWithCuts.empty()) {
139  B2WARNING("Obsolete usage of the ParticleLoader module (load all MDST objects as all possible Particle object types). Specify the particle type via decayStringsWithCuts module parameter instead.");
140  } else {
141  for (auto decayStringCutTuple : m_decayStringsWithCuts) {
142 
143  // parsing of the input tuple (DecayString, Cut)
144  string decayString = get<0>(decayStringCutTuple);
145  std::string cutParameter = get<1>(decayStringCutTuple);
146 
147  // obtain the output particle lists from the decay string
148  bool valid = m_decaydescriptor.init(decayString);
149  if (!valid)
150  B2ERROR("ParticleLoaderModule::initialize Invalid input DecayString: " << decayString);
151 
152  // Mother particle
153  const DecayDescriptorParticle* mother = m_decaydescriptor.getMother();
154 
155  int pdgCode = mother->getPDGCode();
156  string listName = mother->getFullName();
157 
158  // special case. if the list is called "all" it may not have a
159  // corresponding cut string this can introduce very dangerous bugs
160  string listLabel = mother->getLabel();
161  if (listLabel == "all")
162  if (cutParameter != "")
163  B2FATAL("You have tried to create a list " << listName << " with cuts! This is *very* error prone, so it is now forbidden.");
164 
165  if (not isValidPDGCode(pdgCode) and (m_useMCParticles == false and m_useROEs == false))
166  B2ERROR("Invalid particle type requested to be loaded. Set a valid decayString module parameter.");
167 
168  // if we're not loading MCParticles and we are loading K0S, Lambdas, or photons --> ee then this decaystring is a V0
169  bool mdstSourceIsV0 = false;
170  if (!m_useMCParticles &&
171  (abs(pdgCode) == abs(Const::Kshort.getPDGCode()) || abs(pdgCode) == abs(Const::Lambda.getPDGCode())
172  || (abs(pdgCode) == abs(Const::photon.getPDGCode()) && m_addDaughters == true)))
173  mdstSourceIsV0 = true;
174 
175  int nProducts = m_decaydescriptor.getNDaughters();
176  if (mdstSourceIsV0 == false) {
177  if (nProducts > 0) {
178  if (!m_useROEs) {
179  B2ERROR("ParticleLoaderModule::initialize Invalid input DecayString " << decayString
180  << ". DecayString should not contain any daughters, only the mother particle.");
181  } else {
182  B2INFO("ParticleLoaderModule: Replacing the source particle list name by " <<
184  << " all other daughters will be ignored.");
186  }
187  }
188  } else {
189  if (nProducts != 2)
190  B2ERROR("ParticleLoaderModule::initialize Invalid input DecayString " << decayString
191  << ". MDST source of the particle list is V0, DecayString should contain exactly two daughters, as well as the mother particle.");
192  else {
194  B2ERROR("MDST source of the particle list is V0, the two daughters should have opposite charge");
195  }
196  }
197 
198  string antiListName = ParticleListName::antiParticleListName(listName);
199  bool isSelfConjugatedParticle = (listName == antiListName);
200 
201  StoreObjPtr<ParticleList> particleList(listName);
202  if (!particleList.isOptional()) {
203  //if it doesn't exist:
204 
206  particleList.registerInDataStore(flags);
207  if (!isSelfConjugatedParticle) {
208  StoreObjPtr<ParticleList> antiParticleList(antiListName);
209  antiParticleList.registerInDataStore(flags);
210  }
211  } else {
212  // TODO: test that this actually works
213  B2WARNING("The ParticleList with name " << listName << " already exists in the DataStore. Nothing to do.");
214  continue;
215  }
216 
217  std::shared_ptr<Variable::Cut> cut = std::shared_ptr<Variable::Cut>(Variable::Cut::compile(cutParameter));
218 
219  // add PList to corresponding collection of Lists
220  B2INFO(" o) creating (anti-)ParticleList with name: " << listName << " (" << antiListName << ")");
221  if (m_useROEs) {
222  B2INFO(" -> MDST source: RestOfEvents");
223  m_ROE2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
224  } else if (m_useMCParticles) {
225  B2INFO(" -> MDST source: MCParticles");
226  m_MCParticles2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
227  } else {
228  bool chargedFSP = Const::chargedStableSet.contains(Const::ParticleType(abs(pdgCode)));
229  if (chargedFSP) {
230  B2INFO(" -> MDST source: Tracks");
231  m_Tracks2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
232  }
233 
234  if (abs(pdgCode) == abs(Const::photon.getPDGCode())) {
235  if (m_addDaughters == false) {
236  B2INFO(" -> MDST source: ECLClusters");
237  m_ECLClusters2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
238  } else {
239  B2INFO(" -> MDST source: V0");
240  m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
241  }
242  }
243 
244  if (abs(pdgCode) == abs(Const::Kshort.getPDGCode())) {
245  B2INFO(" -> MDST source: V0");
246  m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
247  }
248 
249  if (abs(pdgCode) == abs(Const::Klong.getPDGCode()) || abs(pdgCode) == abs(Const::neutron.getPDGCode())) {
250  B2INFO(" -> MDST source: exclusively KLMClusters or exclusively ECLClusters (matching between those not used)");
251  m_KLMClusters2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
252  m_ECLClusters2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
253  }
254 
255  if (abs(pdgCode) == abs(Const::Lambda.getPDGCode())) {
256  B2INFO(" -> MDST source: V0");
257  m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle, cut);
258  }
259  }
260  B2INFO(" -> With cuts : " << cutParameter);
261  }
262  }
263 
264 
265  m_chargeZeroTrackCounts = std::vector<int>(m_Tracks2Plists.size(), 0);
266  m_sameChargeDaughtersV0Counts = std::vector<int>(m_V02Plists.size(), 0);
267  }

โ—† isUnique()

bool isUnique ( const std::vector< int > &  idSequence)
private

Compares input idSequence to all sequences already included in the list.

If sequence is not found in the list a sequence is found to be unique.

Definition at line 222 of file ParticleListManipulatorModule.cc.

โ—† 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 683 of file TagVertexModule.cc.

โ—† makeKFourCMother()

bool makeKFourCMother ( analysis::FourCFitKFit kv,
Particle p 
)
private

Update mother particle after FourC fit using KFit.

Parameters
kvreference to KFit MassFit object
ppointer to particle
Returns
true for successful construction of mother

Definition at line 769 of file ParticleVertexFitterModule.cc.

โ—† makeKMassMother()

bool makeKMassMother ( analysis::MassFitKFit kv,
Particle p 
)
private

Update mother particle after mass fit using KFit.

Parameters
kvreference to KFit MassFit object
ppointer to particle
Returns
true for successful construction of mother

Definition at line 737 of file ParticleVertexFitterModule.cc.

โ—† makeKMassPointingVertexMother()

bool makeKMassPointingVertexMother ( analysis::MassPointingVertexFitKFit kv,
Particle p 
)
private

Update mother particle after mass-constrained vertex fit with additional pointing constraint using KFit.

Parameters
kvreference to KFit MassPointingVertexFit object
ppointer to particle
Returns
true for successful construction of mother

Definition at line 704 of file ParticleVertexFitterModule.cc.

โ—† makeKMassVertexMother()

bool makeKMassVertexMother ( analysis::MassVertexFitKFit kv,
Particle p 
)
private

Update mother particle after mass-constrained vertex fit using KFit.

Parameters
kvreference to KFit MassVertexFit object
ppointer to particle
Returns
true for successful construction of mother

Definition at line 674 of file ParticleVertexFitterModule.cc.

โ—† makeKVertexMother()

bool makeKVertexMother ( analysis::VertexFitKFit kv,
Particle p 
)
private

Update mother particle after unconstrained vertex fit using KFit.

Parameters
kvreference to KFit VertexFit object
ppointer to particle
Returns
true for successful construction of mother

Definition at line 644 of file ParticleVertexFitterModule.cc.

โ—† NDBinTupleToNDBin()

NDBin NDBinTupleToNDBin ( const NDBinTuple bin_tuple)
private

Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable entries with tuples and transform tuples to pairs here.

Some massaging of python input is needed.

Definition at line 57 of file ParticleWeightingLookUpCreatorModule.cc.

โ—† registerParticleRecursively()

void registerParticleRecursively ( const DecayDescriptor decaydescriptor)

Register particles which have (sub-)decay recursively.

The function is called in initialize().

Definition at line 134 of file ParticleCombinerFromMCModule.cc.

โ—† setLooseMCMatch()

void setLooseMCMatch ( const Particle particle)
private

Finds common mother of the majority of daughters.

The results are stored to extraInfo.

Definition at line 116 of file MCMatcherParticlesModule.cc.

โ—† setObj()

void setObj ( T *  obj)

Set the decaying object, e.g.

an MCParticle.

Definition at line 84 of file DecayTree.h.

โ—† terminate()

void terminate ( )
overridevirtual

Terminate the Module.

This method is called at the end of data processing.

Reimplemented from Module.

Definition at line 289 of file ParticleLoaderModule.cc.

โ—† updateMapOfTrackAndDaughter()

void updateMapOfTrackAndDaughter ( unsigned &  l,
std::vector< std::vector< unsigned >> &  pars,
std::vector< unsigned > &  pard,
std::vector< Particle * > &  allparticles,
const Particle daughter 
)
private

update the map of daughter and tracks, find out which tracks belong to each daughter.

Parameters
lrepresent the tracks ID
parsmap of all parameters
pardvector of parameters
allparticlesvector of all particles
daughterpointer to particle

Definition at line 830 of file ParticleVertexFitterModule.cc.

โ—† updateMasksWithParticles()

void updateMasksWithParticles ( const StoreObjPtr< RestOfEvent > &  roe,
std::vector< const Particle * > &  particlesToUpdate,
Particle::EParticleSourceObject  listType 
)
private

Update ROE masks by excluding or keeping particles.

Parameters
Pointerto RestOfEvent object for update
Referenceto particle collection
ParticleTypeof the collection

Definition at line 133 of file RestOfEventUpdaterModule.cc.

135  {
136  for (auto& maskToUpdate : m_maskNamesForUpdating) {
137  if (maskToUpdate == "") {
138  B2FATAL("Cannot update ROE mask with no name!");
139  }
140  if (!roe->hasMask(maskToUpdate)) {
141  // Change name to get all ROE particles in case of new mask
142  roe->initializeMask(maskToUpdate, "ROEUpdaterModule");
143  }
144  roe->excludeParticlesFromMask(maskToUpdate, particlesToUpdate, listType, m_discard);
145 
146  }
147  }

โ—† updateMasksWithV0()

void updateMasksWithV0 ( const StoreObjPtr< RestOfEvent > &  roe,
std::vector< const Particle * > &  particlesToUpdate 
)
private

Update ROE masks with provided composite particle collection.

Parameters
Pointerto RestOfEvent object for update
Referenceto composite particle collection

Definition at line 113 of file RestOfEventUpdaterModule.cc.

Belle2::EvtPDLUtil::charge
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:46
Belle2::WeightInfo
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.
Definition: ParticleWeightingLookUpTable.h:31
Belle2::IntervalOfValidity
A class that describes the interval of experiments/runs for which an object in the database is valid.
Definition: IntervalOfValidity.h:35
Belle2::RestOfEventUpdaterModule::m_maskNamesForUpdating
std::vector< std::string > m_maskNamesForUpdating
Container for all mask names which will be updated.
Definition: RestOfEventUpdaterModule.h:69
Belle2::GeneralCut::compile
static std::unique_ptr< GeneralCut > compile(const std::string &cut)
Creates an instance of a cut and returns a unique_ptr to it, if you need a copy-able object instead y...
Definition: GeneralCut.h:114
Belle2::KlongMomentumCalculatorExpertModule::m_writeOut
bool m_writeOut
toggle output particle list btw.
Definition: KlongMomentumCalculatorExpertModule.h:81
Belle2::KlongMomentumCalculatorExpertModule::m_generator
std::unique_ptr< ParticleGenerator > m_generator
Generates the combinations.
Definition: KlongMomentumCalculatorExpertModule.h:67
Belle2::Const::photon
static const ParticleType photon
photon particle
Definition: Const.h:547
Belle2::BelleBremRecoveryModule::m_decaydescriptorGamma
DecayDescriptor m_decaydescriptorGamma
Decay descriptor of the decay being reconstructed.
Definition: BelleBremRecoveryModule.h:71
Belle2::KlongDecayReconstructorExpertModule::m_decayString
std::string m_decayString
Input DecayString specifying the decay being reconstructed.
Definition: KlongDecayReconstructorExpertModule.h:65
Belle2::KlongDecayReconstructorExpertModule::m_writeOut
bool m_writeOut
toggle output particle list btw.
Definition: KlongDecayReconstructorExpertModule.h:82
Belle2::ParticleSelectorModule::m_cut
std::unique_ptr< Variable::Cut > m_cut
cut object which performs the cuts
Definition: ParticleSelectorModule.h:70
Belle2::BelleBremRecoveryModule::m_outputAntiListName
std::string m_outputAntiListName
output anti-particle list name
Definition: BelleBremRecoveryModule.h:75
Belle2::KlongDecayReconstructorExpertModule::m_pdgCode
int m_pdgCode
PDG code of the combined mother particle.
Definition: KlongDecayReconstructorExpertModule.h:63
Belle2::MCMatcherParticlesModule::m_particles
StoreArray< Particle > m_particles
the array of Particles.
Definition: MCMatcherParticlesModule.h:92
Belle2::ParticleLoaderModule::m_addDaughters
bool m_addDaughters
toggle addition of the bottom part of the particle's decay chain
Definition: ParticleLoaderModule.h:183
Belle2::StoreArray::registerRelationTo
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Definition: StoreArray.h:150
Belle2::KlongMomentumCalculatorExpertModule::m_listName
std::string m_listName
output particle list name
Definition: KlongMomentumCalculatorExpertModule.h:69
Belle2::ParticleWeightingLookUpCreatorModule::m_experimentLow
int m_experimentLow
Lowest valid experiment #.
Definition: ParticleWeightingLookUpCreatorModule.h:53
Belle2::AnalysisConfiguration::useLegacyMCMatching
void useLegacyMCMatching(const bool flag)
Determines wheter to use the legacy MCMatching algorithm (true) or not (false).
Definition: AnalysisConfiguration.h:88
Belle2::BremsFinderModule::m_addMultiplePhotons
bool m_addMultiplePhotons
In case there is more than one brems photon, use only the best one (based on the weight of the relati...
Definition: BremsFinderModule.h:87
Belle2::AnalysisConfiguration::instance
static AnalysisConfiguration * instance()
Returns a pointer to the singleton instance.
Definition: AnalysisConfiguration.h:104
Belle2::ParticleWeightingLookUpCreatorModule::m_runLow
int m_runLow
Lowest valid run #.
Definition: ParticleWeightingLookUpCreatorModule.h:55
Belle2::Const::Kshort
static const ParticleType Kshort
K^0_S particle.
Definition: Const.h:550
Belle2::ParticleLoaderModule::m_Tracks2Plists
std::vector< PList > m_Tracks2Plists
Collection of PLists that will collect Particles created from Tracks.
Definition: ParticleLoaderModule.h:176
Belle2::ParticleCombinerModule::m_cutParameter
std::string m_cutParameter
selection criteria
Definition: ParticleCombinerModule.h:76
Belle2::ParticleSelectorModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor of the particle being selected.
Definition: ParticleSelectorModule.h:65
Belle2::BremsFinderModule::m_inputList
StoreObjPtr< ParticleList > m_inputList
StoreObjptr for input charged particle list.
Definition: BremsFinderModule.h:81
Belle2::ParticleLoaderModule::m_useROEs
bool m_useROEs
Switch to load ROE as Particle.
Definition: ParticleLoaderModule.h:167
Belle2::BremsFinderModule::m_outputList
StoreObjPtr< ParticleList > m_outputList
StoreObjptr for output particlelist.
Definition: BremsFinderModule.h:83
Belle2::Const::Klong
static const ParticleType Klong
K^0_L particle.
Definition: Const.h:551
Belle2::ParticleWeightingModule::m_tableName
std::string m_tableName
Name of the table.
Definition: ParticleWeightingModule.h:42
Belle2::BelleBremRecoveryModule::m_outputparticleList
StoreObjPtr< ParticleList > m_outputparticleList
StoreObjptr for output particlelist.
Definition: BelleBremRecoveryModule.h:78
Belle2::KlongMomentumCalculatorExpertModule::m_isSelfConjugatedParticle
bool m_isSelfConjugatedParticle
flag that indicates whether an anti-particle mother does not exist and should not be reconstructed as...
Definition: KlongMomentumCalculatorExpertModule.h:76
Belle2::DataStore::EStoreFlags
EStoreFlags
Flags describing behaviours of objects etc.
Definition: DataStore.h:71
Belle2::DecayDescriptorParticle::getPDGCode
int getPDGCode() const
Return PDG code.
Definition: DecayDescriptorParticle.h:89
Belle2::ParticleLoaderModule::m_V02Plists
std::vector< PList > m_V02Plists
Collection of PLists that will collect Particles created from V0.
Definition: ParticleLoaderModule.h:177
Belle2::BelleBremRecoveryModule::m_inputListName
std::string m_inputListName
input ParticleList names
Definition: BelleBremRecoveryModule.h:72
Belle2::Const::chargedStableSet
static const ParticleSet chargedStableSet
set of charged stable particles
Definition: Const.h:494
Belle2::BelleBremRecoveryModule::m_pdgCode
int m_pdgCode
PDG code of the combined mother particle.
Definition: BelleBremRecoveryModule.h:68
Belle2::Const::ParticleType::getPDGCode
int getPDGCode() const
PDG code.
Definition: Const.h:349
Belle2::ParticleCombinerModule::m_listName
std::string m_listName
output particle list name
Definition: ParticleCombinerModule.h:69
Belle2::ParticleCombinerModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor of the decay being reconstructed.
Definition: ParticleCombinerModule.h:66
Belle2::ParticleWeightingLookUpCreatorModule::m_experimentHigh
int m_experimentHigh
Highest valid experiment #.
Definition: ParticleWeightingLookUpCreatorModule.h:54
Belle2::BremsFinderModule::m_gammaList
StoreObjPtr< ParticleList > m_gammaList
StoreObjptr for gamma list.
Definition: BremsFinderModule.h:82
Belle2::RelationsInterface::getRelated
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
Definition: RelationsObject.h:280
Belle2::DataStore::c_DontWriteOut
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
Definition: DataStore.h:73
Belle2::ParticlePrinterModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor of the particle being selected.
Definition: ParticlePrinterModule.h:66
Belle2::ParticleSelectorModule::m_listName
std::string m_listName
output particle list name
Definition: ParticleSelectorModule.h:67
Belle2::KlongMomentumCalculatorExpertModule::m_klistName
std::string m_klistName
output K_L0 particle list name
Definition: KlongMomentumCalculatorExpertModule.h:72
Belle2::ParticleCombinerFromMCModule::m_generator
std::unique_ptr< ParticleGenerator > m_generator
Generates the combinations.
Definition: ParticleCombinerFromMCModule.h:80
Belle2::DecayDescriptor::init
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
Definition: DecayDescriptor.cc:47
Belle2::ParticleListName::antiParticleListName
std::string antiParticleListName(const std::string &listName)
Returns name of anti-particle-list corresponding to listName.
Definition: ParticleListName.cc:10
Belle2::ParticleCopierModule::m_inputListNames
std::vector< std::string > m_inputListNames
input ParticleList names
Definition: ParticleCopierModule.h:68
Belle2::BremsFinderModule::m_outputListName
std::string m_outputListName
output particle list name
Definition: BremsFinderModule.h:78
Belle2::KlongDecayReconstructorExpertModule::m_cutParameter
std::string m_cutParameter
selection criteria
Definition: KlongDecayReconstructorExpertModule.h:79
Belle2::ParticleCombinerFromMCModule::combineRecursively
void combineRecursively(const DecayDescriptor &decaydescriptor)
Combine particles which have (sub-)decay recursively.
Definition: ParticleCombinerFromMCModule.cc:175
Belle2::ParticlePrinterModule::m_listName
std::string m_listName
particle list name
Definition: ParticlePrinterModule.h:61
Belle2::ParticleWeightingLookUpCreatorModule::m_tableIDSpec
listOfSpecificIDEntries m_tableIDSpec
List of entries for table to be created from with specified ID.
Definition: ParticleWeightingLookUpCreatorModule.h:50
Belle2::ParticleLoaderModule::m_KLMClusters2Plists
std::vector< PList > m_KLMClusters2Plists
Collection of PLists that will collect Particles created from KLMClusters.
Definition: ParticleLoaderModule.h:180
Belle2::DataStore::c_WriteOut
@ c_WriteOut
Object/array should be saved by output modules.
Definition: DataStore.h:72
Belle2::BelleBremRecoveryModule::m_writeOut
bool m_writeOut
toggle output particle list btw.
Definition: BelleBremRecoveryModule.h:82
Belle2::Const::ParticleSet::contains
bool contains(const ParticleType &p) const
Returns true if and only if the set contains 'p'.
Definition: UnitConst.cc:372
Belle2::ParticleCombinerModule::m_recoilParticleType
int m_recoilParticleType
type of recoil particle: 0 - not recoil (normal reconstruction); 1 - recoil against e+e- and all daug...
Definition: ParticleCombinerModule.h:80
Belle2::ParticleWeightingLookUpCreatorModule::m_outOfRangeWeight
WeightInfo m_outOfRangeWeight
Weight info for out-of-range bin.
Definition: ParticleWeightingLookUpCreatorModule.h:51
Belle2::BelleBremRecoveryModule::m_outputListName
std::string m_outputListName
output ParticleList name
Definition: BelleBremRecoveryModule.h:74
Belle2::ParticleWeightingLookUpCreatorModule::m_tableName
std::string m_tableName
Name of the table.
Definition: ParticleWeightingLookUpCreatorModule.h:52
Belle2::KlongMomentumCalculatorExpertModule::m_pdgCode
int m_pdgCode
PDG code of the combined mother particle.
Definition: KlongMomentumCalculatorExpertModule.h:63
Belle2::ParticleLoaderModule::m_ECLClusters2Plists
std::vector< PList > m_ECLClusters2Plists
Collection of PLists that will collect Particles created from ECLClusters.
Definition: ParticleLoaderModule.h:179
Belle2::ParticleCombinerModule::m_isSelfConjugatedParticle
bool m_isSelfConjugatedParticle
flag that indicates whether an anti-particle mother does not exist and should not be reconstructed as...
Definition: ParticleCombinerModule.h:74
Belle2::KlongDecayReconstructorExpertModule::m_generator
std::unique_ptr< ParticleGenerator > m_generator
Generates the combinations.
Definition: KlongDecayReconstructorExpertModule.h:68
Belle2::MCMatcherParticlesModule::m_plist
StoreObjPtr< ParticleList > m_plist
the input ParticleList.
Definition: MCMatcherParticlesModule.h:90
Belle2::KlongDecayReconstructorExpertModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor of the decay being reconstructed.
Definition: KlongDecayReconstructorExpertModule.h:67
Belle2::ParticleLoaderModule::m_chargeZeroTrackCounts
std::vector< int > m_chargeZeroTrackCounts
internally used to count number of tracks with charge zero
Definition: ParticleLoaderModule.h:193
Belle2::DecayDescriptorParticle::getFullName
std::string getFullName() const
returns the full name of the particle full_name = name:label
Definition: DecayDescriptorParticle.h:69
Belle2::ParticleCombinerFromMCModule::m_chargeConjugation
bool m_chargeConjugation
boolean to control whether charge conjugated decay should be reconstructed as well
Definition: ParticleCombinerFromMCModule.h:97
Belle2::BremsFinderModule::m_pdgCode
int m_pdgCode
PDG code of the particle to be corrected.
Definition: BremsFinderModule.h:80
Belle2::BelleBremRecoveryModule::m_gammaListName
std::string m_gammaListName
input ParticleList names
Definition: BelleBremRecoveryModule.h:73
Belle2::ParticleVertexFitterModule::addChildofParticletoKFit
bool addChildofParticletoKFit(analysis::FourCFitKFit &kv, const Particle *particle)
Adds given particle's child to the FourCFitKFit.
Definition: ParticleVertexFitterModule.cc:1032
Belle2::KlongDecayReconstructorExpertModule::m_antiListName
std::string m_antiListName
output anti-particle list name
Definition: KlongDecayReconstructorExpertModule.h:71
Belle2::ParticleLoaderModule::isValidPDGCode
bool isValidPDGCode(const int pdgCode)
returns true if the PDG code determined from the decayString is valid
Definition: ParticleLoaderModule.cc:870
Belle2::KlongDecayReconstructorExpertModule::m_cut
std::unique_ptr< Variable::Cut > m_cut
cut object which performs the cuts
Definition: KlongDecayReconstructorExpertModule.h:80
Belle2::KlongDecayReconstructorExpertModule::m_recoList
std::string m_recoList
suffix for input K_L0 list name
Definition: KlongDecayReconstructorExpertModule.h:73
Belle2::KlongMomentumCalculatorExpertModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor of the decay being reconstructed.
Definition: KlongMomentumCalculatorExpertModule.h:66
Belle2::DBImportObjPtr
Class for importing a single object to the database.
Definition: DBImportObjPtr.h:33
Belle2::BremsFinderModule::m_maximumAcceptance
double m_maximumAcceptance
photons whose clusters have relation weights higher than this will not be used for bremsstrahlung cor...
Definition: BremsFinderModule.h:85
Belle2::KlongDecayReconstructorExpertModule::m_listName
std::string m_listName
output particle list name
Definition: KlongDecayReconstructorExpertModule.h:70
Belle2::NDBin
std::map< std::string, ParticleWeightingBinLimits * > NDBin
N-dim bin: pairs of bin limits with name of the axis variable.
Definition: ParticleWeightingKeyMap.h:42
Belle2::ParticleLoaderModule::m_writeOut
bool m_writeOut
toggle particle list btw.
Definition: ParticleLoaderModule.h:182
Belle2::DecayDescriptor::getDaughter
const DecayDescriptor * getDaughter(int i) const
return i-th daughter (0 based index).
Definition: DecayDescriptor.h:146
Belle2::ParticleWeightingModule::getInfo
WeightInfo getInfo(const Particle *p)
Get LookUp information for the particle.
Definition: ParticleWeightingModule.cc:52
Belle2::Const::neutron
static const ParticleType neutron
neutron particle
Definition: Const.h:549
Belle2::KlongMomentumCalculatorExpertModule::m_cut
std::unique_ptr< Variable::Cut > m_cut
cut object which performs the cuts
Definition: KlongMomentumCalculatorExpertModule.h:79
Belle2::BremsFinderModule::m_outputAntiList
StoreObjPtr< ParticleList > m_outputAntiList
StoreObjptr for output antiparticlelist.
Definition: BremsFinderModule.h:84
Belle2::StoreArray::isValid
bool isValid() const
Check wether the array was registered.
Definition: StoreArray.h:298
Belle2::DecayDescriptor::getNDaughters
int getNDaughters() const
return number of direct daughters.
Definition: DecayDescriptor.h:141
Belle2::Particle::EParticleSourceObject
EParticleSourceObject
particle source enumerators
Definition: Particle.h:84
Belle2::KlongMomentumCalculatorExpertModule::m_cutParameter
std::string m_cutParameter
selection criteria
Definition: KlongMomentumCalculatorExpertModule.h:78
Belle2::ParticleCombinerModule::m_pdgCode
int m_pdgCode
PDG code of the combined mother particle.
Definition: ParticleCombinerModule.h:63
Belle2::ParticleLoaderModule::m_MCParticles2Plists
std::vector< PList > m_MCParticles2Plists
Collection of PLists that will collect Particles created from MCParticles.
Definition: ParticleLoaderModule.h:175
Belle2::ParticleLoaderModule::m_sourceParticleListName
std::string m_sourceParticleListName
Particle list name from which we need to get related ROEs.
Definition: ParticleLoaderModule.h:186
Belle2::KlongMomentumCalculatorExpertModule::m_decayString
std::string m_decayString
Input DecayString specifying the decay being reconstructed.
Definition: KlongMomentumCalculatorExpertModule.h:64
Belle2::BelleBremRecoveryModule::m_gammaList
StoreObjPtr< ParticleList > m_gammaList
StoreObjptr for gamma list.
Definition: BelleBremRecoveryModule.h:77
Belle2::KlongMomentumCalculatorExpertModule::m_recoList
std::string m_recoList
Suffix attached to the output K_L list, if not defined it is set to '_reco'
Definition: KlongMomentumCalculatorExpertModule.h:83
Belle2::ParticleCombinerModule::m_generator
std::unique_ptr< ParticleGenerator > m_generator
Generates the combinations.
Definition: ParticleCombinerModule.h:67
Belle2::ParticleCombinerModule::m_writeOut
bool m_writeOut
toggle output particle list btw.
Definition: ParticleCombinerModule.h:78
Belle2::ParticleLoaderModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor for parsing the user specified DecayString.
Definition: ParticleLoaderModule.h:169
Belle2::ParticleCombinerModule::m_allowChargeViolation
bool m_allowChargeViolation
switch to turn on and off the requirement of electric charge conservation
Definition: ParticleCombinerModule.h:89
Belle2::BelleBremRecoveryModule::m_decaydescriptor
DecayDescriptor m_decaydescriptor
Decay descriptor of the charged particle decay.
Definition: BelleBremRecoveryModule.h:70
Belle2::ParticleListManipulatorModule::fillUniqueIdentifier
void fillUniqueIdentifier(const Particle *p, std::vector< int > &idSequence)
Fills unique identifier for the input particle.
Definition: ParticleListManipulatorModule.cc:203
Belle2::ParticleWeightingModule::m_inputList
StoreObjPtr< ParticleList > m_inputList
input particle list
Definition: ParticleWeightingModule.h:44
Belle2::ParticleWeightingLookUpCreatorModule::m_tableIDNotSpec
listOfNoIdEntries m_tableIDNotSpec
List of entries for table to be created from without specified ID.
Definition: ParticleWeightingLookUpCreatorModule.h:49
Belle2::BelleBremRecoveryModule::m_inputparticleList
StoreObjPtr< ParticleList > m_inputparticleList
StoreObjptr for input charged particlelist.
Definition: BelleBremRecoveryModule.h:76
Belle2::BelleBremRecoveryModule::m_outputAntiparticleList
StoreObjPtr< ParticleList > m_outputAntiparticleList
StoreObjptr for output antiparticlelist.
Definition: BelleBremRecoveryModule.h:79
Belle2::RestOfEventUpdaterModule::m_discard
bool m_discard
Update the ROE mask by passing or discarding particles in the provided particle list.
Definition: RestOfEventUpdaterModule.h:72
Belle2::noIdEntry
std::tuple< WeightInfo, NDBinTuple > noIdEntry
the ID
Definition: ParticleWeightingLookUpCreatorModule.h:39
Belle2::ParticleWeightingLookUpCreatorModule::NDBinTupleToNDBin
NDBin NDBinTupleToNDBin(const NDBinTuple &bin_tuple)
Currently, std::pair can not be retrieved from python list We will get ParticleWeightingLookUpTable e...
Definition: ParticleWeightingLookUpCreatorModule.cc:57
Belle2::BremsFinderModule::m_usePhotonOnlyOnce
bool m_usePhotonOnlyOnce
Each brems photon can be used to correct only one particle (the one with the smallest relation weight...
Definition: BremsFinderModule.h:89
Belle2::MCMatching::setMCTruth
static bool setMCTruth(const Belle2::Particle *particle)
This is the main function of MC matching algorithm.
Definition: MCMatching.cc:89
Belle2::DecayDescriptor::getMother
const DecayDescriptorParticle * getMother() const
return mother.
Definition: DecayDescriptor.h:136
Belle2::KlongDecayReconstructorExpertModule::m_isSelfConjugatedParticle
bool m_isSelfConjugatedParticle
flag that indicates whether an anti-particle mother does not exist and should not be reconstructed as...
Definition: KlongDecayReconstructorExpertModule.h:77
Belle2::MCMatcherParticlesModule::m_mcparticles
StoreArray< MCParticle > m_mcparticles
the array of MCParticles.
Definition: MCMatcherParticlesModule.h:91
Belle2::KlongMomentumCalculatorExpertModule::m_antiListName
std::string m_antiListName
output anti-particle list name
Definition: KlongMomentumCalculatorExpertModule.h:70
Belle2::ParticleCombinerModule::m_chargeConjugation
bool m_chargeConjugation
boolean to control whether charge conjugated decay should be reconstructed as well
Definition: ParticleCombinerModule.h:87
Belle2::BremsFinderModule::m_outputAntiListName
std::string m_outputAntiListName
output anti-particle list name
Definition: BremsFinderModule.h:79
Belle2::MCMatching::getMCErrors
static int getMCErrors(const Belle2::Particle *particle, const Belle2::MCParticle *mcParticle=nullptr)
Returns quality indicator of the match as a bit pattern where the individual bits indicate the the ty...
Definition: MCMatching.cc:282
Belle2::ParticleLoaderModule::m_sameChargeDaughtersV0Counts
std::vector< int > m_sameChargeDaughtersV0Counts
internally used to count the number of V0s with same charge daughters
Definition: ParticleLoaderModule.h:194
Belle2::ParticleLoaderModule::m_ROE2Plists
std::vector< PList > m_ROE2Plists
Collection of PLists that will collect Particles created from V0.
Definition: ParticleLoaderModule.h:178
Belle2::ParticleWeightingLookUpCreatorModule::m_runHigh
int m_runHigh
Highest valid run #.
Definition: ParticleWeightingLookUpCreatorModule.h:56
Belle2::ParticleLoaderModule::m_decayStringsWithCuts
std::vector< std::tuple< std::string, std::string > > m_decayStringsWithCuts
Input DecayString specifying the particle being created/loaded.
Definition: ParticleLoaderModule.h:172
Belle2::MCMatcherParticlesModule::m_listName
std::string m_listName
steering variable: name of the input ParticleList
Definition: MCMatcherParticlesModule.h:89
Belle2::ParticleSelectorModule::m_cutParameter
std::string m_cutParameter
selection criteria
Definition: ParticleSelectorModule.h:69
Belle2::ParticleCombinerModule::m_decayString
std::string m_decayString
Input DecayString specifying the decay being reconstructed.
Definition: ParticleCombinerModule.h:65
Belle2::ParticleCombinerFromMCModule::m_decayModeID
int m_decayModeID
user specified decay mode identifier
Definition: ParticleCombinerFromMCModule.h:85
Belle2::Const::Lambda
static const ParticleType Lambda
Lambda particle.
Definition: Const.h:552
Belle2::ParticleLoaderModule::m_useMCParticles
bool m_useMCParticles
Load MCParticle as Particle instead of the corresponding MDST dataobject.
Definition: ParticleLoaderModule.h:165
Belle2::ParticleSelectorModule::m_decayString
std::string m_decayString
Input DecayString specifying the particle being selected.
Definition: ParticleSelectorModule.h:64
Belle2::ParticleCombinerModule::m_antiListName
std::string m_antiListName
output anti-particle list name
Definition: ParticleCombinerModule.h:70