Belle II Software  release-08-01-10
GeneratorPreselectionModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 
10 #include <framework/core/Module.h>
11 #include <framework/datastore/StoreArray.h>
12 #include <framework/datastore/StoreObjPtr.h>
13 #include <framework/dataobjects/MCInitialParticles.h>
14 #include <mdst/dataobjects/MCParticle.h>
15 
16 #include <string>
17 #include <map>
18 
19 namespace Belle2 {
32  public:
33 
38 
40  void initialize() override;
41 
43  void event() override;
44 
46  void terminate() override;
47 
48  protected:
50  void checkParticle(const MCParticle& mc);
51 
52  std::string m_particleList;
56  private:
57 
59  int m_nCharged = 0;
64  double m_MinChargedP;
65  double m_MinChargedPt;
68  bool m_applyInCMS{false};
70  bool m_stableParticles{false};
74  double m_nPhoton = 0;
84  std::map<double, unsigned int> m_resultCounter;
85  };
87 }
bool m_stableParticles
if true apply the selection criteria for only stable particles in the generator
void initialize() override
Initialize the parameters.
int m_nPhotonMin
minimum number of photons.
double m_MaxPhotonTheta
maximum theta for each photon.
double m_MinPhotonTheta
minimum theta for each photon.
double m_MaxChargedTheta
maximum theta for each charged particle.
GeneratorPreselectionModule()
Constructor: Sets the description, the properties and the parameters of the module.
StoreArray< MCParticle > m_mcparticles
store array for the MCParticles
void terminate() override
Print the results of the cuts.
double m_MinChargedP
selection criteria for charged
double m_MinChargedPt
minimum pT for each charged particle.
int m_nChargedMin
minimum number of charged particles.
bool m_applyInCMS
if true apply the selection criteria for charged in the center of mass system
int m_nPhotonMax
minimum number of photons.
void checkParticle(const MCParticle &mc)
called for each particle, checks for cuts.
StoreObjPtr< MCInitialParticles > m_initial
pointer to the actual beam parameters
std::string m_particleList
The name of the MCParticle collection.
std::map< double, unsigned int > m_resultCounter
final result
double m_MinPhotonEnergy
selection criteria for photons
double m_MinChargedTheta
minimum theta for each charged particle.
int m_nChargedMax
minimum number of charged particles.
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Base class for Modules.
Definition: Module.h:72
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.