---— READ MUONS -— ----— first check that not more than one version of muons (standaloneMu or trackerMu) is set to be used in l1pflow
225 const auto&
tracks = *htracks;
226 for (
unsigned int itk = 0, ntk =
tracks.size(); itk < ntk; ++itk) {
227 const auto& tk =
tracks[itk];
242 "setting useStandaloneMuons=True && useTrackerMuons=True is not to be done, as it would duplicate all muons\n");
248 for (
auto it = muons->begin(0), ed = muons->end(0); it != ed; ++it) {
259 for (
auto it = muons->begin(), ed = muons->end(); it != ed; ++it) {
271 const auto& calos = *caloHandle;
272 for (
unsigned int ic = 0, nc = calos.size(); ic < nc; ++ic) {
273 const auto& calo = calos[ic];
282 const auto& calos = *caloHandle;
283 for (
unsigned int ic = 0, nc = calos.size(); ic < nc; ++ic) {
284 const auto& calo = calos[ic];
322 if (ptsum == 0 || vtx.sum() > ptsum) {
328 throw cms::Exception(
"LogicError",
"Inconsistent vertex configuration");
331 iEvent.
put(std::make_unique<float>(z0),
"z0");
337 float genZ = genOrigin.Z();
353 std::vector<float> puGlobals;
355 const std::vector<std::string>& puGlobalNames =
l1pualgo_->puGlobalNames();
356 if (puGlobals.size() != puGlobalNames.size())
357 throw cms::Exception(
"LogicError",
"Mismatch in the number of global pileup inputs");
358 for (
unsigned int i = 0,
n = puGlobalNames.size();
i <
n; ++
i) {
359 iEvent.
put(std::make_unique<float>(puGlobals[
i]), puGlobalNames[i]);
367 l1pualgo_->runNeutralsPU(l1region, -1., puGlobals);
EventNumber_t event() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
unsigned int neventsproduced_
void addMuon(const l1t::Muon &t)
std::unique_ptr< l1tpf_impl::PFAlgoBase > l1pfalgo_
void writeManyToFile(const std::vector< T > &objs, FILE *file)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr bool isUninitialized() const noexcept
auto const & tracks
cannot be loose
edm::EDGetTokenT< l1t::MuonBxCollection > muCands_
edm::EDGetTokenT< math::XYZPointF > TokGenOrigin_
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
static const char * outputTypeName(int outputType)
LuminosityBlockNumber_t luminosityBlock() const
std::unique_ptr< std::vector< unsigned > > vecInput(int type) const
unsigned int neventscoemax_
std::pair< unsigned, unsigned > totAndMaxInput(int type) const
std::pair< unsigned, unsigned > totAndMaxOutput(int type, bool puppi) const
l1tpf_impl::PUAlgoBase::VertexAlgo vtxAlgo_
static const char * inputTypeName(int inputType)
edm::EDGetTokenT< l1t::TkMuonCollection > tkMuCands_
edm::EDGetTokenT< l1t::PFTrackCollection > tkCands_
std::unique_ptr< l1tpf_impl::COEFile > fRegionCOE_
std::unique_ptr< l1tpf_impl::PUAlgoBase > l1pualgo_
void addUInt(unsigned int value, std::string iLabel, edm::Event &iEvent)
std::unique_ptr< l1t::PFCandidateCollection > fetchTracks(float ptMin=0.01, bool fromPV=false) const
void addTrack(const l1t::PFTrack &t)
void addCalo(const l1t::PFCluster &t)
std::unique_ptr< l1t::PFCandidateCollection > fetch(bool puppi=true, float ptMin=0.01) const
std::unique_ptr< std::vector< unsigned > > vecOutput(int type, bool puppi) const
unsigned long long uint64_t
edm::EDGetTokenT< std::vector< l1t::TkPrimaryVertex > > extTkVtx_
std::vector< Region > & regions()
void addEmCalo(const l1t::PFCluster &t)
l1tpf_impl::RegionMapper l1regions_
std::vector< edm::EDGetTokenT< l1t::PFClusterCollection > > emCands_
std::unique_ptr< l1t::PFCandidateCollection > fetchCalo(float ptMin=0.01, bool emcalo=false) const
std::vector< edm::EDGetTokenT< l1t::PFClusterCollection > > hadCands_
double phi() const final
momentum azimuthal angle
double eta() const final
momentum pseudorapidity