Belle II Software development
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
19namespace Belle2 {
29 public:
30
35
37 void initialize() override;
38
40 void event() override;
41
43 void terminate() override;
44
45 protected:
47 void checkParticle(const MCParticle& mc);
48
49 std::string m_particleList;
53 private:
54
56 int m_nCharged = 0;
65 bool m_applyInCMS{false};
67 bool m_stableParticles{false};
71 double m_nPhoton = 0;
81 std::map<double, unsigned int> m_resultCounter;
82 };
84}
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
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.