CMS 3D CMS Logo

List of all members | 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 ()
 

Private Member Functions

void buildFirstLayers ()
 

Private Attributes

edm::ESHandle< MagneticFieldbfield_
 
const StringCutObjectSelector< reco::TrackcutTk_
 
std::unique_ptr< GeomDetfirstDisk_ [2]
 
const HGCalDDDConstantshgcons_
 
std::once_flag initializeGeometry_
 
edm::ESHandle< Propagatorpropagator_
 
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 29 of file SeedingRegionByTracks.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file SeedingRegionByTracks.cc.

17  : SeedingRegionAlgoBase(conf, sumes),
19  cutTk_(conf.getParameter<std::string>("cutTk")),
20  propName_(conf.getParameter<std::string>("propagator")) {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
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_
SeedingRegionByTracks::~SeedingRegionByTracks ( )
override

Definition at line 22 of file SeedingRegionByTracks.cc.

22 {}

Member Function Documentation

void SeedingRegionByTracks::buildFirstLayers ( )
private

Definition at line 60 of file SeedingRegionByTracks.cc.

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

Referenced by initialize().

60  {
61  float zVal = hgcons_->waferZ(1, true);
62  std::pair<double, double> rMinMax = hgcons_->rangeR(zVal, true);
63 
64  for (int iSide = 0; iSide < 2; ++iSide) {
65  float zSide = (iSide == 0) ? (-1. * zVal) : zVal;
66  firstDisk_[iSide] =
67  std::make_unique<GeomDet>(Disk::build(Disk::PositionType(0, 0, zSide),
69  SimpleDiskBounds(rMinMax.first, rMinMax.second, zSide - 0.5, zSide + 0.5))
70  .get());
71  }
72 }
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::initialize ( const edm::EventSetup es)
overridevirtual

Implements ticl::SeedingRegionAlgoBase.

Definition at line 24 of file SeedingRegionByTracks.cc.

References bfield_, buildFirstLayers(), detectorName_, edm::EventSetup::get(), hgcons_, edm::ESHandle< T >::product(), propagator_, and propName_.

void SeedingRegionByTracks::makeRegions ( const edm::Event ev,
const edm::EventSetup es,
std::vector< TICLSeedingRegion > &  result 
)
overridevirtual

Implements ticl::SeedingRegionAlgoBase.

Definition at line 35 of file SeedingRegionByTracks.cc.

References bfield_, cutTk_, reco::TrackBase::eta(), firstDisk_, edm::Event::getByToken(), mps_fire::i, edm::HandleBase::id(), createfilelist::int, nTracks(), trajectoryStateTransform::outerFreeState(), edm::ESHandle< T >::product(), Propagator::propagate(), and tracks_token_.

37  {
39  ev.getByToken(tracks_token_, tracks_h);
40  edm::ProductID trkId = tracks_h.id();
41  auto bFieldProd = bfield_.product();
42  const Propagator &prop = (*propagator_);
43 
44  int nTracks = tracks_h->size();
45  for (int i = 0; i < nTracks; ++i) {
46  const reco::Track &tk = (*tracks_h)[i];
47  if (!cutTk_((tk))) {
48  continue;
49  }
50 
52  int iSide = int(tk.eta() > 0);
53  TrajectoryStateOnSurface tsos = prop.propagate(fts, firstDisk_[iSide]->surface());
54  if (tsos.isValid()) {
55  result.emplace_back(tsos.globalPosition(), tsos.globalMomentum(), iSide, i, trkId);
56  }
57  }
58 }
const unsigned int nTracks(const reco::Vertex &sv)
edm::ESHandle< MagneticField > bfield_
ProductID id() const
Definition: HandleBase.cc:13
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
edm::EDGetTokenT< reco::TrackCollection > tracks_token_
const StringCutObjectSelector< reco::Track > cutTk_
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
std::unique_ptr< GeomDet > firstDisk_[2]
FreeTrajectoryState outerFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

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

Definition at line 48 of file SeedingRegionByTracks.h.

Referenced by initialize(), and makeRegions().

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

Definition at line 44 of file SeedingRegionByTracks.h.

Referenced by makeRegions().

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

Definition at line 45 of file SeedingRegionByTracks.h.

Referenced by initialize().

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

Definition at line 49 of file SeedingRegionByTracks.h.

Referenced by buildFirstLayers(), and makeRegions().

const HGCalDDDConstants* ticl::SeedingRegionByTracks::hgcons_
private

Definition at line 43 of file SeedingRegionByTracks.h.

Referenced by buildFirstLayers(), and initialize().

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

Definition at line 42 of file SeedingRegionByTracks.h.

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

Definition at line 46 of file SeedingRegionByTracks.h.

Referenced by initialize().

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

Definition at line 47 of file SeedingRegionByTracks.h.

Referenced by initialize().

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

Definition at line 41 of file SeedingRegionByTracks.h.

Referenced by makeRegions().