CMS 3D CMS Logo

TrackingSeedCandidates.cc
Go to the documentation of this file.
2 
4  // operation mode
5  //
6  std::string seedingModeString = regPSet.getParameter<std::string>("seedingMode");
7  if (seedingModeString == "Candidate")
9  else if (seedingModeString == "Global")
11  else
12  throw edm::Exception(edm::errors::Configuration) << "Unknown seeding mode string: " << seedingModeString;
13 
14  m_deltaEta_Cand = regPSet.getParameter<double>("deltaEta_Cand");
15  m_deltaPhi_Cand = regPSet.getParameter<double>("deltaPhi_Cand");
16 
17  // basic inputs
20  if (m_deltaEta_Cand < 0 || m_deltaPhi_Cand < 0)
22  << "Delta eta and phi parameters must be set for candidates in candidate seeding mode";
23  }
24 }
25 
27  desc.add<std::string>("seedingMode", "Global");
28  desc.add<edm::InputTag>("input", edm::InputTag());
29  desc.add<double>("deltaEta_Cand", -1.);
30  desc.add<double>("deltaPhi_Cand", -1.);
31 }
32 
35  std::pair<float, float> dimensions = std::make_pair(m_deltaEta_Cand, m_deltaPhi_Cand);
37 
39  iEvent.getByToken(m_token_input, objects);
40  result = std::make_pair(objects.product(), dimensions);
41  } else
42  result = std::make_pair(nullptr, dimensions);
43  return result;
44 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::pair< const reco::CandidateView *, std::pair< float, float > > Objects
int iEvent
Definition: GenABIO.cc:224
TrackingSeedCandidates(const edm::ParameterSet &regPSet, edm::ConsumesCollector &&iC)
static void fillDescriptions(edm::ParameterSetDescription &desc)
edm::EDGetTokenT< reco::CandidateView > m_token_input
Objects objects(const edm::Event &iEvent) const