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

- 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 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.

10  : SeedingRegionAlgoBase(conf, sumes),
12  minAbsEta_(conf.getParameter<double>("minAbsEta")),
13  maxAbsEta_(conf.getParameter<double>("maxAbsEta")),
14  minEt_(conf.getParameter<double>("minEt")) {
16 }

References edm::BeginRun, edm::ConsumesCollector::esConsumes(), and geo_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.

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 }

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

◆ initialize()

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

Implements ticl::SeedingRegionAlgoBase.

Definition at line 20 of file SeedingRegionByHF.cc.

20 { geometry_ = &es.getData(geo_token_); }

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

◆ 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.

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 }

References a, funct::abs(), b, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), 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().

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().

ticl::SeedingRegionByHF::maxAbsEta_
double maxAbsEta_
Definition: SeedingRegionByHF.h:47
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
DetId::Hcal
Definition: DetId.h:28
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
edm::SortedCollection
Definition: SortedCollection.h:49
Geom::Spherical2Cartesian
Definition: CoordinateSets.h:58
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
CaloGeometry
Definition: CaloGeometry.h:21
PVValHelper::eta
Definition: PVValidationHelpers.h:70
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
Point3DBase< float, GlobalTag >
b
double b
Definition: hdecay.h:118
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
a
double a
Definition: hdecay.h:119
PVValHelper::phi
Definition: PVValidationHelpers.h:69
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
CaloSubdetectorGeometry::getGeometry
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.
Definition: CaloSubdetectorGeometry.cc:36
TICLSeedingRegion
Definition: TICLSeedingRegion.h:14
ticl::SeedingRegionByHF::minAbsEta_
double minAbsEta_
Definition: SeedingRegionByHF.h:46
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
HcalForward
Definition: HcalAssistant.h:36
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
ticl::SeedingRegionByHF::geometry_
const CaloGeometry * geometry_
Definition: SeedingRegionByHF.h:51
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
ticl::SeedingRegionAlgoBase::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: SeedingRegionAlgoBase.h:34
edm::Transition::BeginRun
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
ticl::SeedingRegionByHF::geo_token_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geo_token_
Definition: SeedingRegionByHF.h:50
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ticl::SeedingRegionByHF::hfhits_token_
edm::EDGetTokenT< HFRecHitCollection > hfhits_token_
Definition: SeedingRegionByHF.h:42
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
ticl::SeedingRegionByHF::minEt_
double minEt_
Definition: SeedingRegionByHF.h:48
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
edm::InputTag
Definition: InputTag.h:15
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
edm::ProductID
Definition: ProductID.h:27