Belle II Software  release-05-02-19
ECLTrackClusterMatchingModule.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 <TF1.h>
13 
14 #include <ecl/dataobjects/ECLCalDigit.h>
15 #include <ecl/dataobjects/ECLShower.h>
16 #include <framework/core/Module.h>
17 #include <framework/database/DBObjPtr.h>
18 #include <framework/datastore/StoreArray.h>
19 #include <mdst/dataobjects/ECLCluster.h>
20 #include <mdst/dataobjects/Track.h>
21 #include <mdst/dataobjects/TrackFitResult.h>
22 #include <tracking/dataobjects/ExtHit.h>
23 
24 namespace Belle2 {
29  class ECLTrackClusterMatchingParameterizations;
30  class ECLTrackClusterMatchingThresholds;
31 
36  class ECLTrackClusterMatchingModule : public Module {
37  public:
40 
43 
49  virtual void initialize() override;
50 
55  virtual void event() override;
56 
58  virtual void terminate() override;
59 
60  private:
62  bool isECLEnterHit(const ExtHit& extHit) const;
63 
65  bool isECLHit(const ExtHit& extHit) const;
66 
68  double showerQuality(double deltaPhi, double deltaTheta, double pt, int eclDetectorRegion, int hitStatus) const;
69 
74  double phiConsistency(double deltaPhi, double pt, int eclDetectorRegion, int hitStatus) const;
75 
80  double thetaConsistency(double deltaTheta, double pt, int eclDetectorRegion, int hitStatus) const;
81 
82  bool trackTowardsGap(double theta) const;
84  void optimizedPTMatchingConsistency(double theta, double pt);
86  StoreArray<ExtHit> m_extHits;
87  StoreArray<Track> m_tracks;
88  StoreArray<TrackFitResult> m_trackFitResults;
89  StoreArray<ECLCluster> m_eclClusters;
90  StoreArray<ECLShower> m_eclShowers;
91  StoreArray<ECLCalDigit> m_eclCalDigits;
93  DBObjPtr<ECLTrackClusterMatchingParameterizations> m_matchingParameterizations;
100  TF1 f_phiRMSBRLNEAR;
102  TF1 f_phiRMSBWDDL;
116  std::vector<std::pair<double, double>> m_matchingThresholdValuesFWD;
117  std::vector<std::pair<double, std::pair<double, double>>> m_matchingThresholdValuesBRL;
118  std::vector<std::pair<double, double>> m_matchingThresholdValuesBWD;
129  double m_matchingConsistency;
130  double m_matchingPTThreshold;
131  double m_brlEdgeTheta;
132  int m_minimalCDCHits;
133  };
135 } //Belle2
Belle2::ECLTrackClusterMatchingModule::trackTowardsGap
bool trackTowardsGap(double theta) const
return if track points towards gap or adjacent part of barrel
Definition: ECLTrackClusterMatchingModule.cc:389
Belle2::ECLTrackClusterMatchingModule::event
virtual void event() override
Called once for each event.
Definition: ECLTrackClusterMatchingModule.cc:110
Belle2::ECLTrackClusterMatchingModule::f_phiRMSFWDNEAR
TF1 f_phiRMSFWDNEAR
function to describe phi RMS for FWD NEAR
Definition: ECLTrackClusterMatchingModule.h:105
Belle2::ECLTrackClusterMatchingModule::initialize
virtual void initialize() override
Use this to initialize resources or memory your module needs.
Definition: ECLTrackClusterMatchingModule.cc:51
Belle2::ECLTrackClusterMatchingModule::f_phiRMSFWDCROSS
TF1 f_phiRMSFWDCROSS
function to describe phi RMS for FWD CROSS
Definition: ECLTrackClusterMatchingModule.h:103
Belle2::ECLTrackClusterMatchingModule::~ECLTrackClusterMatchingModule
virtual ~ECLTrackClusterMatchingModule()
Use to clean up anything you created in the constructor.
Definition: ECLTrackClusterMatchingModule.cc:47
Belle2::ECLTrackClusterMatchingModule::f_phiRMSBRLNEAR
TF1 f_phiRMSBRLNEAR
function to describe phi RMS for BRL NEAR
Definition: ECLTrackClusterMatchingModule.h:108
Belle2::ECLTrackClusterMatchingModule::m_skipZeroChargeTracks
bool m_skipZeroChargeTracks
if true, tracks whose charge has been set to zero are excluded from track-cluster matching
Definition: ECLTrackClusterMatchingModule.h:136
Belle2::ECLTrackClusterMatchingModule::m_minimalCDCHits
int m_minimalCDCHits
minimal required number of CDC hits before track-cluster match is initiated
Definition: ECLTrackClusterMatchingModule.h:140
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSFWDDL
TF1 f_thetaRMSFWDDL
function to describe theta RMS for FWD DL
Definition: ECLTrackClusterMatchingModule.h:113
Belle2::ECLTrackClusterMatchingModule::f_phiRMSBRLCROSS
TF1 f_phiRMSBRLCROSS
function to describe phi RMS for BRL CROSS
Definition: ECLTrackClusterMatchingModule.h:106
Belle2::ECLTrackClusterMatchingModule::m_useOptimizedMatchingConsistency
bool m_useOptimizedMatchingConsistency
if true, a theta dependent matching criterion will be used
Definition: ECLTrackClusterMatchingModule.h:135
Belle2::ECLTrackClusterMatchingModule::f_phiRMSBWDNEAR
TF1 f_phiRMSBWDNEAR
function to describe phi RMS for BWD NEAR
Definition: ECLTrackClusterMatchingModule.h:111
Belle2::ECLTrackClusterMatchingModule::m_matchingThresholdValuesBWD
std::vector< std::pair< double, double > > m_matchingThresholdValuesBWD
Matching threshold values for BWD.
Definition: ECLTrackClusterMatchingModule.h:126
Belle2::ECLTrackClusterMatchingModule::optimizedPTMatchingConsistency
void optimizedPTMatchingConsistency(double theta, double pt)
choose criterion depending on track's pt
Definition: ECLTrackClusterMatchingModule.cc:398
Belle2::ECLTrackClusterMatchingModule::f_phiRMSBWDDL
TF1 f_phiRMSBWDDL
function to describe phi RMS for BWD DL
Definition: ECLTrackClusterMatchingModule.h:110
Belle2::ECLTrackClusterMatchingModule::m_brlEdgeTheta
double m_brlEdgeTheta
distance of polar angle from gaps where crystal-entering based matching is applied (in rad)
Definition: ECLTrackClusterMatchingModule.h:139
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSBWDNEAR
TF1 f_thetaRMSBWDNEAR
function to describe theta RMS for BWD NEAR
Definition: ECLTrackClusterMatchingModule.h:120
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSFWDCROSS
TF1 f_thetaRMSFWDCROSS
function to describe theta RMS for FWD CROSS
Definition: ECLTrackClusterMatchingModule.h:112
Belle2::ECLTrackClusterMatchingModule::terminate
virtual void terminate() override
Clean up anything created in initialize().
Definition: ECLTrackClusterMatchingModule.cc:295
Belle2::ECLTrackClusterMatchingModule::m_eclCalDigits
StoreArray< ECLCalDigit > m_eclCalDigits
Required input array of ECLCalDigits.
Definition: ECLTrackClusterMatchingModule.h:99
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::ECLTrackClusterMatchingModule::phiConsistency
double phiConsistency(double deltaPhi, double pt, int eclDetectorRegion, int hitStatus) const
Calculate phi consistency based on difference in azimuthal angle.
Definition: ECLTrackClusterMatchingModule.cc:323
Belle2::ECLTrackClusterMatchingModule::m_trackFitResults
StoreArray< TrackFitResult > m_trackFitResults
Required input array of TrackFitResults.
Definition: ECLTrackClusterMatchingModule.h:96
Belle2::ECLTrackClusterMatchingModule::thetaConsistency
double thetaConsistency(double deltaTheta, double pt, int eclDetectorRegion, int hitStatus) const
Calculate theta consistency based on difference in polar angle.
Definition: ECLTrackClusterMatchingModule.cc:356
Belle2::ECLTrackClusterMatchingModule::m_matchingConsistency
double m_matchingConsistency
minimal quality of ExtHit-ECLCluster pair for positive track-cluster match
Definition: ECLTrackClusterMatchingModule.h:137
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECLTrackClusterMatchingModule::m_matchingThresholdValuesBRL
std::vector< std::pair< double, std::pair< double, double > > > m_matchingThresholdValuesBRL
Matching threshold values for BRL.
Definition: ECLTrackClusterMatchingModule.h:125
Belle2::ECLTrackClusterMatchingModule::m_matchingPTThreshold
double m_matchingPTThreshold
pt limit between angular-distance based and crystal-entering based matching algorithm
Definition: ECLTrackClusterMatchingModule.h:138
Belle2::ECLTrackClusterMatchingModule::m_eclShowers
StoreArray< ECLShower > m_eclShowers
Required input array of ECLShowers.
Definition: ECLTrackClusterMatchingModule.h:98
Belle2::ECLTrackClusterMatchingModule::m_eclClusters
StoreArray< ECLCluster > m_eclClusters
Required input array of ECLClusters.
Definition: ECLTrackClusterMatchingModule.h:97
Belle2::ECLTrackClusterMatchingModule::m_angularDistanceMatching
bool m_angularDistanceMatching
members of ECLTrackClusterMatching Module
Definition: ECLTrackClusterMatchingModule.h:134
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSBWDDL
TF1 f_thetaRMSBWDDL
function to describe theta RMS for BWD DL
Definition: ECLTrackClusterMatchingModule.h:119
Belle2::ECLTrackClusterMatchingModule::ECLTrackClusterMatchingModule
ECLTrackClusterMatchingModule()
Constructor, for setting module description and parameters.
Definition: ECLTrackClusterMatchingModule.cc:24
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSFWDNEAR
TF1 f_thetaRMSFWDNEAR
function to describe theta RMS for FWD NEAR
Definition: ECLTrackClusterMatchingModule.h:114
Belle2::ECLTrackClusterMatchingModule::isECLEnterHit
bool isECLEnterHit(const ExtHit &extHit) const
Check if status of extrapolated hit is entering of ECL.
Definition: ECLTrackClusterMatchingModule.cc:299
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSBRLCROSS
TF1 f_thetaRMSBRLCROSS
function to describe theta RMS for BRL CROSS
Definition: ECLTrackClusterMatchingModule.h:115
Belle2::ECLTrackClusterMatchingModule::m_matchingParameterizations
DBObjPtr< ECLTrackClusterMatchingParameterizations > m_matchingParameterizations
Parameterizations of RMS.
Definition: ECLTrackClusterMatchingModule.h:101
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSBWDCROSS
TF1 f_thetaRMSBWDCROSS
function to describe theta RMS for BWD CROSS
Definition: ECLTrackClusterMatchingModule.h:118
Belle2::ECLTrackClusterMatchingModule::m_matchingThresholdValuesFWD
std::vector< std::pair< double, double > > m_matchingThresholdValuesFWD
Matching threshold values for FWD.
Definition: ECLTrackClusterMatchingModule.h:124
Belle2::ECLTrackClusterMatchingModule::f_phiRMSBWDCROSS
TF1 f_phiRMSBWDCROSS
function to describe phi RMS for BWD CROSS
Definition: ECLTrackClusterMatchingModule.h:109
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSBRLNEAR
TF1 f_thetaRMSBRLNEAR
function to describe theta RMS for BRL NEAR
Definition: ECLTrackClusterMatchingModule.h:117
Belle2::ECLTrackClusterMatchingModule::m_extHits
StoreArray< ExtHit > m_extHits
Required input array of ExtHits.
Definition: ECLTrackClusterMatchingModule.h:94
Belle2::ECLTrackClusterMatchingModule::isECLHit
bool isECLHit(const ExtHit &extHit) const
Check if extrapolated hit is inside ECL and matches one of the desired categories.
Definition: ECLTrackClusterMatchingModule.cc:307
Belle2::ECLTrackClusterMatchingModule::f_thetaRMSBRLDL
TF1 f_thetaRMSBRLDL
function to describe theta RMS for BRL DL
Definition: ECLTrackClusterMatchingModule.h:116
Belle2::ECLTrackClusterMatchingModule::m_matchingThresholds
DBObjPtr< ECLTrackClusterMatchingThresholds > m_matchingThresholds
Optimized matching thresholds.
Definition: ECLTrackClusterMatchingModule.h:122
Belle2::ECLTrackClusterMatchingModule::f_phiRMSBRLDL
TF1 f_phiRMSBRLDL
function to describe phi RMS for BRL DL
Definition: ECLTrackClusterMatchingModule.h:107
Belle2::ECLTrackClusterMatchingModule::f_phiRMSFWDDL
TF1 f_phiRMSFWDDL
function to describe phi RMS for FWD DL
Definition: ECLTrackClusterMatchingModule.h:104
Belle2::ECLTrackClusterMatchingModule::showerQuality
double showerQuality(double deltaPhi, double deltaTheta, double pt, int eclDetectorRegion, int hitStatus) const
Calculate matching quality based on phi and theta consistencies.
Definition: ECLTrackClusterMatchingModule.cc:315
Belle2::ECLTrackClusterMatchingModule::m_tracks
StoreArray< Track > m_tracks
Required input array of Tracks.
Definition: ECLTrackClusterMatchingModule.h:95