Belle II Software development
ECLTrackClusterMatchingParametrizationExpertModule.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/dataobjects/EventMetaData.h>
12#include <framework/datastore/StoreArray.h>
13#include <framework/datastore/StoreObjPtr.h>
14#include <mdst/dataobjects/ECLCluster.h>
15#include <mdst/dataobjects/MCParticle.h>
16#include <mdst/dataobjects/Track.h>
17#include <mdst/dataobjects/TrackFitResult.h>
18#include <tracking/dataobjects/ExtHit.h>
19
20class TFile;
21class TTree;
22
23namespace Belle2 {
34 public:
37
40
46 virtual void initialize() override;
47
52 virtual void event() override;
53
55 virtual void terminate() override;
56
57 private:
58
60 bool isECLHit(const ExtHit& extHit) const;
61
62 // required input
69 // optional input
74 TFile* m_rootFilePtr{nullptr};
75 std::string m_rootFileName;
78 TTree* m_tree{nullptr};
80 // variables
82 int m_iRun;
87 float m_pT;
89 float m_deltaPhi;
91 float m_phiHit;
92 float m_errorPhi;
95 float m_thetaHit;
101 std::vector<int>* m_trackNo_array = {};
102 std::vector<float>* m_trackMomentum_array = {};
103 std::vector<float>* m_pT_array = {};
104 std::vector<float>* m_trackTheta_array = {};
105 std::vector<float>* m_deltaPhi_array = {};
106 std::vector<float>* m_phiCluster_array = {};
107 std::vector<float>* m_phiHit_array = {};
108 std::vector<float>* m_errorPhi_array = {};
109 std::vector<float>* m_deltaTheta_array = {};
110 std::vector<float>* m_thetaCluster_array = {};
111 std::vector<float>* m_thetaHit_array = {};
112 std::vector<float>* m_errorTheta_array = {};
113 std::vector<int>* m_hitstatus_array = {};
114 std::vector<int>* m_true_track_pdg_array = {};
115 std::vector<int>* m_true_match_array = {};
116 };
118} //namespace Belle2
The module saves information on ExtHits and related cluster into a file.
ECLTrackClusterMatchingParametrizationExpertModule()
Constructor, for setting module description and parameters.
std::vector< int > * m_true_match_array
array of booleans indicating if cluster of hit is related to same MCParticle as track
bool m_writeToRoot
if true, a rootFile named by m_rootFileName will be filled with info
virtual void initialize() override
Use this to initialize resources or memory your module needs.
virtual ~ECLTrackClusterMatchingParametrizationExpertModule()
Use to clean up anything you created in the constructor.
bool m_useArray
if true, info is stored event-wise using array, otherwise hit-wise
StoreArray< TrackFitResult > m_trackFitResults
Required input array of TrackFitResults.
virtual void terminate() override
Clean up anything you created in initialize().
float m_deltaTheta
difference in polar angle between hit position and cluster
StoreObjPtr< EventMetaData > m_eventMetaData
Optional input array of EventMetaData.
std::vector< float > * m_deltaTheta_array
array of differences in polar angle between hit and cluster
std::vector< float > * m_errorPhi_array
array of uncertainties on azimuthal angle of hit
bool isECLHit(const ExtHit &extHit) const
Check if extrapolated hit is inside ECL and matches one of the desired categories.
int m_true_match
cluster related to hit is related to same MCParticle as track
StoreArray< ECLCluster > m_eclClusters
Required input array of ECLClusters.
StoreArray< MCParticle > m_mcParticles
Required input array of MCParticles.
float m_deltaPhi
difference in azimuthal angle between hit position and cluster
std::vector< float > * m_errorTheta_array
array of uncertainties on polar angle of hit
std::vector< float > * m_deltaPhi_array
array of differences in azimuthal angle between hit and cluster
Store one Ext hit as a ROOT object.
Definition: ExtHit.h:31
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.