 |
Belle II Software
release-05-01-25
|
12 #include <analysis/modules/InclusiveDstarReconstruction/InclusiveDstarReconstructionModule.h>
13 #include <analysis/utility/PCmsLabTransform.h>
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <framework/datastore/StoreArray.h>
18 #include <analysis/dataobjects/ParticleList.h>
19 #include <analysis/DecayDescriptor/ParticleListName.h>
22 #include <TDatabasePDG.h>
37 setDescription(
"Inclusive Dstar reconstruction by estimating the four vector using slow pions");
40 addParam(
"pionListName", m_inputPionListName,
"Name of the input pion ParticleList", std::string(
""));
41 addParam(
"DstarListName", m_outputDstarListName,
"Name of the output D* ParticleList", std::string(
""));
42 addParam(
"slowPionCut", m_slowPionCut,
"Cut for selecting slow pions", std::string(
"useCMSFrame(p) < 0.2"));
58 B2ERROR(
"InclusiveDstarReconstructionModule::initialize Invalid Output ParticleList Name: " <<
m_outputDstarListName);
66 B2ERROR(
"InclusiveDstarReconstructionModule::initialize Invalid Input ParticleList Name: " <<
m_outputDstarListName);
70 int pion_pdg_code = mother->getPDGCode();
74 B2ERROR(
"Pion PDG code " << pion_pdg_code <<
" not compatible with D* PDG code " <<
m_dstar_pdg_code);
78 inputPionList.isRequired();
82 outputDstarList.registerInDataStore();
84 outputAntiDstarList.registerInDataStore();
91 m_d_pdg_mass = (pion_pdg_code == 111) ? TDatabasePDG::Instance()->GetParticle(421)->Mass() : TDatabasePDG::Instance()->GetParticle(
94 m_d_pdg_mass = TDatabasePDG::Instance()->GetParticle(421)->Mass();
105 outputDstarList.create();
109 outputAntiDstarList.create();
111 outputDstarList->bindAntiParticleList(*outputAntiDstarList);
115 unsigned int num_pions = inputPionList->getListSize();
117 for (
unsigned int pion_index = 0; pion_index < num_pions; pion_index++) {
118 const Particle* pion = inputPionList->getParticle(pion_index);
120 if (!
m_cut->check(pion)) {
126 if (isnan(dstar_four_vector.P()))
continue;
130 Particle* new_dstar = particles.appendNew(dstar);
131 outputDstarList->addParticle(new_dstar);
143 TVector3 momentum_vector_pion = pion->
getMomentum();
144 TVector3 momentum_vec_dstar = abs_momentum_dstar * momentum_vector_pion.Unit();
146 return TLorentzVector(momentum_vec_dstar, energy_dstar);
151 bool is_compatible =
false;
152 if (pion_pdg_code == 111) {
153 is_compatible =
true;
154 }
else if (pion_pdg_code == 211) {
156 }
else if (pion_pdg_code == -211) {
160 return is_compatible;
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...
TLorentzVector estimateDstarFourMomentum(const Particle *pion)
Estimates the D* four momentum given a slow pion.
float m_d_pdg_mass
PDG mass for the D daughter of the D*.
TClonesArray * getArrayPointer() const
Returns the pointer to the store array which holds the daughter particles.
DecayDescriptor m_decaydescriptor
Decay descriptor for parsing the user specifed DecayString.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
std::string m_inputPionListName
Name of the input pion particle list.
Represents a particle in the DecayDescriptor.
bool pionCompatibleWithDstar(int pion_pdg_code)
Checks if the given pion is list if compatible with the charge of the D* particle.
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
std::string m_slowPionCut
Cut used to identify slow pions.
std::string antiParticleListName(const std::string &listName)
Returns name of anti-particle-list corresponding to listName.
Inclusive D* reconstruction module.
float getEnergy() const
Returns total energy.
virtual ~InclusiveDstarReconstructionModule()
Destructor.
float m_dstar_pdg_mass
PDG mass of the give D* particle list.
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
virtual void initialize() override
Initialize the Module.
int getArrayIndex() const
Returns this object's array index (in StoreArray), or -1 if not found.
TVector3 getMomentum() const
Returns momentum vector.
int m_dstar_pdg_code
PDG code of the given D* particle list.
Class to store reconstructed particles.
std::unique_ptr< Variable::Cut > m_cut
cut object which performs the cuts
std::string m_outputDstarListName
Name of the output D* particle list.
const DecayDescriptorParticle * getMother() const
return mother.
virtual void event() override
Event Processor.