CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static 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_
 
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_
 

Static Private Attributes

static const std::string detectorName_ = "HGCalEESensitive"
 

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 27 of file SeedingRegionByTracks.cc.

27 {}

Member Function Documentation

◆ buildFirstLayers()

void SeedingRegionByTracks::buildFirstLayers ( )
private

Definition at line 77 of file SeedingRegionByTracks.cc.

77  {
78  float zVal = hgcons_->waferZ(1, true);
79  std::pair<double, double> rMinMax = hgcons_->rangeR(zVal, true);
80 
81  for (int iSide = 0; iSide < 2; ++iSide) {
82  float zSide = (iSide == 0) ? (-1. * zVal) : zVal;
83  firstDisk_[iSide] =
84  std::make_unique<GeomDet>(Disk::build(Disk::PositionType(0, 0, zSide),
86  SimpleDiskBounds(rMinMax.first, rMinMax.second, zSide - 0.5, zSide + 0.5))
87  .get());
88  }
89 }

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

Referenced by initialize().

◆ fillPSetDescription()

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

Definition at line 68 of file SeedingRegionByTracks.cc.

68  {
69  desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
70  desc.add<std::string>("cutTk",
71  "1.48 < abs(eta) < 3.0 && pt > 1. && quality(\"highPurity\") && "
72  "hitPattern().numberOfLostHits(\"MISSING_OUTER_HITS\") < 5");
73  desc.add<std::string>("propagator", "PropagatorWithMaterial");
75 }

References edm::ParameterSetDescription::add(), ticl::SeedingRegionAlgoBase::fillPSetDescription(), HLT_2018_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 39 of file SeedingRegionByTracks.cc.

41  {
43  ev.getByToken(tracks_token_, tracks_h);
44  edm::ProductID trkId = tracks_h.id();
45  auto bFieldProd = bfield_.product();
46  const Propagator &prop = (*propagator_);
47 
48  int nTracks = tracks_h->size();
49  for (int i = 0; i < nTracks; ++i) {
50  const reco::Track &tk = (*tracks_h)[i];
51  if (!cutTk_((tk))) {
52  continue;
53  }
54 
56  int iSide = int(tk.eta() > 0);
57  TrajectoryStateOnSurface tsos = prop.propagate(fts, firstDisk_[iSide]->surface());
58  if (tsos.isValid()) {
59  result.emplace_back(tsos.globalPosition(), tsos.globalMomentum(), iSide, i, trkId);
60  }
61  }
62  // sorting seeding region by descending momentum
63  std::sort(result.begin(), result.end(), [](const TICLSeedingRegion &a, const TICLSeedingRegion &b) {
64  return a.directionAtOrigin.perp2() > b.directionAtOrigin.perp2();
65  });
66 }

References a, b, bfield_, cutTk_, reco::TrackBase::eta(), ev, firstDisk_, mps_fire::i, edm::HandleBase::id(), createfilelist::int, nTracks(), trajectoryStateTransform::outerFreeState(), edm::ESHandle< T >::product(), Propagator::propagate(), mps_fire::result, 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().

◆ detectorName_

const std::string ticl::SeedingRegionByTracks::detectorName_ = "HGCalEESensitive"
inlinestaticprivate

Definition at line 49 of file SeedingRegionByTracks.h.

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

◆ 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 >
nTracks
const unsigned int nTracks(const reco::Vertex &sv)
Definition: TemplatedVertexArbitrator.h:44
mps_fire.i
i
Definition: mps_fire.py:355
edm::ESInputTag
Definition: ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
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:77
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:1367
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
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:86
edm::Handle< reco::TrackCollection >
HGCalDDDConstants
Definition: HGCalDDDConstants.h:25
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
Definition: DTSurvey.h:22
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
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:934
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
a
double a
Definition: hdecay.h:119
ticl::SeedingRegionByTracks::bfield_token_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bfield_token_
Definition: SeedingRegionByTracks.h:55
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:623
createfilelist.int
int
Definition: createfilelist.py:10
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:141
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
TICLSeedingRegion
Definition: TICLSeedingRegion.h:14
ticl::SeedingRegionByTracks::firstDisk_
std::unique_ptr< GeomDet > firstDisk_[2]
Definition: SeedingRegionByTracks.h:53
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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:95
ticl::SeedingRegionAlgoBase::SeedingRegionAlgoBase
SeedingRegionAlgoBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Definition: SeedingRegionAlgoBase.h:24
mps_fire.result
result
Definition: mps_fire.py:303
ticl::SeedingRegionByTracks::detectorName_
static const std::string detectorName_
Definition: SeedingRegionByTracks.h:49
MagneticField
Definition: MagneticField.h:19
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:13
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:27
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12