Belle II Software  release-05-02-19
GeneratorPreselectionModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Torben Ferber *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <framework/core/Module.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 #include <framework/dataobjects/MCInitialParticles.h>
16 #include <mdst/dataobjects/MCParticle.h>
17 
18 #include <string>
19 #include <map>
20 
21 namespace Belle2 {
33  class GeneratorPreselectionModule : public Module {
34  public:
35 
40 
42  void initialize() override;
43 
45  void event() override;
46 
48  void terminate() override;
49 
50  protected:
52  void checkParticle(const MCParticle& mc);
53 
54  std::string m_particleList;
55  StoreArray<MCParticle> m_mcparticles;
56  StoreObjPtr<MCInitialParticles> m_initial;
58  private:
59 
61  int m_nCharged = 0;
66  double m_MinChargedP;
67  double m_MinChargedPt;
68  double m_MinChargedTheta;
70  bool m_applyInCMS{false};
72  bool m_stableParticles{false};
76  double m_nPhoton = 0;
81  double m_MinPhotonEnergy;
82  double m_MinPhotonTheta;
83  double m_MaxPhotonTheta;
86  std::map<double, unsigned int> m_resultCounter;
87  };
89 }
Belle2::GeneratorPreselectionModule::m_nChargedMin
int m_nChargedMin
minimum number of charged particles.
Definition: GeneratorPreselectionModule.h:70
Belle2::GeneratorPreselectionModule::m_nCharged
int m_nCharged
charged
Definition: GeneratorPreselectionModule.h:69
Belle2::GeneratorPreselectionModule::m_MinChargedPt
double m_MinChargedPt
minimum pT for each charged particle.
Definition: GeneratorPreselectionModule.h:75
Belle2::GeneratorPreselectionModule::GeneratorPreselectionModule
GeneratorPreselectionModule()
Constructor: Sets the description, the properties and the parameters of the module.
Definition: GeneratorPreselectionModule.cc:28
Belle2::GeneratorPreselectionModule::m_particleList
std::string m_particleList
The name of the MCParticle collection.
Definition: GeneratorPreselectionModule.h:62
Belle2::GeneratorPreselectionModule::m_mcparticles
StoreArray< MCParticle > m_mcparticles
store array for the MCParticles
Definition: GeneratorPreselectionModule.h:63
Belle2::GeneratorPreselectionModule::m_nPhotonMax
int m_nPhotonMax
minimum number of photons.
Definition: GeneratorPreselectionModule.h:86
Belle2::GeneratorPreselectionModule::m_nPhotonMin
int m_nPhotonMin
minimum number of photons.
Definition: GeneratorPreselectionModule.h:85
Belle2::GeneratorPreselectionModule::m_MinPhotonEnergy
double m_MinPhotonEnergy
selection criteria for photons
Definition: GeneratorPreselectionModule.h:89
Belle2::GeneratorPreselectionModule::terminate
void terminate() override
Print the results of the cuts.
Definition: GeneratorPreselectionModule.cc:137
Belle2::GeneratorPreselectionModule::m_MaxChargedTheta
double m_MaxChargedTheta
maximum theta for each charged particle.
Definition: GeneratorPreselectionModule.h:77
Belle2::GeneratorPreselectionModule::m_stableParticles
bool m_stableParticles
if true apply the selection criteria for only stable particles in the generator
Definition: GeneratorPreselectionModule.h:80
Belle2::GeneratorPreselectionModule::event
void event() override
Event processor.
Definition: GeneratorPreselectionModule.cc:67
Belle2::GeneratorPreselectionModule::m_MinChargedTheta
double m_MinChargedTheta
minimum theta for each charged particle.
Definition: GeneratorPreselectionModule.h:76
Belle2::GeneratorPreselectionModule::m_MaxPhotonTheta
double m_MaxPhotonTheta
maximum theta for each photon.
Definition: GeneratorPreselectionModule.h:91
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::GeneratorPreselectionModule::checkParticle
void checkParticle(const MCParticle &mc)
called for each particle, checks for cuts.
Definition: GeneratorPreselectionModule.cc:101
Belle2::GeneratorPreselectionModule::m_MinChargedP
double m_MinChargedP
selection criteria for charged
Definition: GeneratorPreselectionModule.h:74
Belle2::GeneratorPreselectionModule::m_nPhoton
double m_nPhoton
number of photons
Definition: GeneratorPreselectionModule.h:84
Belle2::GeneratorPreselectionModule::m_applyInCMS
bool m_applyInCMS
if true apply the selection criteria for charged in the center of mass system
Definition: GeneratorPreselectionModule.h:78
Belle2::GeneratorPreselectionModule::m_MinPhotonTheta
double m_MinPhotonTheta
minimum theta for each photon.
Definition: GeneratorPreselectionModule.h:90
Belle2::GeneratorPreselectionModule::m_nChargedMax
int m_nChargedMax
minimum number of charged particles.
Definition: GeneratorPreselectionModule.h:71
Belle2::GeneratorPreselectionModule::m_initial
StoreObjPtr< MCInitialParticles > m_initial
pointer to the actual beam parameters
Definition: GeneratorPreselectionModule.h:64
Belle2::GeneratorPreselectionModule::initialize
void initialize() override
Initialize the parameters.
Definition: GeneratorPreselectionModule.cc:50
Belle2::GeneratorPreselectionModule::m_resultCounter
std::map< double, unsigned int > m_resultCounter
final result
Definition: GeneratorPreselectionModule.h:94