CMS 3D CMS Logo

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, IdealMagneticFieldRecordbfield_token_
 
const StringCutObjectSelector< reco::TrackcutTk_
 
const std::string detector_
 
std::unique_ptr< GeomDetfirstDisk_ [2]
 
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecordhdc_token_
 
const HGCalDDDConstantshgcons_
 
std::once_flag initializeGeometry_
 
edm::ESHandle< Propagatorpropagator_
 
edm::ESGetToken< Propagator, TrackingComponentsRecordpropagator_token_
 
const std::string propName_
 
edm::EDGetTokenT< reco::TrackCollectiontracks_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::SeedingRegionByTracks ( const edm::ParameterSet conf,
edm::ConsumesCollector sumes 
)

◆ ~SeedingRegionByTracks()

SeedingRegionByTracks::~SeedingRegionByTracks ( )
override

Definition at line 30 of file SeedingRegionByTracks.cc.

30 {}

Member Function Documentation

◆ buildFirstLayers()

void SeedingRegionByTracks::buildFirstLayers ( )
private

Definition at line 81 of file SeedingRegionByTracks.cc.

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 }

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

Referenced by initialize().

◆ fillPSetDescription()

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

Definition at line 71 of file SeedingRegionByTracks.cc.

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 }

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

◆ initialize()

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

◆ makeRegions()

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.

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 }

References a, b, bfield_, cutTk_, reco::TrackBase::eta(), ev, firstDisk_, mps_fire::i, edm::HandleBase::id(), createfilelist::int, BeamSpotPI::nTracks, trajectoryStateTransform::outerFreeState(), edm::ESHandle< T >::product(), Propagator::propagate(), mps_fire::result, jetUpdater_cfi::sort, and tracks_token_.

Member Data Documentation

◆ bfield_

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

Definition at line 52 of file SeedingRegionByTracks.h.

Referenced by initialize(), and makeRegions().

◆ bfield_token_

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

Definition at line 55 of file SeedingRegionByTracks.h.

Referenced by initialize().

◆ cutTk_

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

Definition at line 48 of file SeedingRegionByTracks.h.

Referenced by makeRegions().

◆ detector_

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

Definition at line 49 of file SeedingRegionByTracks.h.

Referenced by SeedingRegionByTracks().

◆ firstDisk_

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

Definition at line 53 of file SeedingRegionByTracks.h.

Referenced by buildFirstLayers(), and makeRegions().

◆ hdc_token_

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

Definition at line 54 of file SeedingRegionByTracks.h.

Referenced by initialize(), and SeedingRegionByTracks().

◆ hgcons_

const HGCalDDDConstants* ticl::SeedingRegionByTracks::hgcons_
private

Definition at line 47 of file SeedingRegionByTracks.h.

Referenced by buildFirstLayers(), and initialize().

◆ initializeGeometry_

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

Definition at line 46 of file SeedingRegionByTracks.h.

◆ propagator_

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

Definition at line 50 of file SeedingRegionByTracks.h.

Referenced by initialize().

◆ propagator_token_

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

Definition at line 56 of file SeedingRegionByTracks.h.

Referenced by initialize().

◆ propName_

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

Definition at line 51 of file SeedingRegionByTracks.h.

◆ tracks_token_

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

Definition at line 45 of file SeedingRegionByTracks.h.

Referenced by makeRegions().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TkRotation< float >
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
trajectoryStateTransform::outerFreeState
FreeTrajectoryState outerFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:98
ticl::SeedingRegionByTracks::buildFirstLayers
void buildFirstLayers()
Definition: SeedingRegionByTracks.cc:81
ticl::SeedingRegionByTracks::hdc_token_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hdc_token_
Definition: SeedingRegionByTracks.h:54
Disk::build
static DiskPointer build(Args &&... args)
Definition: BoundDisk.h:38
ticl::SeedingRegionByTracks::propName_
const std::string propName_
Definition: SeedingRegionByTracks.h:51
HGCalDDDConstants::waferZ
double waferZ(int layer, bool reco) const
Definition: HGCalDDDConstants.cc:1412
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
ticl::SeedingRegionByTracks::bfield_
edm::ESHandle< MagneticField > bfield_
Definition: SeedingRegionByTracks.h:52
ticl::SeedingRegionByTracks::propagator_token_
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagator_token_
Definition: SeedingRegionByTracks.h:56
BeamSpotPI::nTracks
Definition: BeamSpotPayloadInspectorHelper.h:42
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
edm::Handle< reco::TrackCollection >
HGCalDDDConstants
Definition: HGCalDDDConstants.h:27
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
SimpleDiskBounds
Definition: SimpleDiskBounds.h:11
Propagator
Definition: Propagator.h:44
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
ticl::SeedingRegionByTracks::hgcons_
const HGCalDDDConstants * hgcons_
Definition: SeedingRegionByTracks.h:47
reco::Track
Definition: Track.h:27
edm::ESHandle< HGCalDDDConstants >
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
Point3DBase< float, GlobalTag >
b
double b
Definition: hdecay.h:118
HGCalDDDConstants::rangeR
std::pair< double, double > rangeR(double z, bool reco) const
Definition: HGCalDDDConstants.cc:966
a
double a
Definition: hdecay.h:119
ticl::SeedingRegionByTracks::bfield_token_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bfield_token_
Definition: SeedingRegionByTracks.h:55
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
createfilelist.int
int
Definition: createfilelist.py:10
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
ticl::SeedingRegionByTracks::tracks_token_
edm::EDGetTokenT< reco::TrackCollection > tracks_token_
Definition: SeedingRegionByTracks.h:45
ticl::SeedingRegionByTracks::propagator_
edm::ESHandle< Propagator > propagator_
Definition: SeedingRegionByTracks.h:50
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TICLSeedingRegion
Definition: TICLSeedingRegion.h:14
ticl::SeedingRegionByTracks::firstDisk_
std::unique_ptr< GeomDet > firstDisk_[2]
Definition: SeedingRegionByTracks.h:53
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
ticl::SeedingRegionByTracks::cutTk_
const StringCutObjectSelector< reco::Track > cutTk_
Definition: SeedingRegionByTracks.h:48
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
ticl::SeedingRegionAlgoBase::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: SeedingRegionAlgoBase.h:34
edm::Transition::BeginRun
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ticl::SeedingRegionAlgoBase::SeedingRegionAlgoBase
SeedingRegionAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Definition: SeedingRegionAlgoBase.h:24
mps_fire.result
result
Definition: mps_fire.py:311
MagneticField
Definition: MagneticField.h:19
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:29
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ProductID
Definition: ProductID.h:27
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
ticl::SeedingRegionByTracks::detector_
const std::string detector_
Definition: SeedingRegionByTracks.h:49
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12