CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ticl::SeedingRegionByL1 Class Referencefinal

#include <SeedingRegionByL1.h>

Inheritance diagram for ticl::SeedingRegionByL1:
ticl::SeedingRegionAlgoBase

Public Member Functions

void initialize (const edm::EventSetup &es) override
 
void makeRegions (const edm::Event &ev, const edm::EventSetup &es, std::vector< TICLSeedingRegion > &result) override
 
 SeedingRegionByL1 (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 
- Public Member Functions inherited from ticl::SeedingRegionAlgoBase
 SeedingRegionAlgoBase (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 
virtual ~SeedingRegionAlgoBase ()
 

Static Public Member Functions

static void fillPSetDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from ticl::SeedingRegionAlgoBase
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 

Private Member Functions

double tkEmOfflineEt (double et) const
 

Private Attributes

int algoVerbosity_ = 0
 
std::vector< double > endcapScalings_
 
edm::EDGetTokenT< std::vector< l1t::TkEm > > l1TkEmsToken_
 
double maxAbsEta_
 
double minAbsEta_
 
double minPt_
 
int quality_
 

Additional Inherited Members

- Public Types inherited from ticl::SeedingRegionAlgoBase
enum  VerbosityLevel {
  None = 0, Basic, Advanced, Expert,
  Guru
}
 
- Protected Attributes inherited from ticl::SeedingRegionAlgoBase
int algo_verbosity_
 
int algoId_
 

Detailed Description

Definition at line 22 of file SeedingRegionByL1.h.

Constructor & Destructor Documentation

◆ SeedingRegionByL1()

ticl::SeedingRegionByL1::SeedingRegionByL1 ( const edm::ParameterSet conf,
edm::ConsumesCollector sumes 
)

Definition at line 19 of file SeedingRegionByL1.cc.

20  : SeedingRegionAlgoBase(conf, sumes),
21  l1TkEmsToken_(sumes.consumes<std::vector<l1t::TkEm>>(conf.getParameter<edm::InputTag>("l1TkEmColl"))),
22  algoVerbosity_(conf.getParameter<int>("algo_verbosity")),
23  minPt_(conf.getParameter<double>("minPt")),
24  minAbsEta_(conf.getParameter<double>("minAbsEta")),
25  maxAbsEta_(conf.getParameter<double>("maxAbsEta")),
26  endcapScalings_(conf.getParameter<std::vector<double>>("endcapScalings")),
27  quality_(conf.getParameter<int>("quality")) {}

Member Function Documentation

◆ fillPSetDescription()

void ticl::SeedingRegionByL1::fillPSetDescription ( edm::ParameterSetDescription desc)
static

Definition at line 60 of file SeedingRegionByL1.cc.

60  {
61  desc.add<edm::InputTag>("l1TkEmColl", edm::InputTag("L1TkPhotonsHGC", "EG"));
62  desc.add<double>("minPt", 10);
63  desc.add<double>("minAbsEta", 1.479);
64  desc.add<double>("maxAbsEta", 4.0);
65  desc.add<std::vector<double>>("endcapScalings", {3.17445, 1.13219, 0.0});
66  desc.add<int>("quality", 5);
68 }

References submitPVResolutionJobs::desc, ticl::SeedingRegionAlgoBase::fillPSetDescription(), and HLT_FULL_cff::InputTag.

◆ initialize()

void ticl::SeedingRegionByL1::initialize ( const edm::EventSetup es)
inlineoverridevirtual

Implements ticl::SeedingRegionAlgoBase.

Definition at line 26 of file SeedingRegionByL1.h.

26 {};

◆ makeRegions()

void ticl::SeedingRegionByL1::makeRegions ( const edm::Event ev,
const edm::EventSetup es,
std::vector< TICLSeedingRegion > &  result 
)
overridevirtual

Implements ticl::SeedingRegionAlgoBase.

Definition at line 29 of file SeedingRegionByL1.cc.

31  {
32  auto l1TrkEms = ev.getHandle(l1TkEmsToken_);
33  edm::ProductID l1tkemsId = l1TrkEms.id();
34 
35  for (size_t indx = 0; indx < (*l1TrkEms).size(); indx++) {
36  const auto &l1TrkEm = (*l1TrkEms)[indx];
37  double offlinePt = this->tkEmOfflineEt(l1TrkEm.pt());
38  if ((offlinePt < minPt_) || (std::abs(l1TrkEm.eta()) < minAbsEta_) || (std::abs(l1TrkEm.eta()) > maxAbsEta_) ||
39  (l1TrkEm.EGRef()->hwQual() != quality_)) {
40  continue;
41  }
42 
43  int iSide = int(l1TrkEm.eta() > 0);
44  result.emplace_back(GlobalPoint(l1TrkEm.p4().X(), l1TrkEm.p4().Y(), l1TrkEm.p4().Z()),
45  GlobalVector(l1TrkEm.px(), l1TrkEm.py(), l1TrkEm.pz()),
46  iSide,
47  indx,
48  l1tkemsId);
49  }
50 
51  std::sort(result.begin(), result.end(), [](const TICLSeedingRegion &a, const TICLSeedingRegion &b) {
52  return a.directionAtOrigin.perp2() > b.directionAtOrigin.perp2();
53  });
54 }

References a, funct::abs(), b, ev, edm::ProductID::id(), createfilelist::int, mps_fire::result, and jetUpdater_cfi::sort.

◆ tkEmOfflineEt()

double ticl::SeedingRegionByL1::tkEmOfflineEt ( double  et) const
private

Definition at line 56 of file SeedingRegionByL1.cc.

56  {
57  return (endcapScalings_.at(0) + et * endcapScalings_.at(1) + et * et * endcapScalings_.at(2));
58 }

References EgHLTOffHistBins_cfi::et.

Member Data Documentation

◆ algoVerbosity_

int ticl::SeedingRegionByL1::algoVerbosity_ = 0
private

Definition at line 32 of file SeedingRegionByL1.h.

◆ endcapScalings_

std::vector<double> ticl::SeedingRegionByL1::endcapScalings_
private

Definition at line 36 of file SeedingRegionByL1.h.

◆ l1TkEmsToken_

edm::EDGetTokenT<std::vector<l1t::TkEm> > ticl::SeedingRegionByL1::l1TkEmsToken_
private

Definition at line 31 of file SeedingRegionByL1.h.

◆ maxAbsEta_

double ticl::SeedingRegionByL1::maxAbsEta_
private

Definition at line 35 of file SeedingRegionByL1.h.

◆ minAbsEta_

double ticl::SeedingRegionByL1::minAbsEta_
private

Definition at line 34 of file SeedingRegionByL1.h.

◆ minPt_

double ticl::SeedingRegionByL1::minPt_
private

Definition at line 33 of file SeedingRegionByL1.h.

◆ quality_

int ticl::SeedingRegionByL1::quality_
private

Definition at line 37 of file SeedingRegionByL1.h.

ticl::SeedingRegionByL1::minAbsEta_
double minAbsEta_
Definition: SeedingRegionByL1.h:34
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
ticl::SeedingRegionByL1::quality_
int quality_
Definition: SeedingRegionByL1.h:37
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
ticl::SeedingRegionByL1::maxAbsEta_
double maxAbsEta_
Definition: SeedingRegionByL1.h:35
ticl::SeedingRegionByL1::algoVerbosity_
int algoVerbosity_
Definition: SeedingRegionByL1.h:32
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
ticl::SeedingRegionByL1::endcapScalings_
std::vector< double > endcapScalings_
Definition: SeedingRegionByL1.h:36
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
createfilelist.int
int
Definition: createfilelist.py:10
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
ticl::SeedingRegionByL1::l1TkEmsToken_
edm::EDGetTokenT< std::vector< l1t::TkEm > > l1TkEmsToken_
Definition: SeedingRegionByL1.h:31
TICLSeedingRegion
Definition: TICLSeedingRegion.h:14
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
ticl::SeedingRegionAlgoBase::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: SeedingRegionAlgoBase.h:34
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
ticl::SeedingRegionByL1::minPt_
double minPt_
Definition: SeedingRegionByL1.h:33
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ticl::SeedingRegionByL1::tkEmOfflineEt
double tkEmOfflineEt(double et) const
Definition: SeedingRegionByL1.cc:56
ticl::SeedingRegionAlgoBase::SeedingRegionAlgoBase
SeedingRegionAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Definition: SeedingRegionAlgoBase.h:24
mps_fire.result
result
Definition: mps_fire.py:311
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::InputTag
Definition: InputTag.h:15
edm::ProductID
Definition: ProductID.h:27
edm::ProductID::id
ProductIndex id() const
Definition: ProductID.h:35