 |
Belle II Software
release-05-02-19
|
18 #include <arich/modules/arichNtuple/ARICHNtupleStruct.h>
19 #include <framework/core/Module.h>
20 #include <analysis/VariableManager/Manager.h>
21 #include <analysis/DecayDescriptor/DecayDescriptor.h>
22 #include <framework/datastore/StoreObjPtr.h>
23 #include <framework/dataobjects/EventMetaData.h>
24 #include <framework/pcore/RootMergeable.h>
42 class arichToNtupleModule :
public Module {
53 virtual void event()
override;
88 std::shared_ptr<TFile>
m_file{
nullptr};
99 std::vector<ARICH::ARICHTree*>
m_arich;
104 std::vector<Variable::Manager::FunctionPtr>
m_functions;
107 std::tuple<std::string, std::map<int, unsigned int>>
m_sampling;
std::string m_fileName
Name of ROOT file for output.
A variable returning a floating-point value for a given Particle.
float getInverseSamplingRateWeight(const Particle *particle)
Calculate inverse sampling rate weight.
std::vector< ARICH::ARICHTree * > m_arich
Vector of arich branch addresses.
virtual void terminate() override
Write TTree to file, and close file if necessary.
DecayDescriptor m_decaydescriptor
Decay descriptor for selected particles to append arich info.
StoreObjPtr< RootMergeable< TTree > > m_tree
The ROOT TNtuple for output.
int m_experiment
experiment number
const Variable::Manager::Var * m_sampling_variable
Variable Pointer to target variable.
void fillARICHTree(const Particle *particle)
Fill data to arich branches.
std::string m_treeName
Name of the TTree.
std::map< int, unsigned int > m_sampling_rates
Inverse sampling rates.
unsigned int m_ncandidates
total n candidates
std::string m_sampling_name
Variable name of sampling variable.
std::map< int, unsigned long int > m_sampling_counts
Current number of samples with this value.
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
arichToNtupleModule()
Constructor.
std::string m_particleList
Name of particle list with reconstructed particles.
std::vector< Variable::Manager::FunctionPtr > m_functions
List of function pointers corresponding to given variables.
virtual void initialize() override
Initialises the module.
virtual void event() override
Method called for each event.
Class to store reconstructed particles.
int m_candidate
candidate counter
std::vector< std::string > m_variables
List of variables to save.
std::shared_ptr< TFile > m_file
ROOT file for output.
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
std::vector< std::string > m_arichVariables
List of aliases of particles to which arich info will be appended (used for tree branch naming)
void addARICHBranches(const std::string &name)
Add arich branches to the output TTree.
std::tuple< std::string, std::map< int, unsigned int > > m_sampling
Tuple of variable name and a map of integer values and inverse sampling rate.
StoreObjPtr< EventMetaData > m_eventMetaData
the event information
std::string m_arichSelector
Decay string with selected particles to which arich info should be appendend.
std::vector< double > m_branchAddresses
Variable branch addresses.