CMS 3D CMS Logo

PFAlgo2HGC.h
Go to the documentation of this file.
1 #ifndef L1Trigger_Phase2L1ParticleFlow_PFAlgo2HGC_h
2 #define L1Trigger_Phase2L1ParticleFlow_PFAlgo2HGC_h
3 
5 
6 namespace l1tpf_impl {
7  class PFAlgo2HGC : public PFAlgoBase {
8  public:
10  void runPF(Region &r) const override;
11 
12  protected:
13  float drMatchMu_;
17  enum class TkCaloLinkMetric { BestByDR = 0, BestByDRPt = 1, BestByDR2Pt2 = 2 };
22  unsigned int tightTrackMinStubs_;
26 
28  void link_tk2mu(Region &r, std::vector<int> &tk2mu, std::vector<int> &mu2tk) const;
29 
31  // tk2calo[itk] = icalo or -1
32  void link_tk2calo(Region &r, std::vector<int> &tk2calo) const;
33 
35  void sum_tk2calo(Region &r,
36  const std::vector<int> &tk2calo,
37  std::vector<int> &calo2ntk,
38  std::vector<float> &calo2sumtkpt,
39  std::vector<float> &calo2sumtkpterr) const;
40 
42  void unlinkedtk_algo(Region &r, const std::vector<int> &tk2calo) const;
43 
45  // take hadrons that are not track matched, close by a hadron which has an excess of track pt vs calo pt
46  // add this pt to the calo pt of the other cluster
47  // off by default, as it seems to not do much in jets even if it helps remove tails in single-pion events
48  void calo_relink(Region &r,
49  const std::vector<int> &calo2ntk,
50  const std::vector<float> &calo2sumtkpt,
51  const std::vector<float> &calo2sumtkpterr) const;
52 
54  // alpha[icalo] = x < 1 if all tracks linked to icalo must have their pt rescaled by x
55  void linkedcalo_algo(Region &r,
56  const std::vector<int> &calo2ntk,
57  const std::vector<float> &calo2sumtkpt,
58  const std::vector<float> &calo2sumtkpterr,
59  std::vector<float> &calo2alpha) const;
60 
62  void linkedtk_algo(Region &r,
63  const std::vector<int> &tk2calo,
64  const std::vector<int> &calo2ntk,
65  const std::vector<float> &calo2alpha) const;
66 
68  void unlinkedcalo_algo(Region &r) const;
69 
71  void save_muons(Region &r, const std::vector<int> &tk2mu) const;
72  };
73 
74 } // namespace l1tpf_impl
75 
76 #endif
l1tpf_impl::PFAlgo2HGC::unlinkedtk_algo
void unlinkedtk_algo(Region &r, const std::vector< int > &tk2calo) const
promote unlinked low pt tracks to hadrons
Definition: PFAlgo2HGC.cc:385
l1tpf_impl
Definition: BitwisePFAlgo.h:8
l1tpf_impl::PFAlgo2HGC::caloReLinkDr_
float caloReLinkDr_
Definition: PFAlgo2HGC.h:20
l1tpf_impl::PFAlgo2HGC::maxInvisiblePt_
float maxInvisiblePt_
Definition: PFAlgo2HGC.h:15
l1tpf_impl::PFAlgo2HGC::GoodTrackStatus
GoodTrackStatus
Definition: PFAlgo2HGC.h:24
l1tpf_impl::PFAlgo2HGC::BadTrackStatus
BadTrackStatus
Definition: PFAlgo2HGC.h:25
l1tpf_impl::PFAlgo2HGC::MuMatchMode
MuMatchMode
Definition: PFAlgo2HGC.h:14
l1tpf_impl::PFAlgo2HGC::sumTkCaloErr2_
bool sumTkCaloErr2_
Definition: PFAlgo2HGC.h:21
l1tpf_impl::PFAlgo2HGC::save_muons
void save_muons(Region &r, const std::vector< int > &tk2mu) const
save muons in output list
Definition: PFAlgo2HGC.cc:640
l1tpf_impl::PFAlgo2HGC::calo_relink
void calo_relink(Region &r, const std::vector< int > &calo2ntk, const std::vector< float > &calo2sumtkpt, const std::vector< float > &calo2sumtkpterr) const
try to recover split hadron showers (v1.0):
Definition: PFAlgo2HGC.cc:408
l1tpf_impl::PFAlgo2HGC::caloReLinkThreshold_
float caloReLinkThreshold_
Definition: PFAlgo2HGC.h:20
l1tpf_impl::PFAlgo2HGC::useTrackCaloSigma_
bool useTrackCaloSigma_
Definition: PFAlgo2HGC.h:16
PFAlgoBase.h
l1tpf_impl::PFAlgo2HGC::sum_tk2calo
void sum_tk2calo(Region &r, const std::vector< int > &tk2calo, std::vector< int > &calo2ntk, std::vector< float > &calo2sumtkpt, std::vector< float > &calo2sumtkpterr) const
for each calo, compute the sum of the track pt
Definition: PFAlgo2HGC.cc:360
l1tpf_impl::PFAlgo2HGC::MuMatchMode::BoxBestByPtRatio
l1tpf_impl::PFAlgo2HGC::unlinkedcalo_algo
void unlinkedcalo_algo(Region &r) const
process unmatched calo clusters
Definition: PFAlgo2HGC.cc:629
l1tpf_impl::PFAlgo2HGC::caloReLinkStep_
bool caloReLinkStep_
Definition: PFAlgo2HGC.h:19
l1tpf_impl::PFAlgo2HGC::trackEmUseAlsoTrackSigma_
bool trackEmUseAlsoTrackSigma_
Definition: PFAlgo2HGC.h:21
l1tpf_impl::PFAlgo2HGC::TkCaloLinkMetric::BestByDR
l1tpf_impl::PFAlgo2HGC::linkedcalo_algo
void linkedcalo_algo(Region &r, const std::vector< int > &calo2ntk, const std::vector< float > &calo2sumtkpt, const std::vector< float > &calo2sumtkpterr, std::vector< float > &calo2alpha) const
process matched calo clusters, compare energy to sum track pt, compute track rescaling factor if need...
Definition: PFAlgo2HGC.cc:472
l1tpf_impl::PFAlgo2HGC
Definition: PFAlgo2HGC.h:7
l1tpf_impl::PFAlgo2HGC::GoodTK_NoCalo
Definition: PFAlgo2HGC.h:24
l1tpf_impl::PFAlgo2HGC::rescaleUnmatchedTrack_
bool rescaleUnmatchedTrack_
Definition: PFAlgo2HGC.h:16
l1tpf_impl::PFAlgo2HGC::linkedtk_algo
void linkedtk_algo(Region &r, const std::vector< int > &tk2calo, const std::vector< int > &calo2ntk, const std::vector< float > &calo2alpha) const
process matched tracks, if necessary rescale or average
Definition: PFAlgo2HGC.cc:563
l1tpf_impl::PFAlgo2HGC::tightTrackMaxInvisiblePt_
float tightTrackMaxInvisiblePt_
Definition: PFAlgo2HGC.h:23
l1tpf_impl::PFAlgo2HGC::TkCaloLinkMetric
TkCaloLinkMetric
Definition: PFAlgo2HGC.h:17
l1tpf_impl::PFAlgo2HGC::TkCaloLinkMetric::BestByDRPt
l1tpf_impl::PFAlgo2HGC::ptMatchHigh_
float ptMatchHigh_
Definition: PFAlgo2HGC.h:15
l1tpf_impl::Region
Definition: Region.h:8
edm::ParameterSet
Definition: ParameterSet.h:47
l1tpf_impl::PFAlgo2HGC::caloTrkWeightedAverage_
bool caloTrkWeightedAverage_
Definition: PFAlgo2HGC.h:16
l1tpf_impl::PFAlgo2HGC::TkCaloLinkMetric::BestByDR2Pt2
l1tpf_impl::PFAlgo2HGC::link_tk2calo
void link_tk2calo(Region &r, std::vector< int > &tk2calo) const
track to calo matching
Definition: PFAlgo2HGC.cc:257
l1tpf_impl::PFAlgo2HGC::emCaloUseAlsoCaloSigma_
bool emCaloUseAlsoCaloSigma_
Definition: PFAlgo2HGC.h:21
l1tpf_impl::PFAlgo2HGC::link_tk2mu
void link_tk2mu(Region &r, std::vector< int > &tk2mu, std::vector< int > &mu2tk) const
do muon track linking (also sets track.muonLink)
Definition: PFAlgo2HGC.cc:167
l1tpf_impl::PFAlgo2HGC::muMatchMode_
enum l1tpf_impl::PFAlgo2HGC::MuMatchMode muMatchMode_
l1tpf_impl::PFAlgo2HGC::GoodTK_Calo_TkPt
Definition: PFAlgo2HGC.h:24
l1tpf_impl::PFAlgoBase
Definition: PFAlgoBase.h:11
l1tpf_impl::PFAlgo2HGC::runPF
void runPF(Region &r) const override
Definition: PFAlgo2HGC.cc:62
l1tpf_impl::PFAlgo2HGC::MuMatchMode::DrBestByPtRatio
l1tpf_impl::PFAlgo2HGC::GoodTk_Calo_CaloPt
Definition: PFAlgo2HGC.h:24
alignCSCRings.r
r
Definition: alignCSCRings.py:93
l1tpf_impl::PFAlgo2HGC::ecalPriority_
bool ecalPriority_
Definition: PFAlgo2HGC.h:21
l1tpf_impl::PFAlgo2HGC::drMatch_
float drMatch_
Definition: PFAlgo2HGC.h:15
l1tpf_impl::PFAlgo2HGC::PFAlgo2HGC
PFAlgo2HGC(const edm::ParameterSet &)
Definition: PFAlgo2HGC.cc:19
l1tpf_impl::PFAlgo2HGC::rescaleTracks_
bool rescaleTracks_
Definition: PFAlgo2HGC.h:21
l1tpf_impl::PFAlgo2HGC::tkCaloLinkMetric_
TkCaloLinkMetric tkCaloLinkMetric_
Definition: PFAlgo2HGC.h:18
l1tpf_impl::PFAlgo2HGC::tightTrackMaxChi2_
float tightTrackMaxChi2_
Definition: PFAlgo2HGC.h:23
l1tpf_impl::PFAlgo2HGC::ptMatchLow_
float ptMatchLow_
Definition: PFAlgo2HGC.h:15
l1tpf_impl::PFAlgo2HGC::tightTrackMinStubs_
unsigned int tightTrackMinStubs_
Definition: PFAlgo2HGC.h:22
l1tpf_impl::PFAlgo2HGC::drMatchMu_
float drMatchMu_
Definition: PFAlgo2HGC.h:13
l1tpf_impl::PFAlgo2HGC::MuMatchMode::DrBestByPtDiff
l1tpf_impl::PFAlgo2HGC::GoodTK_Calo_TkCaloPt
Definition: PFAlgo2HGC.h:24
l1tpf_impl::PFAlgo2HGC::BadTK_NoCalo
Definition: PFAlgo2HGC.h:25