CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
TrackingSeedCandidates Class Reference

#include <TrackingSeedCandidates.h>

Public Types

using Objects = std::pair< const reco::CandidateView *, std::pair< float, float > >
 
enum  SeedingMode { SeedingMode::CANDIDATE_SEEDED, SeedingMode::GLOBAL }
 

Public Member Functions

Objects objects (const edm::Event &iEvent) const
 
 TrackingSeedCandidates (const edm::ParameterSet &regPSet, edm::ConsumesCollector &&iC)
 
 TrackingSeedCandidates (const edm::ParameterSet &regPSet, edm::ConsumesCollector &iC)
 
 ~TrackingSeedCandidates ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ParameterSetDescription &desc)
 

Private Attributes

float m_deltaEta_Cand
 
float m_deltaPhi_Cand
 
SeedingMode m_seedingMode
 
edm::EDGetTokenT< reco::CandidateViewm_token_input
 

Detailed Description

Definition at line 14 of file TrackingSeedCandidates.h.

Member Typedef Documentation

using TrackingSeedCandidates::Objects = std::pair< const reco::CandidateView* , std::pair < float, float > >

Definition at line 19 of file TrackingSeedCandidates.h.

Member Enumeration Documentation

Enumerator
CANDIDATE_SEEDED 
GLOBAL 

Definition at line 17 of file TrackingSeedCandidates.h.

17 {CANDIDATE_SEEDED, GLOBAL};

Constructor & Destructor Documentation

TrackingSeedCandidates::TrackingSeedCandidates ( const edm::ParameterSet regPSet,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 20 of file TrackingSeedCandidates.h.

References fillDescriptions(), iEvent, objects(), and ~TrackingSeedCandidates().

20 : TrackingSeedCandidates(regPSet, iC) {}
TrackingSeedCandidates(const edm::ParameterSet &regPSet, edm::ConsumesCollector &&iC)
TrackingSeedCandidates::TrackingSeedCandidates ( const edm::ParameterSet regPSet,
edm::ConsumesCollector iC 
)

Definition at line 3 of file TrackingSeedCandidates.cc.

References CANDIDATE_SEEDED, edm::errors::Configuration, edm::ConsumesCollector::consumes(), Exception, edm::ParameterSet::getParameter(), GLOBAL, m_deltaEta_Cand, m_deltaPhi_Cand, m_seedingMode, m_token_input, and AlCaHLTBitMon_QueryRunRegistry::string.

3  {
4  // operation mode
5  //
6  std::string seedingModeString = regPSet.getParameter<std::string>("seedingMode");
7  if (seedingModeString == "Candidate") m_seedingMode = SeedingMode::CANDIDATE_SEEDED;
8  else if (seedingModeString == "Global") m_seedingMode = SeedingMode::GLOBAL;
9  else throw edm::Exception(edm::errors::Configuration) << "Unknown seeding mode string: "<<seedingModeString;
10 
11  m_deltaEta_Cand = regPSet.getParameter<double>("deltaEta_Cand");
12  m_deltaPhi_Cand = regPSet.getParameter<double>("deltaPhi_Cand");
13 
14  // basic inputs
17  if (m_deltaEta_Cand<0 || m_deltaPhi_Cand<0) throw edm::Exception(edm::errors::Configuration) << "Delta eta and phi parameters must be set for candidates in candidate seeding mode";
18  }
19 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::CandidateView > m_token_input
TrackingSeedCandidates::~TrackingSeedCandidates ( )
default

Referenced by TrackingSeedCandidates().

Member Function Documentation

void TrackingSeedCandidates::fillDescriptions ( edm::ParameterSetDescription desc)
static

Definition at line 21 of file TrackingSeedCandidates.cc.

References edm::ParameterSetDescription::add(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by AreaSeededTrackingRegionsBuilder::fillDescriptions(), and TrackingSeedCandidates().

21  {
22  desc.add<std::string>("seedingMode", "Global");
23  desc.add<edm::InputTag>("input",edm::InputTag());
24  desc.add<double>("deltaEta_Cand", -1.);
25  desc.add<double>("deltaPhi_Cand", -1.);
26 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
TrackingSeedCandidates::Objects TrackingSeedCandidates::objects ( const edm::Event iEvent) const

Definition at line 28 of file TrackingSeedCandidates.cc.

References CANDIDATE_SEEDED, SiPixelPhase1DigisV_cfi::dimensions, edm::Event::getByToken(), m_deltaEta_Cand, m_deltaPhi_Cand, m_seedingMode, m_token_input, edm::Handle< T >::product(), and mps_fire::result.

Referenced by AreaSeededTrackingRegionsBuilder::beginEvent(), and TrackingSeedCandidates().

28  {
29 
31  std::pair <float,float> dimensions = std::make_pair(m_deltaEta_Cand,m_deltaPhi_Cand);
33 
35  iEvent.getByToken( m_token_input, objects );
36  result = std::make_pair(objects.product(),dimensions);
37  }
38  else result = std::make_pair(nullptr,dimensions);
39  return result;
40 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< reco::CandidateView > m_token_input
Objects objects(const edm::Event &iEvent) const
std::pair< const reco::CandidateView *, std::pair< float, float > > Objects

Member Data Documentation

float TrackingSeedCandidates::m_deltaEta_Cand
private

Definition at line 30 of file TrackingSeedCandidates.h.

Referenced by objects(), and TrackingSeedCandidates().

float TrackingSeedCandidates::m_deltaPhi_Cand
private

Definition at line 31 of file TrackingSeedCandidates.h.

Referenced by objects(), and TrackingSeedCandidates().

SeedingMode TrackingSeedCandidates::m_seedingMode
private

Definition at line 29 of file TrackingSeedCandidates.h.

Referenced by objects(), and TrackingSeedCandidates().

edm::EDGetTokenT<reco::CandidateView> TrackingSeedCandidates::m_token_input
private

Definition at line 33 of file TrackingSeedCandidates.h.

Referenced by objects(), and TrackingSeedCandidates().