Belle II Software  release-05-02-19
ECLTrackClusterMatchingParametrizationExpertModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Frank Meier *
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/dataobjects/EventMetaData.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <mdst/dataobjects/ECLCluster.h>
17 #include <mdst/dataobjects/MCParticle.h>
18 #include <mdst/dataobjects/Track.h>
19 #include <mdst/dataobjects/TrackFitResult.h>
20 #include <tracking/dataobjects/ExtHit.h>
21 
22 class TFile;
23 class TTree;
24 
25 namespace Belle2 {
36  public:
39 
42 
48  virtual void initialize() override;
49 
54  virtual void event() override;
55 
57  virtual void terminate() override;
58 
59  private:
60 
62  bool isECLHit(const ExtHit& extHit) const;
63 
64  // required input
71  // optional input
76  TFile* m_rootFilePtr{nullptr};
77  std::string m_rootFileName;
79  bool m_useArray;
80  TTree* m_tree{nullptr};
82  // variables
84  int m_iRun;
85  int m_iEvent;
87  int m_trackNo;
89  float m_pT;
90  float m_trackTheta;
91  float m_deltaPhi;
92  float m_phiCluster;
93  float m_phiHit;
94  float m_errorPhi;
95  float m_deltaTheta;
97  float m_thetaHit;
98  float m_errorTheta;
103  std::vector<int>* m_trackNo_array = {};
104  std::vector<float>* m_trackMomentum_array = {};
105  std::vector<float>* m_pT_array = {};
106  std::vector<float>* m_trackTheta_array = {};
107  std::vector<float>* m_deltaPhi_array = {};
108  std::vector<float>* m_phiCluster_array = {};
109  std::vector<float>* m_phiHit_array = {};
110  std::vector<float>* m_errorPhi_array = {};
111  std::vector<float>* m_deltaTheta_array = {};
112  std::vector<float>* m_thetaCluster_array = {};
113  std::vector<float>* m_thetaHit_array = {};
114  std::vector<float>* m_errorTheta_array = {};
115  std::vector<int>* m_hitstatus_array = {};
116  std::vector<int>* m_true_track_pdg_array = {};
117  std::vector<int>* m_true_match_array = {};
118  };
120 } //namespace Belle2
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_phiHit
float m_phiHit
azimuthal angle of hit position
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:93
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_pT
float m_pT
transverse momentum of track
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:89
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_phiCluster_array
std::vector< float > * m_phiCluster_array
array of azimuthal angles of cluster
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:108
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_useArray
bool m_useArray
if true, info is stored event-wise using array, otherwise hit-wise
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:79
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_phiCluster
float m_phiCluster
azimuthal angle of cluster
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:92
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::isECLHit
bool isECLHit(const ExtHit &extHit) const
Check if extrapolated hit is inside ECL and matches one of the desired categories.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.cc:244
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_iEvent
int m_iEvent
Event number.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:85
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::ECLTrackClusterMatchingParametrizationExpertModule
ECLTrackClusterMatchingParametrizationExpertModule()
Constructor, for setting module description and parameters.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.cc:22
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_iRun
int m_iRun
Run number.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:84
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_true_match_array
std::vector< int > * m_true_match_array
array of booleans indicating if cluster of hit is related to same MCParticle as track
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:117
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_extHits
StoreArray< ExtHit > m_extHits
Required input array of ExtHits.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:65
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_thetaCluster_array
std::vector< float > * m_thetaCluster_array
array of polar angles of cluster
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:112
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_deltaPhi
float m_deltaPhi
difference in azimuthal angle between hit position and cluster
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:91
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_trackTheta
float m_trackTheta
polar angle of track
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:90
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_iExperiment
int m_iExperiment
Experiment number.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:83
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_pT_array
std::vector< float > * m_pT_array
array of transversal track momenta
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:105
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::event
virtual void event() override
Called once for each event.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.cc:112
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_true_track_pdg_array
std::vector< int > * m_true_track_pdg_array
array of true PDG IDs of track
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:116
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_hitstatus
int m_hitstatus
status of hit
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:99
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_errorPhi_array
std::vector< float > * m_errorPhi_array
array of uncertainties on azimuthal angle of hit
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:110
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::~ECLTrackClusterMatchingParametrizationExpertModule
virtual ~ECLTrackClusterMatchingParametrizationExpertModule()
Use to clean up anything you created in the constructor.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.cc:54
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_thetaHit
float m_thetaHit
polar angle of hit position
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:97
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_rootFilePtr
TFile * m_rootFilePtr
members of ECLTrackClusterMatching Module
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:76
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_deltaTheta
float m_deltaTheta
difference in polar angle between hit position and cluster
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:95
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_deltaPhi_array
std::vector< float > * m_deltaPhi_array
array of differences in azimuthal angle between hit and cluster
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:107
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_deltaTheta_array
std::vector< float > * m_deltaTheta_array
array of differences in polar angle between hit and cluster
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:111
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_errorTheta_array
std::vector< float > * m_errorTheta_array
array of uncertainties on polar angle of hit
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:114
Belle2::ECLTrackClusterMatchingParametrizationExpertModule
The module saves information on ExtHits and related cluster into a file.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:35
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_trackMomentum_array
std::vector< float > * m_trackMomentum_array
array of track momenta
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:104
Belle2::ExtHit
Store one Ext hit as a ROOT object.
Definition: ExtHit.h:40
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_trackTheta_array
std::vector< float > * m_trackTheta_array
array of track's polar angles
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:106
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_hitstatus_array
std::vector< int > * m_hitstatus_array
array of hit status
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:115
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_thetaHit_array
std::vector< float > * m_thetaHit_array
array of polar angles of hit
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:113
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_trackMomentum
float m_trackMomentum
momentum of track
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:88
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_true_track_pdg
int m_true_track_pdg
PDG ID of track according to MC.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:100
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_phiHit_array
std::vector< float > * m_phiHit_array
array of azimuthal angles of hit
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:109
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_thetaCluster
float m_thetaCluster
polar angle of cluster
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:96
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_tree
TTree * m_tree
Root tree for saving the output.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:80
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_tracks
StoreArray< Track > m_tracks
Required input array of Tracks.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:66
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_trackNo_array
std::vector< int > * m_trackNo_array
array of track numbers
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:103
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_trackNo
int m_trackNo
counter to distinguish tracks
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:87
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
Optional input array of EventMetaData.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:72
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::terminate
virtual void terminate() override
Clean up anything you created in initialize().
Definition: ECLTrackClusterMatchingParametrizationExpertModule.cc:233
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_eclClusters
StoreArray< ECLCluster > m_eclClusters
Required input array of ECLClusters.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:68
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_errorTheta
float m_errorTheta
uncertainty on polar angle of hit
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:98
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_errorPhi
float m_errorPhi
uncertainty on azimuthal angle of hit
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:94
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_writeToRoot
bool m_writeToRoot
if true, a rootFile named by m_rootFileName will be filled with info
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:78
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_rootFileName
std::string m_rootFileName
name of the root file
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:77
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::initialize
virtual void initialize() override
Use this to initialize resources or memory your module needs.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.cc:58
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_true_match
int m_true_match
cluster related to hit is related to same MCParticle as track
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:101
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_trackFitResults
StoreArray< TrackFitResult > m_trackFitResults
Required input array of TrackFitResults.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:67
Belle2::ECLTrackClusterMatchingParametrizationExpertModule::m_mcParticles
StoreArray< MCParticle > m_mcParticles
Required input array of MCParticles.
Definition: ECLTrackClusterMatchingParametrizationExpertModule.h:69