CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
TkCaloLinkMetric tkCaloLinkMetric_
Definition: PFAlgo2HGC.h:18
unsigned int tightTrackMinStubs_
Definition: PFAlgo2HGC.h:22
float tightTrackMaxInvisiblePt_
Definition: PFAlgo2HGC.h:23
void unlinkedtk_algo(Region &r, const std::vector< int > &tk2calo) const
promote unlinked low pt tracks to hadrons
Definition: PFAlgo2HGC.cc:385
void unlinkedcalo_algo(Region &r) const
process unmatched calo clusters
Definition: PFAlgo2HGC.cc:629
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
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
enum l1tpf_impl::PFAlgo2HGC::MuMatchMode muMatchMode_
PFAlgo2HGC(const edm::ParameterSet &)
Definition: PFAlgo2HGC.cc:19
void link_tk2calo(Region &r, std::vector< int > &tk2calo) const
track to calo matching
Definition: PFAlgo2HGC.cc:257
void runPF(Region &r) const override
Definition: PFAlgo2HGC.cc:62
void save_muons(Region &r, const std::vector< int > &tk2mu) const
save muons in output list
Definition: PFAlgo2HGC.cc:640
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
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
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