Belle II Software development
ECLChargedPIDDataAnalysisModule.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
9#pragma once
10
11#include <framework/core/Module.h>
12#include <string>
13#include <TTree.h>
14#include <TFile.h>
15
16// ECL
17#include <ecl/dataobjects/ECLShower.h>
18#include <mdst/dataobjects/MCParticle.h>
19
20// FRAMEWORK
21#include <framework/dataobjects/EventMetaData.h>
22#include <framework/datastore/StoreObjPtr.h>
23#include <framework/datastore/StoreArray.h>
24
25namespace Belle2 {
38
39 public:
40
49 virtual void initialize() override;
52 virtual void beginRun() override;
55 virtual void event() override;
58 virtual void endRun() override;
61 virtual void terminate() override;
62
63 private:
64
67 std::string m_rootFileName;
72
74 virtual const char* eclShowerArrayName() const
75 { return "ECLShowers" ; }
76
81
82 // N1 Hypo
83 TTree* n1_tree;
85 // variables
87 int n1_iRun;
91 std::vector<double>* n1_eclShowerEnergy;
92 std::vector<double>* n1_eclShowerTheta;
93 std::vector<double>* n1_eclShowerPhi;
94 std::vector<double>* n1_eclShowerR;
95 std::vector<int>* n1_eclShowerHypothesisId;
96 std::vector<double>* n1_eclShowerAbsZernike40;
97 std::vector<double>* n1_eclShowerAbsZernike51;
100 std::vector<int>* n1_mcPdg;
101 std::vector<int>* n1_mcMothPdg;
102 std::vector<double>* n1_mcEnergy;
103 std::vector<double>* n1_mcP;
104 std::vector<double>* n1_mcTheta;
105 std::vector<double>* n1_mcPhi;
108 std::vector<int>* n1_trkPdg;
109 std::vector<int>* n1_trkCharge;
110 std::vector<double>* n1_trkP;
111 std::vector<double>* n1_trkTheta;
112 std::vector<double>* n1_trkPhi;
114 std::vector<double>* n1_eclEoP;
116 // N2 Hypo
117 TTree* n2_tree;
119 // variables
125 std::vector<double>* n2_eclShowerEnergy;
126 std::vector<double>* n2_eclShowerTheta;
127 std::vector<double>* n2_eclShowerPhi;
128 std::vector<double>* n2_eclShowerR;
129 std::vector<int>* n2_eclShowerHypothesisId;
130 std::vector<double>* n2_eclShowerAbsZernike40;
131 std::vector<double>* n2_eclShowerAbsZernike51;
134 std::vector<int>* n2_mcPdg;
135 std::vector<int>* n2_mcMothPdg;
136 std::vector<double>* n2_mcEnergy;
137 std::vector<double>* n2_mcP;
138 std::vector<double>* n2_mcTheta;
139 std::vector<double>* n2_mcPhi;
142 std::vector<int>* n2_trkPdg;
143 std::vector<int>* n2_trkCharge;
144 std::vector<double>* n2_trkP;
145 std::vector<double>* n2_trkTheta;
146 std::vector<double>* n2_trkPhi;
148 std::vector<double>* n2_eclEoP;
150 };
152}
153
The ECL Charged PID Data Analysis Module.
virtual const char * eclShowerArrayName() const
Default name ECLShower.
std::vector< double > * n1_trkPhi
Track azimuthal direction.
StoreArray< ECLShower > m_eclShowers
Store array: ECLShower.
bool m_writeToRoot
if true, a rootFile named by m_rootFileName will be filled with info
std::vector< double > * n2_eclShowerAbsZernike40
Shower Zernike40 Moment.
virtual void initialize() override
Initializes the Module.
int n1_eclShowerMultip
Number of ECLShowers per event.
virtual void event() override
Called once for each event.
std::vector< int > * n2_mcMothPdg
MCParticle mother particle PDG code.
std::vector< double > * n2_mcP
MCParticle momentum.
std::vector< double > * n2_eclShowerEnergy
Shower Energy.
TTree * n2_tree
Root tree and file for saving the output.
virtual void endRun() override
Called once when a run ends.
std::vector< int > * n1_eclShowerHypothesisId
Shower Particle Hypothesis ID.
int n2_eclShowerMultip
Number of ECLShowers per event.
std::vector< double > * n1_mcP
MCParticle momentum.
virtual void terminate() override
Termination action.
std::vector< double > * n2_mcTheta
MCParticle Theta.
TTree * n1_tree
Root tree and file for saving the output.
std::vector< double > * n1_eclShowerEnergy
Shower Energy.
std::vector< double > * n1_mcPhi
MCParticle Phi.
std::vector< double > * n1_eclShowerAbsZernike51
Shower Zernike51 Moment.
std::vector< int > * n1_mcMothPdg
MCParticle mother particle PDG code.
virtual void beginRun() override
Called once before a new run begins.
std::vector< double > * n2_eclEoP
ECL Shower Energy on Track Momentum.
std::vector< double > * n2_trkPhi
Track azimuthal direction.
std::vector< double > * n1_trkTheta
Track polar direction.
std::vector< double > * n1_mcEnergy
MCParticle energyx.
std::vector< int > * n2_mcPdg
MCParticle PDG code.
std::vector< double > * n1_eclShowerAbsZernike40
Shower Zernike40 Moment.
std::vector< double > * n1_eclEoP
ECL Shower Energy on Track Momentum.
std::vector< int > * n1_mcPdg
MCParticle PDG code.
std::vector< double > * n2_eclShowerTheta
Shower Theta.
std::vector< double > * n2_eclShowerPhi
Shower Phi.
StoreArray< MCParticle > m_mcParticles
MCParticles StoreArray.
std::vector< double > * n2_trkTheta
Track polar direction.
std::vector< double > * n2_mcPhi
MCParticle Phi.
std::vector< double > * n1_eclShowerTheta
Shower Theta.
virtual ~ECLChargedPIDDataAnalysisModule()
Destructor of the module.
std::vector< double > * n2_trkP
Track momentum.
std::vector< double > * n1_trkP
Track momentum.
std::vector< double > * n2_eclShowerAbsZernike51
Shower Zernike51 Moment.
TFile * m_rootFilePtr
members of ECLReconstructor Module
std::vector< double > * n2_mcEnergy
MCParticle energyx.
StoreObjPtr< EventMetaData > m_EventMetaData
Event metadata.
std::vector< int > * n2_eclShowerHypothesisId
Shower Particle Hypothesis ID.
std::vector< double > * n1_mcTheta
MCParticle Theta.
std::vector< double > * n1_eclShowerPhi
Shower Phi.
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.