Belle II Software development
ECLTrackClusterMatchingModule.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 <TF1.h>
11
12#include <ecl/dataobjects/ECLCalDigit.h>
13#include <ecl/dataobjects/ECLShower.h>
14#include <framework/core/Module.h>
15#include <framework/database/DBObjPtr.h>
16#include <framework/datastore/StoreArray.h>
17#include <mdst/dataobjects/ECLCluster.h>
18#include <mdst/dataobjects/Track.h>
19#include <mdst/dataobjects/TrackFitResult.h>
20#include <tracking/dataobjects/ExtHit.h>
21
22namespace Belle2 {
27 class ECLTrackClusterMatchingParameterizations;
28 class ECLTrackClusterMatchingThresholds;
29
35 public:
38
41
47 virtual void initialize() override;
48
53 virtual void event() override;
54
56 virtual void terminate() override;
57
58 private:
60 bool isECLEnterHit(const ExtHit& extHit) const;
61
63 bool isECLHit(const ExtHit& extHit) const;
64
66 double showerQuality(double deltaPhi, double deltaTheta, double pt, int eclDetectorRegion, int hitStatus) const;
67
72 double phiConsistency(double deltaPhi, double pt, int eclDetectorRegion, int hitStatus) const;
73
78 double thetaConsistency(double deltaTheta, double pt, int eclDetectorRegion, int hitStatus) const;
79
80 bool trackTowardsGap(double theta) const;
82 void optimizedPTMatchingConsistency(double theta, double pt);
114 std::vector<std::pair<double, double>> m_matchingThresholdValuesFWD;
115 std::vector<std::pair<double, std::pair<double, double>>> m_matchingThresholdValuesBRL;
116 std::vector<std::pair<double, double>> m_matchingThresholdValuesBWD;
131 };
133} //Belle2
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
The module creates and saves a Relation between Tracks and ECLCluster in the DataStore.
TF1 f_thetaRMSBRLNEAR
function to describe theta RMS for BRL NEAR
TF1 f_thetaRMSBRLDL
function to describe theta RMS for BRL DL
TF1 f_thetaRMSBRLCROSS
function to describe theta RMS for BRL CROSS
int m_minimalCDCHits
minimal required number of CDC hits before track-cluster match is initiated
StoreArray< ECLShower > m_eclShowers
Required input array of ECLShowers.
double m_matchingPTThreshold
pt limit between angular-distance based and crystal-entering based matching algorithm
std::vector< std::pair< double, double > > m_matchingThresholdValuesFWD
Matching threshold values for FWD.
std::vector< std::pair< double, std::pair< double, double > > > m_matchingThresholdValuesBRL
Matching threshold values for BRL.
virtual void initialize() override
Use this to initialize resources or memory your module needs.
TF1 f_phiRMSFWDCROSS
function to describe phi RMS for FWD CROSS
DBObjPtr< ECLTrackClusterMatchingParameterizations > m_matchingParameterizations
Parameterizations of RMS.
virtual void event() override
Called once for each event.
StoreArray< TrackFitResult > m_trackFitResults
Required input array of TrackFitResults.
bool m_angularDistanceMatching
members of ECLTrackClusterMatching Module
TF1 f_phiRMSBWDCROSS
function to describe phi RMS for BWD CROSS
virtual void terminate() override
Clean up anything created in initialize().
TF1 f_thetaRMSFWDDL
function to describe theta RMS for FWD DL
double m_matchingConsistency
minimal quality of ExtHit-ECLCluster pair for positive track-cluster match
virtual ~ECLTrackClusterMatchingModule()
Use to clean up anything you created in the constructor.
bool m_useOptimizedMatchingConsistency
if true, a theta dependent matching criterion will be used
TF1 f_phiRMSBWDNEAR
function to describe phi RMS for BWD NEAR
bool isECLHit(const ExtHit &extHit) const
Check if extrapolated hit is inside ECL and matches one of the desired categories.
void optimizedPTMatchingConsistency(double theta, double pt)
choose criterion depending on track's pt
TF1 f_phiRMSBRLDL
function to describe phi RMS for BRL DL
StoreArray< Track > m_tracks
Required input array of Tracks.
bool isECLEnterHit(const ExtHit &extHit) const
Check if status of extrapolated hit is entering of ECL.
TF1 f_phiRMSFWDNEAR
function to describe phi RMS for FWD NEAR
std::vector< std::pair< double, double > > m_matchingThresholdValuesBWD
Matching threshold values for BWD.
TF1 f_thetaRMSBWDDL
function to describe theta RMS for BWD DL
StoreArray< ECLCluster > m_eclClusters
Required input array of ECLClusters.
TF1 f_phiRMSBRLNEAR
function to describe phi RMS for BRL NEAR
TF1 f_thetaRMSBWDCROSS
function to describe theta RMS for BWD CROSS
ECLTrackClusterMatchingModule()
Constructor, for setting module description and parameters.
TF1 f_thetaRMSFWDNEAR
function to describe theta RMS for FWD NEAR
DBObjPtr< ECLTrackClusterMatchingThresholds > m_matchingThresholds
Optimized matching thresholds.
StoreArray< ExtHit > m_extHits
Required input array of ExtHits.
TF1 f_phiRMSFWDDL
function to describe phi RMS for FWD DL
double m_brlEdgeTheta
distance of polar angle from gaps where crystal-entering based matching is applied (in rad)
bool m_skipZeroChargeTracks
if true, tracks whose charge has been set to zero are excluded from track-cluster matching
bool trackTowardsGap(double theta) const
return if track points towards gap or adjacent part of barrel
TF1 f_thetaRMSFWDCROSS
function to describe theta RMS for FWD CROSS
TF1 f_phiRMSBWDDL
function to describe phi RMS for BWD DL
double thetaConsistency(double deltaTheta, double pt, int eclDetectorRegion, int hitStatus) const
Calculate theta consistency based on difference in polar angle.
TF1 f_phiRMSBRLCROSS
function to describe phi RMS for BRL CROSS
TF1 f_thetaRMSBWDNEAR
function to describe theta RMS for BWD NEAR
StoreArray< ECLCalDigit > m_eclCalDigits
Required input array of ECLCalDigits.
double phiConsistency(double deltaPhi, double pt, int eclDetectorRegion, int hitStatus) const
Calculate phi consistency based on difference in azimuthal angle.
double showerQuality(double deltaPhi, double deltaTheta, double pt, int eclDetectorRegion, int hitStatus) const
Calculate matching quality based on phi and theta consistencies.
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
Abstract base class for different kinds of events.