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::SeedingRegionByTracks Class Referencefinal

#include <SeedingRegionByTracks.h>

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

Private Member Functions

void buildFirstLayers ()
 

Private Attributes

edm::ESHandle< MagneticFieldbfield_
 
edm::ESGetToken< MagneticField,
IdealMagneticFieldRecord
bfield_token_
 
const StringCutObjectSelector
< reco::Track
cutTk_
 
const std::string detector_
 
std::unique_ptr< GeomDetfirstDisk_ [2]
 
edm::ESGetToken
< HGCalDDDConstants,
IdealGeometryRecord
hdc_token_
 
const HGCalDDDConstantshgcons_
 
std::once_flag initializeGeometry_
 
edm::ESHandle< Propagatorpropagator_
 
edm::ESGetToken< Propagator,
TrackingComponentsRecord
propagator_token_
 
const std::string propName_
 
edm::EDGetTokenT
< reco::TrackCollection
tracks_token_
 

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 31 of file SeedingRegionByTracks.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file SeedingRegionByTracks.cc.

References edm::BeginRun, detector_, edm::ConsumesCollector::esConsumes(), hdc_token_, and AlCaHLTBitMon_QueryRunRegistry::string.

17  : SeedingRegionAlgoBase(conf, sumes),
19  cutTk_(conf.getParameter<std::string>("cutTk")),
20  detector_(conf.getParameter<std::string>("detector")),
21  propName_(conf.getParameter<std::string>("propagator")),
24  edm::ESInputTag("", propName_))) {
25  std::string detectorName_ = (detector_ == "HFNose") ? "HGCalHFNoseSensitive" : "HGCalEESensitive";
27  edm::ESInputTag("", detectorName_));
28 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hdc_token_
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagator_token_
SeedingRegionAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::EDGetTokenT< reco::TrackCollection > tracks_token_
const StringCutObjectSelector< reco::Track > cutTk_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bfield_token_
SeedingRegionByTracks::~SeedingRegionByTracks ( )
override

Definition at line 30 of file SeedingRegionByTracks.cc.

30 {}

Member Function Documentation

void SeedingRegionByTracks::buildFirstLayers ( )
private

Definition at line 81 of file SeedingRegionByTracks.cc.

References Disk::build(), firstDisk_, hgcons_, HGCalDDDConstants::rangeR(), and HGCalDDDConstants::waferZ().

Referenced by initialize().

81  {
82  float zVal = hgcons_->waferZ(1, true);
83  std::pair<double, double> rMinMax = hgcons_->rangeR(zVal, true);
84 
85  for (int iSide = 0; iSide < 2; ++iSide) {
86  float zSide = (iSide == 0) ? (-1. * zVal) : zVal;
87  firstDisk_[iSide] =
88  std::make_unique<GeomDet>(Disk::build(Disk::PositionType(0, 0, zSide),
90  SimpleDiskBounds(rMinMax.first, rMinMax.second, zSide - 0.5, zSide + 0.5))
91  .get());
92  }
93 }
std::pair< double, double > rangeR(double z, bool reco) const
static DiskPointer build(Args &&...args)
Definition: BoundDisk.h:38
const HGCalDDDConstants * hgcons_
double waferZ(int layer, bool reco) const
std::unique_ptr< GeomDet > firstDisk_[2]
void SeedingRegionByTracks::fillPSetDescription ( edm::ParameterSetDescription desc)
static

Definition at line 71 of file SeedingRegionByTracks.cc.

References edm::ParameterSetDescription::add(), ticl::SeedingRegionAlgoBase::fillPSetDescription(), HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

71  {
72  desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
73  desc.add<std::string>("cutTk",
74  "1.48 < abs(eta) < 3.0 && pt > 1. && quality(\"highPurity\") && "
75  "hitPattern().numberOfLostHits(\"MISSING_OUTER_HITS\") < 5");
76  desc.add<std::string>("propagator", "PropagatorWithMaterial");
77  desc.add<std::string>("detector", "HGCAL");
79 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
void SeedingRegionByTracks::initialize ( const edm::EventSetup es)
overridevirtual

Implements ticl::SeedingRegionAlgoBase.

Definition at line 32 of file SeedingRegionByTracks.cc.

References bfield_, bfield_token_, buildFirstLayers(), edm::EventSetup::getHandle(), hdc_token_, hgcons_, edm::ESHandle< class >::product(), propagator_, and propagator_token_.

32  {
34  hgcons_ = hdc.product();
35 
37 
40 }
edm::ESHandle< MagneticField > bfield_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hdc_token_
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagator_token_
const HGCalDDDConstants * hgcons_
edm::ESHandle< Propagator > propagator_
T const * product() const
Definition: ESHandle.h:86
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bfield_token_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
void SeedingRegionByTracks::makeRegions ( const edm::Event ev,
const edm::EventSetup es,
std::vector< TICLSeedingRegion > &  result 
)
overridevirtual

Implements ticl::SeedingRegionAlgoBase.

Definition at line 42 of file SeedingRegionByTracks.cc.

References a, b, bfield_, cutTk_, TICLSeedingRegion::directionAtOrigin, reco::TrackBase::eta(), firstDisk_, edm::Event::getByToken(), mps_fire::i, edm::HandleBase::id(), BeamSpotPI::nTracks, trajectoryStateTransform::outerFreeState(), PV3DBase< T, PVType, FrameType >::perp2(), edm::ESHandle< class >::product(), Propagator::propagate(), and tracks_token_.

44  {
46  ev.getByToken(tracks_token_, tracks_h);
47  edm::ProductID trkId = tracks_h.id();
48  auto bFieldProd = bfield_.product();
49  const Propagator &prop = (*propagator_);
50 
51  int nTracks = tracks_h->size();
52  for (int i = 0; i < nTracks; ++i) {
53  const reco::Track &tk = (*tracks_h)[i];
54  if (!cutTk_((tk))) {
55  continue;
56  }
57 
59  int iSide = int(tk.eta() > 0);
60  TrajectoryStateOnSurface tsos = prop.propagate(fts, firstDisk_[iSide]->surface());
61  if (tsos.isValid()) {
62  result.emplace_back(tsos.globalPosition(), tsos.globalMomentum(), iSide, i, trkId);
63  }
64  }
65  // sorting seeding region by descending momentum
66  std::sort(result.begin(), result.end(), [](const TICLSeedingRegion &a, const TICLSeedingRegion &b) {
67  return a.directionAtOrigin.perp2() > b.directionAtOrigin.perp2();
68  });
69 }
edm::ESHandle< MagneticField > bfield_
GlobalVector directionAtOrigin
ProductID id() const
Definition: HandleBase.cc:29
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
T perp2() const
Definition: PV3DBase.h:68
tuple result
Definition: mps_fire.py:311
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
edm::EDGetTokenT< reco::TrackCollection > tracks_token_
const StringCutObjectSelector< reco::Track > cutTk_
T const * product() const
Definition: ESHandle.h:86
double b
Definition: hdecay.h:118
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
double a
Definition: hdecay.h:119
std::unique_ptr< GeomDet > firstDisk_[2]
FreeTrajectoryState outerFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)

Member Data Documentation

edm::ESHandle<MagneticField> ticl::SeedingRegionByTracks::bfield_
private

Definition at line 52 of file SeedingRegionByTracks.h.

Referenced by initialize(), and makeRegions().

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> ticl::SeedingRegionByTracks::bfield_token_
private

Definition at line 55 of file SeedingRegionByTracks.h.

Referenced by initialize().

const StringCutObjectSelector<reco::Track> ticl::SeedingRegionByTracks::cutTk_
private

Definition at line 48 of file SeedingRegionByTracks.h.

Referenced by makeRegions().

const std::string ticl::SeedingRegionByTracks::detector_
private

Definition at line 49 of file SeedingRegionByTracks.h.

Referenced by SeedingRegionByTracks().

std::unique_ptr<GeomDet> ticl::SeedingRegionByTracks::firstDisk_[2]
private

Definition at line 53 of file SeedingRegionByTracks.h.

Referenced by buildFirstLayers(), and makeRegions().

edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> ticl::SeedingRegionByTracks::hdc_token_
private

Definition at line 54 of file SeedingRegionByTracks.h.

Referenced by initialize(), and SeedingRegionByTracks().

const HGCalDDDConstants* ticl::SeedingRegionByTracks::hgcons_
private

Definition at line 47 of file SeedingRegionByTracks.h.

Referenced by buildFirstLayers(), and initialize().

std::once_flag ticl::SeedingRegionByTracks::initializeGeometry_
private

Definition at line 46 of file SeedingRegionByTracks.h.

edm::ESHandle<Propagator> ticl::SeedingRegionByTracks::propagator_
private

Definition at line 50 of file SeedingRegionByTracks.h.

Referenced by initialize().

edm::ESGetToken<Propagator, TrackingComponentsRecord> ticl::SeedingRegionByTracks::propagator_token_
private

Definition at line 56 of file SeedingRegionByTracks.h.

Referenced by initialize().

const std::string ticl::SeedingRegionByTracks::propName_
private

Definition at line 51 of file SeedingRegionByTracks.h.

edm::EDGetTokenT<reco::TrackCollection> ticl::SeedingRegionByTracks::tracks_token_
private

Definition at line 45 of file SeedingRegionByTracks.h.

Referenced by makeRegions().