CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
CaloGeometryRecord
geo_token_
 
const CaloGeometrygeometry_
 
edm::EDGetTokenT
< HFRecHitCollection
hfhits_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 ( 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)
SeedingRegionAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geo_token_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< HFRecHitCollection > hfhits_token_
SeedingRegionByHF::~SeedingRegionByHF ( )
override

Definition at line 18 of file SeedingRegionByHF.cc.

18 {}

Member Function Documentation

void ticl::SeedingRegionByHF::buildFirstLayers ( )
private
void SeedingRegionByHF::fillPSetDescription ( edm::ParameterSetDescription desc)
static

Definition at line 55 of file SeedingRegionByHF.cc.

References edm::ParameterSetDescription::add(), ticl::SeedingRegionAlgoBase::fillPSetDescription(), and HLT_FULL_cff::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 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
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_); }
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geo_token_
bool getData(T &iHolder) const
Definition: EventSetup.h:128
const CaloGeometry * geometry_
static edm::ParameterSetDescription ticl::SeedingRegionByHF::makePSetDescription ( )
static
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, TICLSeedingRegion::directionAtOrigin, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), funct::exp(), geometry_, edm::Event::get(), CaloSubdetectorGeometry::getGeometry(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalForward, hfhits_token_, maxAbsEta_, minAbsEta_, minEt_, PV3DBase< T, PVType, FrameType >::perp2(), PV3DBase< T, PVType, FrameType >::phi(), DetId::rawId(), HLT_FULL_cff::recHits, 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 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
GlobalVector directionAtOrigin
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Geom::Theta< T > theta() const
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
T perp2() const
Definition: PV3DBase.h:68
tuple result
Definition: mps_fire.py:311
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:346
const CaloGeometry * geometry_
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.
double b
Definition: hdecay.h:118
T eta() const
Definition: PV3DBase.h:73
double a
Definition: hdecay.h:119
edm::EDGetTokenT< HFRecHitCollection > hfhits_token_
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Data Documentation

int ticl::SeedingRegionByHF::algoVerbosity_ = 0
private

Definition at line 44 of file SeedingRegionByHF.h.

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

Definition at line 50 of file SeedingRegionByHF.h.

Referenced by initialize(), and SeedingRegionByHF().

const CaloGeometry* ticl::SeedingRegionByHF::geometry_
private

Definition at line 51 of file SeedingRegionByHF.h.

Referenced by initialize(), and makeRegions().

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

Definition at line 42 of file SeedingRegionByHF.h.

Referenced by makeRegions().

double ticl::SeedingRegionByHF::maxAbsEta_
private

Definition at line 47 of file SeedingRegionByHF.h.

Referenced by makeRegions().

double ticl::SeedingRegionByHF::minAbsEta_
private

Definition at line 46 of file SeedingRegionByHF.h.

Referenced by makeRegions().

double ticl::SeedingRegionByHF::minEt_
private

Definition at line 48 of file SeedingRegionByHF.h.

Referenced by makeRegions().