CMS 3D CMS Logo

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

#include <SeedingRegionByHF.h>

Inheritance diagram for ticl::SeedingRegionByHF:
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
 
 SeedingRegionByHF (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 
 ~SeedingRegionByHF () override
 
- 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 edm::ParameterSetDescription makePSetDescription ()
 
- Static Public Member Functions inherited from ticl::SeedingRegionAlgoBase
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 

Private Member Functions

void buildFirstLayers ()
 

Private Attributes

int algoVerbosity_ = 0
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeo_token_
 
const CaloGeometrygeometry_
 
edm::EDGetTokenT< HFRecHitCollectionhfhits_token_
 
double maxAbsEta_
 
double minAbsEta_
 
double minEt_
 

Additional Inherited Members

- Protected Attributes inherited from ticl::SeedingRegionAlgoBase
int algo_verbosity_
 
int algoId_
 

Detailed Description

Definition at line 28 of file SeedingRegionByHF.h.

Constructor & Destructor Documentation

◆ SeedingRegionByHF()

SeedingRegionByHF::SeedingRegionByHF ( const edm::ParameterSet conf,
edm::ConsumesCollector sumes 
)

Definition at line 9 of file SeedingRegionByHF.cc.

References edm::BeginRun, edm::ConsumesCollector::esConsumes(), and geo_token_.

10  : SeedingRegionAlgoBase(conf, sumes),
12  minAbsEta_(conf.getParameter<double>("minAbsEta")),
13  maxAbsEta_(conf.getParameter<double>("maxAbsEta")),
14  minEt_(conf.getParameter<double>("minEt")) {
16 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
SeedingRegionAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geo_token_
edm::EDGetTokenT< HFRecHitCollection > hfhits_token_

◆ ~SeedingRegionByHF()

SeedingRegionByHF::~SeedingRegionByHF ( )
override

Definition at line 18 of file SeedingRegionByHF.cc.

18 {}

Member Function Documentation

◆ buildFirstLayers()

void ticl::SeedingRegionByHF::buildFirstLayers ( )
private

◆ fillPSetDescription()

void SeedingRegionByHF::fillPSetDescription ( edm::ParameterSetDescription desc)
static

Definition at line 55 of file SeedingRegionByHF.cc.

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

55  {
56  desc.add<edm::InputTag>("hits", edm::InputTag("hfreco"));
57  desc.add<int>("algo_verbosity", 0);
58  desc.add<double>("minAbsEta", 3.0);
59  desc.add<double>("maxAbsEta", 4.0);
60  desc.add<double>("minEt", 5);
62 }
static void fillPSetDescription(edm::ParameterSetDescription &desc)

◆ initialize()

void SeedingRegionByHF::initialize ( const edm::EventSetup es)
overridevirtual

Implements ticl::SeedingRegionAlgoBase.

Definition at line 20 of file SeedingRegionByHF.cc.

References geo_token_, geometry_, and edm::EventSetup::getData().

20 { geometry_ = &es.getData(geo_token_); }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geo_token_
const CaloGeometry * geometry_

◆ makePSetDescription()

static edm::ParameterSetDescription ticl::SeedingRegionByHF::makePSetDescription ( )
static

◆ makeRegions()

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

Implements ticl::SeedingRegionAlgoBase.

Definition at line 22 of file SeedingRegionByHF.cc.

References a, funct::abs(), b, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), makeMEIFBenchmarkPlots::ev, JetChargeProducer_cfi::exp, geometry_, CaloSubdetectorGeometry::getGeometry(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalForward, hfhits_token_, heavyIonCSV_trainingSettings::idx, createfilelist::int, maxAbsEta_, minAbsEta_, minEt_, PV3DBase< T, PVType, FrameType >::phi(), DetId::rawId(), FastTrackerRecHitMaskProducer_cfi::recHits, mps_fire::result, jetUpdater_cfi::sort, and theta().

24  {
25  const auto &recHits = ev.get(hfhits_token_);
26 
27  for (const auto &erh : recHits) {
28  const HcalDetId &detid = (HcalDetId)erh.detid();
29  if (erh.energy() < minEt_)
30  continue;
31 
32  const GlobalPoint &globalPosition =
34  auto eta = globalPosition.eta();
35 
37  continue;
38 
39  int iSide = int(eta > 0);
40  int idx = 0;
41  edm::ProductID hfSeedId = edm::ProductID(detid.rawId());
42 
43  auto phi = globalPosition.phi();
44  double theta = 2 * atan(exp(eta));
45  result.emplace_back(
46  globalPosition, GlobalVector(GlobalVector::Polar(theta, phi, erh.energy())), iSide, idx, hfSeedId);
47  }
48 
49  // sorting seeding region by descending momentum
50  std::sort(result.begin(), result.end(), [](const TICLSeedingRegion &a, const TICLSeedingRegion &b) {
51  return a.directionAtOrigin.perp2() > b.directionAtOrigin.perp2();
52  });
53 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const CaloGeometry * geometry_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
edm::EDGetTokenT< HFRecHitCollection > hfhits_token_
Geom::Theta< T > theta() const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Data Documentation

◆ algoVerbosity_

int ticl::SeedingRegionByHF::algoVerbosity_ = 0
private

Definition at line 44 of file SeedingRegionByHF.h.

◆ geo_token_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> ticl::SeedingRegionByHF::geo_token_
private

Definition at line 50 of file SeedingRegionByHF.h.

Referenced by initialize(), and SeedingRegionByHF().

◆ geometry_

const CaloGeometry* ticl::SeedingRegionByHF::geometry_
private

Definition at line 51 of file SeedingRegionByHF.h.

Referenced by initialize(), and makeRegions().

◆ hfhits_token_

edm::EDGetTokenT<HFRecHitCollection> ticl::SeedingRegionByHF::hfhits_token_
private

Definition at line 42 of file SeedingRegionByHF.h.

Referenced by makeRegions().

◆ maxAbsEta_

double ticl::SeedingRegionByHF::maxAbsEta_
private

Definition at line 47 of file SeedingRegionByHF.h.

Referenced by makeRegions().

◆ minAbsEta_

double ticl::SeedingRegionByHF::minAbsEta_
private

Definition at line 46 of file SeedingRegionByHF.h.

Referenced by makeRegions().

◆ minEt_

double ticl::SeedingRegionByHF::minEt_
private

Definition at line 48 of file SeedingRegionByHF.h.

Referenced by makeRegions().