CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
L1TCorrelatorLayer1Producer Class Reference
Inheritance diagram for L1TCorrelatorLayer1Producer:
edm::stream::EDProducer<>

Public Member Functions

 L1TCorrelatorLayer1Producer (const edm::ParameterSet &)
 
 ~L1TCorrelatorLayer1Producer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Types

enum  InputType { caloType = 0, emcaloType = 1, trackType = 2, l1muType = 3 }
 
typedef l1ct::OutputRegion::ObjType OutputType
 

Private Member Functions

void addDecodedEmCalo (l1ct::DetectorSector< l1ct::EmCaloObjEmu > &sec, const l1t::PFCluster &t)
 
void addDecodedHadCalo (l1ct::DetectorSector< l1ct::HadCaloObjEmu > &sec, const l1t::PFCluster &t)
 
void addDecodedMuon (l1ct::DetectorSector< l1ct::MuObjEmu > &sec, const l1t::SAMuon &t)
 
void addDecodedTrack (l1ct::DetectorSector< l1ct::TkObjEmu > &sec, const l1t::PFTrack &t)
 
void addEmCalo (const l1t::PFCluster &t, l1t::PFClusterRef ref)
 
void addHadCalo (const l1t::PFCluster &t, l1t::PFClusterRef ref)
 
void addMuon (const l1t::SAMuon &t, l1t::PFCandidate::MuonRef ref)
 
void addRawHgcalCluster (l1ct::DetectorSector< ap_uint< 256 >> &sec, const l1t::PFCluster &c)
 
void addTrack (const l1t::PFTrack &t, l1t::PFTrackRef ref)
 
void addUInt (unsigned int value, std::string iLabel, edm::Event &iEvent)
 
void beginStream (edm::StreamID) override
 
void doVertexings (std::vector< float > &pvdz) const
 
void endStream () override
 
std::unique_ptr< std::vector< l1t::PFTrack > > fetchDecodedTracks () const
 
std::unique_ptr< l1t::PFCandidateCollectionfetchEmCalo () const
 
std::unique_ptr< l1t::PFCandidateCollectionfetchHadCalo () const
 
std::unique_ptr< l1t::PFCandidateCollectionfetchPF () const
 
std::unique_ptr< l1t::PFCandidateCollectionfetchTracks () const
 
void initEvent (const edm::Event &e)
 
void initSectorsAndRegions (const edm::ParameterSet &iConfig)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
void putEgObjects (edm::Event &iEvent, const bool writeEgSta, const std::string &tkEmLabel, const std::string &tkEmPerBoardLabel, const std::string &tkEleLabel, const std::string &tkElePerBoardLabel) const
 
void putEgStaObjects (edm::Event &iEvent, const std::string &egLablel) const
 
void putPuppi (edm::Event &iEvent) const
 
template<class T >
void rawHgcalClusterEncode (ap_uint< 256 > &cwrd, const l1ct::DetectorSector< T > &sec, const l1t::PFCluster &c) const
 
template<typename T >
void setRefs_ (l1t::PFCandidate &pf, const T &p) const
 
std::pair< unsigned int, unsigned int > totAndMax (const std::vector< unsigned > &perRegion) const
 
std::unique_ptr< std::vector< unsigned > > vecOutput (OutputType i, bool usePuppi) const
 
std::unique_ptr< std::vector< unsigned > > vecRegInput (InputType i) const
 
std::unique_ptr< std::vector< unsigned > > vecSecInput (InputType i) const
 

Static Private Member Functions

template<typename T >
static edm::ParameterDescription< edm::ParameterSetDescriptiongetParDesc (const std::string &name)
 

Private Attributes

std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRefclusterRefMap_
 
edm::ParameterSet config_
 
float debugEta_
 
float debugPhi_
 
float debugR_
 
std::vector< edm::EDGetTokenT< l1t::PFClusterCollection > > emCands_
 
float emPtCut_
 
bool emuTkVtx_
 
l1ct::Event event_
 
edm::EDGetTokenT< std::vector< l1t::Vertex > > extTkVtx_
 
std::fstream fRegionDump_
 
std::vector< edm::EDGetTokenT< l1t::PFClusterCollection > > hadCands_
 
float hadPtCut_
 
bool hasTracks_
 
std::unique_ptr< l1ct::HgcalClusterDecoderEmulatorhgcalInput_
 
std::unique_ptr< l1ct::PFAlgoEmulatorBasel1pfalgo_
 
std::unique_ptr< l1ct::LinPuppiEmulatorl1pualgo_
 
std::unique_ptr< l1ct::PFTkEGAlgoEmulatorl1tkegalgo_
 
std::unique_ptr< l1ct::PFTkEGSorterEmulatorl1tkegsorter_
 
edm::EDGetTokenT< l1t::SAMuonCollectionmuCands_
 
std::unique_ptr< l1ct::GMTMuonDecoderEmulatormuonInput_
 
std::unordered_map< const l1t::SAMuon *, l1t::PFCandidate::MuonRefmuonRefMap_
 
int nVtx_
 
const edm::VParameterSet patternWriterConfigs_
 
std::vector< std::unique_ptr< L1TCorrelatorLayer1PatternFileWriter > > patternWriters_
 
const std::string regionDumpName_
 
std::unique_ptr< l1ct::RegionizerEmulatorregionizer_
 
edm::EDGetTokenT< l1t::PFTrackCollectiontkCands_
 
edm::EDGetTokenT< std::vector< l1t::VertexWord > > tkVtxEmu_
 
std::unique_ptr< l1ct::TrackInputEmulatortrackInput_
 
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackReftrackRefMap_
 
float trkPt_
 
bool writeRawHgcalCluster_
 

Static Private Attributes

static constexpr const char * inputTypeName [l1muType+1] = {"Calo", "EmCalo", "TK", "Mu"}
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 50 of file L1TCorrelatorLayer1Producer.cc.

Member Typedef Documentation

◆ OutputType

Definition at line 178 of file L1TCorrelatorLayer1Producer.cc.

Member Enumeration Documentation

◆ InputType

Constructor & Destructor Documentation

◆ L1TCorrelatorLayer1Producer()

L1TCorrelatorLayer1Producer::L1TCorrelatorLayer1Producer ( const edm::ParameterSet iConfig)
explicit

Definition at line 193 of file L1TCorrelatorLayer1Producer.cc.

References emCands_, emuTkVtx_, Exception, extTkVtx_, edm::ParameterSet::getParameter(), hadCands_, hasTracks_, hgcalInput_, mps_fire::i, initSectorsAndRegions(), inputTypeName, l1muType, l1pfalgo_, l1pualgo_, l1tkegalgo_, l1tkegsorter_, muonInput_, l1ct::OutputRegion::nPFTypes, nVtx_, l1ct::OutputRegion::objTypeName, muonDTDigis_cfi::pset, regionizer_, AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, tkVtxEmu_, and trackInput_.

194  : config_(iConfig),
195  hasTracks_(!iConfig.getParameter<edm::InputTag>("tracks").label().empty()),
196  tkCands_(hasTracks_ ? consumes<l1t::PFTrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"))
197  : edm::EDGetTokenT<l1t::PFTrackCollection>()),
198  trkPt_(iConfig.getParameter<double>("trkPtCut")),
199  muCands_(consumes<l1t::SAMuonCollection>(iConfig.getParameter<edm::InputTag>("muons"))),
200  emPtCut_(iConfig.getParameter<double>("emPtCut")),
201  hadPtCut_(iConfig.getParameter<double>("hadPtCut")),
202  regionizer_(nullptr),
203  l1pfalgo_(nullptr),
204  l1pualgo_(nullptr),
205  l1tkegalgo_(nullptr),
206  l1tkegsorter_(nullptr),
207  regionDumpName_(iConfig.getUntrackedParameter<std::string>("dumpFileName")),
208  writeRawHgcalCluster_(iConfig.getUntrackedParameter<bool>("writeRawHgcalCluster")),
209  patternWriterConfigs_(iConfig.getUntrackedParameter<edm::VParameterSet>("patternWriters")),
210  debugEta_(iConfig.getUntrackedParameter<double>("debugEta")),
211  debugPhi_(iConfig.getUntrackedParameter<double>("debugPhi")),
212  debugR_(iConfig.getUntrackedParameter<double>("debugR")) {
213  produces<l1t::PFCandidateCollection>("PF");
214  produces<l1t::PFCandidateCollection>("Puppi");
215  produces<l1t::PFCandidateRegionalOutput>("PuppiRegional");
216 
217  produces<l1t::PFCandidateCollection>("EmCalo");
218  produces<l1t::PFCandidateCollection>("Calo");
219  produces<l1t::PFCandidateCollection>("TK");
220 #if 0 // LATER
221  produces<l1t::PFCandidateCollection>("TKVtx");
222 #endif
223  produces<std::vector<l1t::PFTrack>>("DecodedTK");
224 
225  for (const auto &tag : iConfig.getParameter<std::vector<edm::InputTag>>("emClusters")) {
226  emCands_.push_back(consumes<l1t::PFClusterCollection>(tag));
227  }
228  for (const auto &tag : iConfig.getParameter<std::vector<edm::InputTag>>("hadClusters")) {
229  hadCands_.push_back(consumes<l1t::PFClusterCollection>(tag));
230  }
231 
232  if (hasTracks_) {
233  const std::string &tkInAlgo = iConfig.getParameter<std::string>("trackInputConversionAlgo");
234  if (tkInAlgo == "Emulator") {
235  trackInput_ = std::make_unique<l1ct::TrackInputEmulator>(
236  iConfig.getParameter<edm::ParameterSet>("trackInputConversionParameters"));
237  } else if (tkInAlgo != "Ideal")
238  throw cms::Exception("Configuration", "Unsupported trackInputConversionAlgo");
239  }
240 
241  const std::string &muInAlgo = iConfig.getParameter<std::string>("muonInputConversionAlgo");
242  if (muInAlgo == "Emulator") {
243  muonInput_ = std::make_unique<l1ct::GMTMuonDecoderEmulator>(
244  iConfig.getParameter<edm::ParameterSet>("muonInputConversionParameters"));
245  } else if (muInAlgo != "Ideal")
246  throw cms::Exception("Configuration", "Unsupported muonInputConversionAlgo");
247 
248  const std::string &hgcalInAlgo = iConfig.getParameter<std::string>("hgcalInputConversionAlgo");
249  if (hgcalInAlgo == "Emulator") {
250  hgcalInput_ = std::make_unique<l1ct::HgcalClusterDecoderEmulator>(
251  iConfig.getParameter<edm::ParameterSet>("hgcalInputConversionParameters"));
252  } else if (hgcalInAlgo != "Ideal")
253  throw cms::Exception("Configuration", "Unsupported hgcalInputConversionAlgo");
254 
255  const std::string &regalgo = iConfig.getParameter<std::string>("regionizerAlgo");
256  if (regalgo == "Ideal") {
257  regionizer_ =
258  std::make_unique<l1ct::RegionizerEmulator>(iConfig.getParameter<edm::ParameterSet>("regionizerAlgoParameters"));
259  } else if (regalgo == "Multififo") {
260  regionizer_ = std::make_unique<l1ct::MultififoRegionizerEmulator>(
261  iConfig.getParameter<edm::ParameterSet>("regionizerAlgoParameters"));
262  } else if (regalgo == "BufferedFoldedMultififo") {
263  regionizer_ = std::make_unique<l1ct::BufferedFoldedMultififoRegionizerEmulator>(
264  iConfig.getParameter<edm::ParameterSet>("regionizerAlgoParameters"));
265  } else if (regalgo == "MultififoBarrel") {
266  const auto &pset = iConfig.getParameter<edm::ParameterSet>("regionizerAlgoParameters");
267  regionizer_ =
268  std::make_unique<l1ct::MultififoRegionizerEmulator>(pset.getParameter<std::string>("barrelSetup"), pset);
269  } else if (regalgo == "MiddleBufferMultififo") {
270  regionizer_ = std::make_unique<l1ct::MiddleBufferMultififoRegionizerEmulator>(
271  iConfig.getParameter<edm::ParameterSet>("regionizerAlgoParameters"));
272  } else if (regalgo == "TDR") {
273  regionizer_ = std::make_unique<l1ct::TDRRegionizerEmulator>(
274  iConfig.getParameter<edm::ParameterSet>("regionizerAlgoParameters"));
275  } else
276  throw cms::Exception("Configuration", "Unsupported regionizerAlgo");
277 
278  const std::string &algo = iConfig.getParameter<std::string>("pfAlgo");
279  if (algo == "PFAlgo3") {
280  l1pfalgo_ = std::make_unique<l1ct::PFAlgo3Emulator>(iConfig.getParameter<edm::ParameterSet>("pfAlgoParameters"));
281  } else if (algo == "PFAlgo2HGC") {
282  l1pfalgo_ = std::make_unique<l1ct::PFAlgo2HGCEmulator>(iConfig.getParameter<edm::ParameterSet>("pfAlgoParameters"));
283  } else if (algo == "PFAlgoDummy") {
284  l1pfalgo_ =
285  std::make_unique<l1ct::PFAlgoDummyEmulator>(iConfig.getParameter<edm::ParameterSet>("pfAlgoParameters"));
286  } else
287  throw cms::Exception("Configuration", "Unsupported pfAlgo");
288 
289  const std::string &pualgo = iConfig.getParameter<std::string>("puAlgo");
290  if (pualgo == "LinearizedPuppi") {
291  l1pualgo_ = std::make_unique<l1ct::LinPuppiEmulator>(iConfig.getParameter<edm::ParameterSet>("puAlgoParameters"));
292  } else
293  throw cms::Exception("Configuration", "Unsupported puAlgo");
294 
295  l1tkegalgo_ = std::make_unique<l1ct::PFTkEGAlgoEmulator>(
296  l1ct::PFTkEGAlgoEmuConfig(iConfig.getParameter<edm::ParameterSet>("tkEgAlgoParameters")));
297 
298  const std::string &egsortalgo = iConfig.getParameter<std::string>("tkEgSorterAlgo");
299  if (egsortalgo == "Barrel") {
300  l1tkegsorter_ = std::make_unique<l1ct::PFTkEGSorterBarrelEmulator>(
301  iConfig.getParameter<edm::ParameterSet>("tkEgSorterParameters"));
302  } else if (egsortalgo == "Endcap") {
303  l1tkegsorter_ =
304  std::make_unique<l1ct::PFTkEGSorterEmulator>(iConfig.getParameter<edm::ParameterSet>("tkEgSorterParameters"));
305  } else
306  throw cms::Exception("Configuration", "Unsupported tkEgSorterAlgo");
307 
308  if (l1tkegalgo_->writeEgSta())
309  produces<BXVector<l1t::EGamma>>("L1Eg");
310  produces<l1t::TkElectronCollection>("L1TkEle");
311  produces<l1t::TkElectronRegionalOutput>("L1TkElePerBoard");
312  produces<l1t::TkEmCollection>("L1TkEm");
313  produces<l1t::TkEmRegionalOutput>("L1TkEmPerBoard");
314 
315  emuTkVtx_ = iConfig.getParameter<bool>("vtxCollectionEmulation");
316  if (emuTkVtx_) {
317  tkVtxEmu_ = consumes<std::vector<l1t::VertexWord>>(iConfig.getParameter<edm::InputTag>("vtxCollection"));
318  } else {
319  extTkVtx_ = consumes<std::vector<l1t::Vertex>>(iConfig.getParameter<edm::InputTag>("vtxCollection"));
320  }
321  nVtx_ = iConfig.getParameter<int>("nVtx");
322 
323  const char *iprefix[4] = {"totNReg", "maxNReg", "totNSec", "maxNSec"};
324  for (int i = 0; i <= l1muType; ++i) {
325  for (int ip = 0; ip < 4; ++ip) {
326  produces<unsigned int>(std::string(iprefix[ip]) + inputTypeName[i]);
327  }
328  produces<std::vector<unsigned>>(std::string("vecNReg") + inputTypeName[i]);
329  produces<std::vector<unsigned>>(std::string("vecNSec") + inputTypeName[i]);
330  }
331  const char *oprefix[4] = {"totNPF", "maxNPF", "totNPuppi", "maxNPuppi"};
332  for (int i = 0; i < l1ct::OutputRegion::nPFTypes; ++i) {
333  for (int ip = 0; ip < 4; ++ip) {
334  produces<unsigned int>(std::string(oprefix[ip]) + l1ct::OutputRegion::objTypeName[i]);
335  }
336  produces<std::vector<unsigned>>(std::string("vecNPF") + l1ct::OutputRegion::objTypeName[i]);
337  produces<std::vector<unsigned>>(std::string("vecNPuppi") + l1ct::OutputRegion::objTypeName[i]);
338  }
339 
340  initSectorsAndRegions(iConfig);
341 }
edm::EDGetTokenT< std::vector< l1t::VertexWord > > tkVtxEmu_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< std::vector< l1t::Vertex > > extTkVtx_
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:35
edm::EDGetTokenT< l1t::PFTrackCollection > tkCands_
delete x;
Definition: CaloConfig.h:22
std::string const & label() const
Definition: InputTag.h:36
std::vector< edm::EDGetTokenT< l1t::PFClusterCollection > > hadCands_
std::unique_ptr< l1ct::PFAlgoEmulatorBase > l1pfalgo_
std::unique_ptr< l1ct::PFTkEGAlgoEmulator > l1tkegalgo_
const edm::VParameterSet patternWriterConfigs_
std::unique_ptr< l1ct::TrackInputEmulator > trackInput_
void initSectorsAndRegions(const edm::ParameterSet &iConfig)
std::unique_ptr< l1ct::RegionizerEmulator > regionizer_
std::vector< edm::EDGetTokenT< l1t::PFClusterCollection > > emCands_
edm::EDGetTokenT< l1t::SAMuonCollection > muCands_
static constexpr const char * inputTypeName[l1muType+1]
std::unique_ptr< l1ct::LinPuppiEmulator > l1pualgo_
std::vector< SAMuon > SAMuonCollection
Definition: SAMuon.h:15
std::unique_ptr< l1ct::PFTkEGSorterEmulator > l1tkegsorter_
static constexpr const char * objTypeName[nObjTypes]
std::unique_ptr< l1ct::GMTMuonDecoderEmulator > muonInput_
std::vector< l1t::PFTrack > PFTrackCollection
Definition: PFTrack.h:89
HLT enums.
std::unique_ptr< l1ct::HgcalClusterDecoderEmulator > hgcalInput_

◆ ~L1TCorrelatorLayer1Producer()

L1TCorrelatorLayer1Producer::~L1TCorrelatorLayer1Producer ( )
override

Definition at line 343 of file L1TCorrelatorLayer1Producer.cc.

343 {}

Member Function Documentation

◆ addDecodedEmCalo()

void L1TCorrelatorLayer1Producer::addDecodedEmCalo ( l1ct::DetectorSector< l1ct::EmCaloObjEmu > &  sec,
const l1t::PFCluster t 
)
private

Definition at line 847 of file L1TCorrelatorLayer1Producer.cc.

References DummyCfis::c, l1tPhase2CaloJetEmulator_cfi::calo, l1ct::Scales::makeGlbEta(), l1ct::Scales::makePhi(), l1ct::Scales::makePtFromFloat(), and fileinputsource_cfi::sec.

Referenced by addEmCalo().

848  {
850  // set the endcap-sepcific variables to default value:
851  calo.clear();
852  calo.hwPt = l1ct::Scales::makePtFromFloat(c.pt());
853  calo.hwEta = l1ct::Scales::makeGlbEta(c.eta()) -
854  sec.region.hwEtaCenter; // important to enforce that the region boundary is on a discrete value
855  calo.hwPhi = l1ct::Scales::makePhi(sec.region.localPhi(c.phi()));
856  calo.hwPtErr = l1ct::Scales::makePtFromFloat(c.ptError());
857  calo.hwEmID = c.hwEmID();
858  calo.src = &c;
859  sec.obj.push_back(calo);
860 }
glbeta_t makeGlbEta(float eta)
Definition: datatypes.h:203
pt_t makePtFromFloat(float pt)
Definition: datatypes.h:183
phi_t makePhi(float phi)
Definition: datatypes.h:201
Definition: Common.h:9

◆ addDecodedHadCalo()

void L1TCorrelatorLayer1Producer::addDecodedHadCalo ( l1ct::DetectorSector< l1ct::HadCaloObjEmu > &  sec,
const l1t::PFCluster t 
)
private

Definition at line 819 of file L1TCorrelatorLayer1Producer.cc.

References DummyCfis::c, l1tPhase2CaloJetEmulator_cfi::calo, hgcalInput_, l1ct::Scales::makeGlbEta(), l1ct::Scales::makeHoe(), l1ct::Scales::makeMeanZ(), l1ct::Scales::makePhi(), l1ct::Scales::makePtFromFloat(), l1ct::Scales::makeSrrTot(), rawHgcalClusterEncode(), and fileinputsource_cfi::sec.

Referenced by addHadCalo().

820  {
822  ap_uint<256> word = 0;
824  if (hgcalInput_) {
825  calo = hgcalInput_->decode(word);
826  } else {
827  calo.hwPt = l1ct::Scales::makePtFromFloat(c.pt());
828  calo.hwEta = l1ct::Scales::makeGlbEta(c.eta()) -
829  sec.region.hwEtaCenter; // important to enforce that the region boundary is on a discrete value
830  calo.hwPhi = l1ct::Scales::makePhi(sec.region.localPhi(c.phi()));
831  calo.hwEmPt = l1ct::Scales::makePtFromFloat(c.emEt());
832  calo.hwEmID = c.hwEmID();
833  calo.hwSrrTot = l1ct::Scales::makeSrrTot(c.sigmaRR());
834  calo.hwMeanZ = c.absZBarycenter() < 320. ? l1ct::meanz_t(0) : l1ct::Scales::makeMeanZ(c.absZBarycenter());
835  calo.hwHoe = l1ct::Scales::makeHoe(c.hOverE());
836  }
837  calo.src = &c;
838  sec.obj.push_back(calo);
839 }
glbeta_t makeGlbEta(float eta)
Definition: datatypes.h:203
ap_uint< 8 > meanz_t
Definition: datatypes.h:33
srrtot_t makeSrrTot(float var)
Definition: datatypes.h:210
pt_t makePtFromFloat(float pt)
Definition: datatypes.h:183
hoe_t makeHoe(float var)
Definition: datatypes.h:212
uint64_t word
meanz_t makeMeanZ(float var)
Definition: datatypes.h:211
phi_t makePhi(float phi)
Definition: datatypes.h:201
void rawHgcalClusterEncode(ap_uint< 256 > &cwrd, const l1ct::DetectorSector< T > &sec, const l1t::PFCluster &c) const
std::unique_ptr< l1ct::HgcalClusterDecoderEmulator > hgcalInput_
Definition: Common.h:9
Definition: datatypes.h:8

◆ addDecodedMuon()

void L1TCorrelatorLayer1Producer::addDecodedMuon ( l1ct::DetectorSector< l1ct::MuObjEmu > &  sec,
const l1t::SAMuon t 
)
private

Definition at line 800 of file L1TCorrelatorLayer1Producer.cc.

References l1ct::Scales::makeGlbEta(), l1ct::Scales::makeGlbPhi(), l1ct::Scales::makePtFromFloat(), l1ct::Scales::makeZ0(), amptDefaultParameters_cff::mu, muonInput_, fileinputsource_cfi::sec, and submitPVValidationJobs::t.

Referenced by addMuon().

800  {
802  if (muonInput_) {
803  mu = muonInput_->decode(t.word());
804  } else {
805  mu.hwPt = l1ct::Scales::makePtFromFloat(t.pt());
806  mu.hwEta = l1ct::Scales::makeGlbEta(t.eta()); // IMPORTANT: input is in global coordinates!
807  mu.hwPhi = l1ct::Scales::makeGlbPhi(t.phi());
808  mu.hwCharge = !t.hwCharge();
809  mu.hwQuality = t.hwQual() / 2;
810  mu.hwDEta = 0;
811  mu.hwDPhi = 0;
812  mu.hwZ0 = l1ct::Scales::makeZ0(t.vertex().Z());
813  mu.hwDxy = 0; // Dxy not defined yet
814  }
815  mu.src = &t;
816  sec.obj.push_back(mu);
817 }
glbeta_t makeGlbEta(float eta)
Definition: datatypes.h:203
z0_t makeZ0(float z0)
Definition: datatypes.h:185
glbphi_t makeGlbPhi(float phi)
Definition: datatypes.h:206
pt_t makePtFromFloat(float pt)
Definition: datatypes.h:183
std::unique_ptr< l1ct::GMTMuonDecoderEmulator > muonInput_

◆ addDecodedTrack()

void L1TCorrelatorLayer1Producer::addDecodedTrack ( l1ct::DetectorSector< l1ct::TkObjEmu > &  sec,
const l1t::PFTrack t 
)
private

Definition at line 764 of file L1TCorrelatorLayer1Producer.cc.

References funct::abs(), reco::deltaPhi(), l1ct::Scales::makeEta(), l1ct::Scales::makeGlbEta(), l1ct::Scales::makePhi(), l1ct::Scales::makePtFromFloat(), l1ct::Scales::makeZ0(), fileinputsource_cfi::sec, submitPVValidationJobs::t, and trackInput_.

Referenced by addTrack().

764  {
765  std::pair<l1ct::TkObjEmu, bool> tkAndSel;
766  if (trackInput_) {
767  tkAndSel = trackInput_->decodeTrack(t.trackWord().getTrackWord(), sec.region);
768  } else {
769  tkAndSel.first.hwPt = l1ct::Scales::makePtFromFloat(t.pt());
770  tkAndSel.first.hwEta =
771  l1ct::Scales::makeGlbEta(t.caloEta()) -
772  sec.region.hwEtaCenter; // important to enforce that the region boundary is on a discrete value
773  tkAndSel.first.hwPhi = l1ct::Scales::makePhi(sec.region.localPhi(t.caloPhi()));
774  tkAndSel.first.hwCharge = t.charge() > 0;
775  tkAndSel.first.hwQuality = t.quality();
776  tkAndSel.first.hwDEta = l1ct::Scales::makeEta(t.eta() - t.caloEta());
777  tkAndSel.first.hwDPhi = l1ct::Scales::makePhi(std::abs(reco::deltaPhi(t.phi(), t.caloPhi())));
778  tkAndSel.first.hwZ0 = l1ct::Scales::makeZ0(t.vertex().Z());
779  tkAndSel.first.hwDxy = 0;
780  tkAndSel.second = t.quality() > 0;
781  }
782  // CMSSW-only extra info
783  tkAndSel.first.hwChi2 = round(t.chi2() * 10);
784  tkAndSel.first.simPt = t.pt();
785  tkAndSel.first.simCaloEta = t.caloEta();
786  tkAndSel.first.simCaloPhi = t.caloPhi();
787  tkAndSel.first.simVtxEta = t.eta();
788  tkAndSel.first.simVtxPhi = t.phi();
789  tkAndSel.first.simZ0 = t.vertex().Z();
790  tkAndSel.first.simD0 = t.vertex().Rho();
791  tkAndSel.first.src = &t;
792 
793  // If the track fails, we set its pT to zero, so that the decoded tracks are still aligned with the raw tracks
794  // Downstream, the regionizer will just ignore zero-momentum tracks
795  if (!tkAndSel.second)
796  tkAndSel.first.hwPt = 0;
797  sec.obj.push_back(tkAndSel.first);
798 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
glbeta_t makeGlbEta(float eta)
Definition: datatypes.h:203
z0_t makeZ0(float z0)
Definition: datatypes.h:185
pt_t makePtFromFloat(float pt)
Definition: datatypes.h:183
eta_t makeEta(float eta)
Definition: datatypes.h:202
std::unique_ptr< l1ct::TrackInputEmulator > trackInput_
phi_t makePhi(float phi)
Definition: datatypes.h:201
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ addEmCalo()

void L1TCorrelatorLayer1Producer::addEmCalo ( const l1t::PFCluster t,
l1t::PFClusterRef  ref 
)
private

Definition at line 755 of file L1TCorrelatorLayer1Producer.cc.

References addDecodedEmCalo(), DummyCfis::c, clusterRefMap_, l1ct::Event::decoded, l1ct::RegionizerDecodedInputs::emcalo, event_, and fileinputsource_cfi::sec.

Referenced by produce().

755  {
756  for (auto &sec : event_.decoded.emcalo) {
757  if (sec.region.contains(c.eta(), c.phi())) {
759  }
760  }
761  clusterRefMap_[&c] = ref;
762 }
void addDecodedEmCalo(l1ct::DetectorSector< l1ct::EmCaloObjEmu > &sec, const l1t::PFCluster &t)
RegionizerDecodedInputs decoded
std::vector< DetectorSector< EmCaloObjEmu > > emcalo
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_

◆ addHadCalo()

void L1TCorrelatorLayer1Producer::addHadCalo ( const l1t::PFCluster t,
l1t::PFClusterRef  ref 
)
private

Definition at line 743 of file L1TCorrelatorLayer1Producer.cc.

References addDecodedHadCalo(), addRawHgcalCluster(), DummyCfis::c, clusterRefMap_, l1ct::Event::decoded, event_, l1ct::RegionizerDecodedInputs::hadcalo, l1ct::RawInputs::hgcalcluster, l1ct::Event::raw, fileinputsource_cfi::sec, and writeRawHgcalCluster_.

Referenced by produce().

743  {
744  int sidx = 0;
745  for (auto &sec : event_.decoded.hadcalo) {
746  if (sec.region.contains(c.eta(), c.phi())) {
750  }
751  sidx++;
752  }
753  clusterRefMap_[&c] = ref;
754 }
RawInputs raw
std::vector< DetectorSector< HadCaloObjEmu > > hadcalo
RegionizerDecodedInputs decoded
void addRawHgcalCluster(l1ct::DetectorSector< ap_uint< 256 >> &sec, const l1t::PFCluster &c)
std::vector< DetectorSector< ap_uint< 256 > > > hgcalcluster
void addDecodedHadCalo(l1ct::DetectorSector< l1ct::HadCaloObjEmu > &sec, const l1t::PFCluster &t)
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_

◆ addMuon()

void L1TCorrelatorLayer1Producer::addMuon ( const l1t::SAMuon t,
l1t::PFCandidate::MuonRef  ref 
)
private

Definition at line 738 of file L1TCorrelatorLayer1Producer.cc.

References addDecodedMuon(), l1ct::Event::decoded, event_, amptDefaultParameters_cff::mu, l1ct::RawInputs::muon, l1ct::RegionizerDecodedInputs::muon, muonRefMap_, l1ct::DetectorSector< T >::obj, and l1ct::Event::raw.

Referenced by produce().

738  {
739  event_.raw.muon.obj.emplace_back(mu.word());
741  muonRefMap_[&mu] = ref;
742 }
DetectorSector< ap_uint< 64 > > muon
std::vector< T > obj
void addDecodedMuon(l1ct::DetectorSector< l1ct::MuObjEmu > &sec, const l1t::SAMuon &t)
RawInputs raw
RegionizerDecodedInputs decoded
std::unordered_map< const l1t::SAMuon *, l1t::PFCandidate::MuonRef > muonRefMap_
DetectorSector< MuObjEmu > muon

◆ addRawHgcalCluster()

void L1TCorrelatorLayer1Producer::addRawHgcalCluster ( l1ct::DetectorSector< ap_uint< 256 >> &  sec,
const l1t::PFCluster c 
)
private

Definition at line 841 of file L1TCorrelatorLayer1Producer.cc.

References DummyCfis::c, rawHgcalClusterEncode(), and fileinputsource_cfi::sec.

Referenced by addHadCalo().

841  {
842  ap_uint<256> cwrd = 0;
843  rawHgcalClusterEncode(cwrd, sec, c);
844  sec.obj.push_back(cwrd);
845 }
void rawHgcalClusterEncode(ap_uint< 256 > &cwrd, const l1ct::DetectorSector< T > &sec, const l1t::PFCluster &c) const

◆ addTrack()

void L1TCorrelatorLayer1Producer::addTrack ( const l1t::PFTrack t,
l1t::PFTrackRef  ref 
)
private

Definition at line 729 of file L1TCorrelatorLayer1Producer.cc.

References addDecodedTrack(), cms::cuda::assert(), l1ct::Event::decoded, event_, l1ctLayer1_patternWriters_cff::isec, l1ct::Event::raw, volumeBasedMagneticField_160812_cfi::sectors, submitPVValidationJobs::t, l1ct::RawInputs::track, l1ct::RegionizerDecodedInputs::track, and trackRefMap_.

Referenced by produce().

729  {
730  auto &rawsectors = event_.raw.track;
731  auto &sectors = event_.decoded.track;
732  assert(sectors.size() == 18 && rawsectors.size() == 18);
733  int isec = t.track()->phiSector() + (t.eta() >= 0 ? 9 : 0);
734  rawsectors[isec].obj.push_back(t.trackWord().getTrackWord());
736  trackRefMap_[&t] = ref;
737 }
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackRef > trackRefMap_
void addDecodedTrack(l1ct::DetectorSector< l1ct::TkObjEmu > &sec, const l1t::PFTrack &t)
assert(be >=bs)
RawInputs raw
std::vector< DetectorSector< ap_uint< 96 > > > track
RegionizerDecodedInputs decoded
std::vector< DetectorSector< TkObjEmu > > track

◆ addUInt()

void L1TCorrelatorLayer1Producer::addUInt ( unsigned int  value,
std::string  iLabel,
edm::Event iEvent 
)
private

Definition at line 639 of file L1TCorrelatorLayer1Producer.cc.

References iEvent.

Referenced by produce().

639  {
640  iEvent.put(std::make_unique<unsigned>(value), iLabel);
641 }
int iEvent
Definition: GenABIO.cc:224
Definition: value.py:1

◆ beginStream()

void L1TCorrelatorLayer1Producer::beginStream ( edm::StreamID  id)
overrideprivate

Definition at line 423 of file L1TCorrelatorLayer1Producer.cc.

References event_, fRegionDump_, MillePedeFileConverter_cfg::out, patternWriterConfigs_, patternWriters_, muonDTDigis_cfi::pset, and regionDumpName_.

423  {
424  if (!regionDumpName_.empty()) {
425  if (id == 0) {
426  fRegionDump_.open(regionDumpName_.c_str(), std::ios::out | std::ios::binary);
427  } else {
428  edm::LogWarning("L1TCorrelatorLayer1Producer")
429  << "Job running with multiple streams, but dump file will have only events on stream zero.";
430  }
431  }
432  if (!patternWriterConfigs_.empty()) {
433  if (id == 0) {
434  for (const auto &pset : patternWriterConfigs_) {
435  patternWriters_.emplace_back(std::make_unique<L1TCorrelatorLayer1PatternFileWriter>(pset, event_));
436  }
437  } else {
438  edm::LogWarning("L1TCorrelatorLayer1Producer")
439  << "Job running with multiple streams, but pattern files will be written only on stream zero.";
440  }
441  }
442 }
std::vector< std::unique_ptr< L1TCorrelatorLayer1PatternFileWriter > > patternWriters_
const edm::VParameterSet patternWriterConfigs_
Log< level::Warning, false > LogWarning

◆ doVertexings()

void L1TCorrelatorLayer1Producer::doVertexings ( std::vector< float > &  pvdz) const
private

◆ endStream()

void L1TCorrelatorLayer1Producer::endStream ( )
overrideprivate

Definition at line 444 of file L1TCorrelatorLayer1Producer.cc.

References patternWriters_, and convertToRaw::writer.

444  {
445  for (auto &writer : patternWriters_) {
446  writer->flush();
447  }
448 }
std::vector< std::unique_ptr< L1TCorrelatorLayer1PatternFileWriter > > patternWriters_

◆ fetchDecodedTracks()

std::unique_ptr< std::vector< l1t::PFTrack > > L1TCorrelatorLayer1Producer::fetchDecodedTracks ( ) const
private

Definition at line 988 of file L1TCorrelatorLayer1Producer.cc.

References l1ct::Event::decoded, event_, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, runTheMatrix::ret, l1ct::RegionizerDecodedInputs::track, and L1BJetProducer_cff::vtx.

Referenced by produce().

988  {
989  auto ret = std::make_unique<std::vector<l1t::PFTrack>>();
990  for (const auto &r : event_.decoded.track) {
991  const auto &reg = r.region;
992  for (const auto &p : r.obj) {
993  if (p.hwPt == 0 || !reg.isFiducial(p))
994  continue;
996  p.floatPt(), reg.floatGlbEta(p.hwVtxEta()), reg.floatGlbPhi(p.hwVtxPhi()), 0);
997 
998  reco::Particle::Point vtx(0, 0, p.floatZ0());
999 
1000  ret->emplace_back(l1t::PFTrack(p.intCharge(),
1002  vtx,
1003  p.src->track(),
1004  0,
1005  reg.floatGlbEta(p.hwEta),
1006  reg.floatGlbPhi(p.hwPhi),
1007  -1,
1008  -1,
1009  p.hwQuality.to_int(),
1010  false,
1011  p.intPt(),
1012  p.intEta(),
1013  p.intPhi()));
1014  }
1015  }
1016  return ret;
1017 }
ret
prodAgent to be discontinued
math::XYZPoint Point
point in the space
Definition: Particle.h:25
RegionizerDecodedInputs decoded
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
std::vector< DetectorSector< TkObjEmu > > track

◆ fetchEmCalo()

std::unique_ptr< l1t::PFCandidateCollection > L1TCorrelatorLayer1Producer::fetchEmCalo ( ) const
private

Definition at line 957 of file L1TCorrelatorLayer1Producer.cc.

References event_, AlCaHLTBitMon_ParallelJobs::p, l1ct::Event::pfinputs, l1t::PFCandidate::Photon, alignCSCRings::r, runTheMatrix::ret, and setRefs_().

Referenced by produce().

957  {
958  auto ret = std::make_unique<l1t::PFCandidateCollection>();
959  for (const auto &r : event_.pfinputs) {
960  const auto &reg = r.region;
961  for (const auto &p : r.emcalo) {
962  if (p.hwPt == 0 || !reg.isFiducial(p))
963  continue;
964  reco::Particle::PolarLorentzVector p4(p.floatPt(), reg.floatGlbEtaOf(p), reg.floatGlbPhiOf(p), 0.13f);
965  ret->emplace_back(l1t::PFCandidate::Photon, 0, p4, 1, p.intPt(), p.intEta(), p.intPhi());
966  ret->back().setHwEmID(p.hwEmID);
967  setRefs_(ret->back(), p);
968  }
969  }
970  return ret;
971 }
void setRefs_(l1t::PFCandidate &pf, const T &p) const
ret
prodAgent to be discontinued
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
std::vector< PFInputRegion > pfinputs

◆ fetchHadCalo()

std::unique_ptr< l1t::PFCandidateCollection > L1TCorrelatorLayer1Producer::fetchHadCalo ( ) const
private

Definition at line 941 of file L1TCorrelatorLayer1Producer.cc.

References event_, l1t::PFCandidate::NeutralHadron, AlCaHLTBitMon_ParallelJobs::p, l1ct::Event::pfinputs, l1t::PFCandidate::Photon, alignCSCRings::r, runTheMatrix::ret, and setRefs_().

Referenced by produce().

941  {
942  auto ret = std::make_unique<l1t::PFCandidateCollection>();
943  for (const auto &r : event_.pfinputs) {
944  const auto &reg = r.region;
945  for (const auto &p : r.hadcalo) {
946  if (p.hwPt == 0 || !reg.isFiducial(p))
947  continue;
948  reco::Particle::PolarLorentzVector p4(p.floatPt(), reg.floatGlbEtaOf(p), reg.floatGlbPhiOf(p), 0.13f);
950  ret->emplace_back(type, 0, p4, 1, p.intPt(), p.intEta(), p.intPhi());
951  ret->back().setHwEmID(p.hwEmID);
952  setRefs_(ret->back(), p);
953  }
954  }
955  return ret;
956 }
void setRefs_(l1t::PFCandidate &pf, const T &p) const
ret
prodAgent to be discontinued
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
std::vector< PFInputRegion > pfinputs

◆ fetchPF()

std::unique_ptr< l1t::PFCandidateCollection > L1TCorrelatorLayer1Producer::fetchPF ( ) const
private

Definition at line 1019 of file L1TCorrelatorLayer1Producer.cc.

References l1t::PFCandidate::ChargedHadron, l1t::PFCandidate::Electron, event_, f, l1t::PFCandidate::Muon, l1t::PFCandidate::NeutralHadron, EgHLTOffHistBins_cfi::nr, l1ct::Event::out, AlCaHLTBitMon_ParallelJobs::p, l1ct::Event::pfinputs, l1t::PFCandidate::Photon, runTheMatrix::ret, and setRefs_().

Referenced by produce().

1019  {
1020  auto ret = std::make_unique<l1t::PFCandidateCollection>();
1021  for (unsigned int ir = 0, nr = event_.pfinputs.size(); ir < nr; ++ir) {
1022  const auto &reg = event_.pfinputs[ir].region;
1023  for (const auto &p : event_.out[ir].pfcharged) {
1024  if (p.hwPt == 0 || !reg.isFiducial(p))
1025  continue;
1027  p.floatPt(), reg.floatGlbEta(p.hwVtxEta()), reg.floatGlbPhi(p.hwVtxPhi()), 0.13f);
1029  if (p.hwId.isMuon())
1031  else if (p.hwId.isElectron())
1033  ret->emplace_back(type, p.intCharge(), p4, 1, p.intPt(), p.intEta(), p.intPhi());
1034  ret->back().setZ0(p.floatZ0());
1035  ret->back().setDxy(p.floatDxy());
1036  ret->back().setHwZ0(p.hwZ0);
1037  ret->back().setHwDxy(p.hwDxy);
1038  ret->back().setHwTkQuality(p.hwTkQuality);
1039  ret->back().setCaloEta(reg.floatGlbEtaOf(p));
1040  ret->back().setCaloPhi(reg.floatGlbPhiOf(p));
1041 
1042  setRefs_(ret->back(), p);
1043  }
1044  for (const auto &p : event_.out[ir].pfneutral) {
1045  if (p.hwPt == 0 || !reg.isFiducial(p))
1046  continue;
1047  reco::Particle::PolarLorentzVector p4(p.floatPt(), reg.floatGlbEtaOf(p), reg.floatGlbPhiOf(p), 0.13f);
1050  ret->emplace_back(type, 0, p4, 1, p.intPt(), p.intEta(), p.intPhi());
1051  ret->back().setHwEmID(p.hwEmID);
1052  ret->back().setCaloEta(reg.floatGlbEtaOf(p));
1053  ret->back().setCaloPhi(reg.floatGlbPhiOf(p));
1054  setRefs_(ret->back(), p);
1055  }
1056  }
1057  return ret;
1058 }
void setRefs_(l1t::PFCandidate &pf, const T &p) const
ret
prodAgent to be discontinued
std::vector< OutputRegion > out
double f[11][100]
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
std::vector< PFInputRegion > pfinputs

◆ fetchTracks()

std::unique_ptr< l1t::PFCandidateCollection > L1TCorrelatorLayer1Producer::fetchTracks ( ) const
private

Definition at line 972 of file L1TCorrelatorLayer1Producer.cc.

References l1t::PFCandidate::ChargedHadron, event_, f, AlCaHLTBitMon_ParallelJobs::p, l1ct::Event::pfinputs, alignCSCRings::r, runTheMatrix::ret, and setRefs_().

Referenced by produce().

972  {
973  auto ret = std::make_unique<l1t::PFCandidateCollection>();
974  for (const auto &r : event_.pfinputs) {
975  const auto &reg = r.region;
976  for (const auto &p : r.track) {
977  if (p.hwPt == 0 || !reg.isFiducial(p))
978  continue;
980  p.floatPt(), reg.floatGlbEta(p.hwVtxEta()), reg.floatGlbPhi(p.hwVtxPhi()), 0.13f);
981  ret->emplace_back(l1t::PFCandidate::ChargedHadron, p.intCharge(), p4, 1, p.intPt(), p.intEta(), p.intPhi());
982  setRefs_(ret->back(), p);
983  }
984  }
985  return ret;
986 }
void setRefs_(l1t::PFCandidate &pf, const T &p) const
ret
prodAgent to be discontinued
double f[11][100]
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
std::vector< PFInputRegion > pfinputs

◆ fillDescriptions()

void L1TCorrelatorLayer1Producer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 345 of file L1TCorrelatorLayer1Producer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, L1TCorrelatorLayer1PatternFileWriter::getParameterSetDescription(), l1ct::PFTkEGAlgoEmuConfig::getParameterSetDescription(), l1ct::MultififoRegionizerEmulator::getParameterSetDescriptionBarrel(), ProducerED_cfi::InputTag, or, and AlCaHLTBitMon_QueryRunRegistry::string.

345  {
347  // Inputs and cuts
348  desc.add<edm::InputTag>("tracks", edm::InputTag(""));
349  desc.add<edm::InputTag>("muons", edm::InputTag("l1tSAMuonsGmt", "prompt"));
350  desc.add<std::vector<edm::InputTag>>("emClusters", std::vector<edm::InputTag>());
351  desc.add<std::vector<edm::InputTag>>("hadClusters", std::vector<edm::InputTag>());
352  desc.add<edm::InputTag>("vtxCollection", edm::InputTag("l1tVertexFinderEmulator", "L1VerticesEmulation"));
353  desc.add<bool>("vtxCollectionEmulation", true);
354  desc.add<double>("emPtCut", 0.0);
355  desc.add<double>("hadPtCut", 0.0);
356  desc.add<double>("trkPtCut", 0.0);
357  desc.add<int32_t>("nVtx");
358  // Input conversion
359  edm::EmptyGroupDescription emptyGroup;
360  desc.ifValue(edm::ParameterDescription<std::string>("trackInputConversionAlgo", "Ideal", true),
361  "Ideal" >> emptyGroup or "Emulator" >> getParDesc<l1ct::TrackInputEmulator>("trackInputConversion"));
362  desc.ifValue(edm::ParameterDescription<std::string>("muonInputConversionAlgo", "Ideal", true),
363  "Ideal" >> emptyGroup or "Emulator" >> getParDesc<l1ct::GMTMuonDecoderEmulator>("muonInputConversion"));
364  desc.ifValue(
365  edm::ParameterDescription<std::string>("hgcalInputConversionAlgo", "Ideal", true),
366  "Ideal" >> emptyGroup or "Emulator" >> getParDesc<l1ct::HgcalClusterDecoderEmulator>("hgcalInputConversion"));
367  // Regionizer
368  auto idealRegPD = getParDesc<l1ct::RegionizerEmulator>("regionizerAlgo");
369  auto tdrRegPD = getParDesc<l1ct::TDRRegionizerEmulator>("regionizerAlgo");
370  auto multififoRegPD = getParDesc<l1ct::MultififoRegionizerEmulator>("regionizerAlgo");
371  auto bfMultififoRegPD = getParDesc<l1ct::BufferedFoldedMultififoRegionizerEmulator>("regionizerAlgo");
373  "regionizerAlgoParameters", l1ct::MultififoRegionizerEmulator::getParameterSetDescriptionBarrel(), true);
374  auto mbMultififoRegPD = getParDesc<l1ct::MiddleBufferMultififoRegionizerEmulator>("regionizerAlgo");
375  desc.ifValue(edm::ParameterDescription<std::string>("regionizerAlgo", "Ideal", true),
376  "Ideal" >> idealRegPD or "TDR" >> tdrRegPD or "Multififo" >> multififoRegPD or
377  "BufferedFoldedMultififo" >> bfMultififoRegPD or "MultififoBarrel" >> multififoBarrelRegPD or
378  "MiddleBufferMultififo" >> mbMultififoRegPD);
379  // PF
380  desc.ifValue(edm::ParameterDescription<std::string>("pfAlgo", "PFAlgo3", true),
381  "PFAlgo3" >> getParDesc<l1ct::PFAlgo3Emulator>("pfAlgo") or
382  "PFAlgo2HGC" >> getParDesc<l1ct::PFAlgo2HGCEmulator>("pfAlgo") or
383  "PFAlgoDummy" >> getParDesc<l1ct::PFAlgoDummyEmulator>("pfAlgo"));
384  // Puppi
385  desc.ifValue(edm::ParameterDescription<std::string>("puAlgo", "LinearizedPuppi", true),
386  "LinearizedPuppi" >> getParDesc<l1ct::LinPuppiEmulator>("puAlgo"));
387  // EGamma
389  // EGamma sort
390  desc.ifValue(edm::ParameterDescription<std::string>("tkEgSorterAlgo", "Barrel", true),
391  "Barrel" >> getParDesc<l1ct::PFTkEGSorterBarrelEmulator>("tkEgSorter") or
392  "Endcap" >> getParDesc<l1ct::PFTkEGSorterEmulator>("tkEgSorter"));
393  // geometry: calo sectors
394  edm::ParameterSetDescription caloSectorPSD;
395  caloSectorPSD.add<std::vector<double>>("etaBoundaries");
396  caloSectorPSD.add<uint32_t>("phiSlices", 3);
397  caloSectorPSD.add<double>("phiZero", 0.);
398  desc.addVPSet("caloSectors", caloSectorPSD);
399  // geometry: regions
401  regionPSD.add<std::vector<double>>("etaBoundaries");
402  regionPSD.add<uint32_t>("phiSlices", 9);
403  regionPSD.add<double>("etaExtra", 0.25);
404  regionPSD.add<double>("phiExtra", 0.25);
405  desc.addVPSet("regions", regionPSD);
406  // geometry: boards
408  boardPSD.add<std::vector<unsigned int>>("regions");
409  desc.addVPSet("boards", boardPSD);
410  // dump files
411  desc.addUntracked<std::string>("dumpFileName", "");
412  desc.addUntracked<bool>("writeRawHgcalCluster", false);
413  // pattern files
414  desc.addVPSetUntracked(
416  // debug
417  desc.addUntracked<double>("debugEta", 0.);
418  desc.addUntracked<double>("debugPhi", 0.);
419  desc.addUntracked<double>("debugR", -1.);
420  descriptions.add("l1tCorrelatorLayer1", desc);
421 }
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:35
static edm::ParameterSetDescription getParameterSetDescription()
static edm::ParameterSetDescription getParameterSetDescriptionBarrel()
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static edm::ParameterSetDescription getParameterSetDescription()

◆ getParDesc()

template<typename T >
static edm::ParameterDescription<edm::ParameterSetDescription> L1TCorrelatorLayer1Producer::getParDesc ( const std::string &  name)
inlinestaticprivate

Definition at line 184 of file L1TCorrelatorLayer1Producer.cc.

References Skims_PA_cff::name.

184  {
186  name + "Parameters", T::getParameterSetDescription(), true);
187  }

◆ initEvent()

void L1TCorrelatorLayer1Producer::initEvent ( const edm::Event e)
private

Definition at line 719 of file L1TCorrelatorLayer1Producer.cc.

References l1ct::Event::clear(), clusterRefMap_, l1ct::Event::event, event_, iEvent, l1ct::Event::lumi, muonRefMap_, l1ct::Event::run, and trackRefMap_.

Referenced by produce().

719  {
720  event_.clear();
721  event_.run = iEvent.id().run();
722  event_.lumi = iEvent.id().luminosityBlock();
723  event_.event = iEvent.id().event();
724  clusterRefMap_.clear();
725  trackRefMap_.clear();
726  muonRefMap_.clear();
727 }
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackRef > trackRefMap_
uint64_t event
int iEvent
Definition: GenABIO.cc:224
std::unordered_map< const l1t::SAMuon *, l1t::PFCandidate::MuonRef > muonRefMap_
void clear()
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_

◆ initSectorsAndRegions()

void L1TCorrelatorLayer1Producer::initSectorsAndRegions ( const edm::ParameterSet iConfig)
private

Definition at line 643 of file L1TCorrelatorLayer1Producer.cc.

References l1ct::Event::board_out, l1ct::Event::decoded, l1ct::RegionizerDecodedInputs::emcalo, hltEgammaEleL1TrkIsoL1Seeded_cfi::etaBoundaries, electrons_cff::etaWidth, event_, Exception, edm::ParameterSet::getParameter(), l1ct::RegionizerDecodedInputs::hadcalo, l1ct::RawInputs::hgcalcluster, hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, M_PI, l1ct::Scales::maxAbsEta(), l1ct::Scales::maxAbsPhi(), l1ct::RawInputs::muon, l1ct::RegionizerDecodedInputs::muon, neta, l1ct::Event::pfinputs, l1ctLayer1_cff::phiSlices, electrons_cff::phiWidth, l1ctLayer1_cff::phiZero, l1ct::Event::raw, reco::reduceRange(), l1ct::DetectorSector< T >::region, l1ct::RawInputs::track, and l1ct::RegionizerDecodedInputs::track.

Referenced by L1TCorrelatorLayer1Producer().

643  {
644  // the track finder geometry is fixed
645  unsigned int TF_phiSlices = 9;
646  float TF_phiWidth = 2 * M_PI / TF_phiSlices;
647  event_.decoded.track.clear();
648  for (unsigned int ieta = 0, neta = 2; ieta < neta; ++ieta) {
649  for (unsigned int iphi = 0; iphi < TF_phiSlices; ++iphi) {
650  float phiCenter = reco::reduceRange(iphi * TF_phiWidth);
651  event_.decoded.track.emplace_back((ieta ? 0. : -2.5), (ieta ? 2.5 : 0.0), phiCenter, TF_phiWidth);
652  event_.raw.track.emplace_back((ieta ? 0. : -2.5), (ieta ? 2.5 : 0.0), phiCenter, TF_phiWidth);
653  }
654  }
655 
656  event_.decoded.emcalo.clear();
657  event_.decoded.hadcalo.clear();
658  event_.raw.hgcalcluster.clear();
659 
660  for (const edm::ParameterSet &preg : iConfig.getParameter<edm::VParameterSet>("caloSectors")) {
661  std::vector<double> etaBoundaries = preg.getParameter<std::vector<double>>("etaBoundaries");
662  if (!std::is_sorted(etaBoundaries.begin(), etaBoundaries.end()))
663  throw cms::Exception("Configuration", "caloSectors.etaBoundaries not sorted\n");
664  unsigned int phiSlices = preg.getParameter<uint32_t>("phiSlices");
665  float phiWidth = 2 * M_PI / phiSlices;
666  if (phiWidth > 2 * l1ct::Scales::maxAbsPhi())
667  throw cms::Exception("Configuration", "caloSectors phi range too large for phi_t data type");
668  double phiZero = preg.getParameter<double>("phiZero");
669  for (unsigned int ieta = 0, neta = etaBoundaries.size() - 1; ieta < neta; ++ieta) {
670  float etaWidth = etaBoundaries[ieta + 1] - etaBoundaries[ieta];
671  if (etaWidth > 2 * l1ct::Scales::maxAbsEta())
672  throw cms::Exception("Configuration", "caloSectors eta range too large for eta_t data type");
673  for (unsigned int iphi = 0; iphi < phiSlices; ++iphi) {
674  float phiCenter = reco::reduceRange(iphi * phiWidth + phiZero);
675  event_.decoded.hadcalo.emplace_back(etaBoundaries[ieta], etaBoundaries[ieta + 1], phiCenter, phiWidth);
676  event_.decoded.emcalo.emplace_back(etaBoundaries[ieta], etaBoundaries[ieta + 1], phiCenter, phiWidth);
677  event_.raw.hgcalcluster.emplace_back(etaBoundaries[ieta], etaBoundaries[ieta + 1], phiCenter, phiWidth);
678  }
679  }
680  }
681 
682  event_.decoded.muon.region = l1ct::PFRegionEmu(0., 0.); // centered at (0,0)
683  event_.raw.muon.region = l1ct::PFRegionEmu(0., 0.); // centered at (0,0)
684 
685  event_.pfinputs.clear();
686  for (const edm::ParameterSet &preg : iConfig.getParameter<edm::VParameterSet>("regions")) {
687  std::vector<double> etaBoundaries = preg.getParameter<std::vector<double>>("etaBoundaries");
688  if (!std::is_sorted(etaBoundaries.begin(), etaBoundaries.end()))
689  throw cms::Exception("Configuration", "regions.etaBoundaries not sorted\n");
690  unsigned int phiSlices = preg.getParameter<uint32_t>("phiSlices");
691  float etaExtra = preg.getParameter<double>("etaExtra");
692  float phiExtra = preg.getParameter<double>("phiExtra");
693  float phiWidth = 2 * M_PI / phiSlices;
694  for (unsigned int ieta = 0, neta = etaBoundaries.size() - 1; ieta < neta; ++ieta) {
695  for (unsigned int iphi = 0; iphi < phiSlices; ++iphi) {
696  float phiCenter = reco::reduceRange(iphi * phiWidth); //align with L1 TrackFinder phi sector indexing
697  event_.pfinputs.emplace_back(
698  etaBoundaries[ieta], etaBoundaries[ieta + 1], phiCenter, phiWidth, etaExtra, phiExtra);
699  }
700  }
701  }
702 
703  event_.board_out.clear();
704  const edm::VParameterSet &board_params = iConfig.getParameter<edm::VParameterSet>("boards");
705  event_.board_out.resize(board_params.size());
706  for (unsigned int bidx = 0; bidx < board_params.size(); bidx++) {
707  event_.board_out[bidx].region_index = board_params[bidx].getParameter<std::vector<unsigned int>>("regions");
708  float etaBoard = 0.;
709  float phiBoard = 0.;
710  for (auto ridx : event_.board_out[bidx].region_index) {
711  etaBoard += event_.pfinputs[ridx].region.floatEtaCenter();
712  phiBoard += event_.pfinputs[ridx].region.floatPhiCenter();
713  }
714  event_.board_out[bidx].eta = etaBoard / event_.board_out[bidx].region_index.size();
715  event_.board_out[bidx].phi = phiBoard / event_.board_out[bidx].region_index.size();
716  }
717 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
DetectorSector< ap_uint< 64 > > muon
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:35
float maxAbsPhi()
Definition: datatypes.h:215
const int neta
RawInputs raw
std::vector< DetectorSector< HadCaloObjEmu > > hadcalo
std::vector< DetectorSector< ap_uint< 96 > > > track
RegionizerDecodedInputs decoded
#define M_PI
std::vector< DetectorSector< EmCaloObjEmu > > emcalo
DetectorSector< MuObjEmu > muon
std::vector< DetectorSector< ap_uint< 256 > > > hgcalcluster
std::vector< DetectorSector< TkObjEmu > > track
float maxAbsEta()
Definition: datatypes.h:214
std::vector< PFInputRegion > pfinputs
std::vector< OutputBoard > board_out

◆ produce()

void L1TCorrelatorLayer1Producer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

—— READ TRACKS -—

---— READ MUONS -—

Definition at line 451 of file L1TCorrelatorLayer1Producer.cc.

References a, addEmCalo(), addHadCalo(), addMuon(), addTrack(), addUInt(), b, l1ct::Event::board_out, l1ct::Event::clear(), debugEta_, debugPhi_, debugR_, l1ct::Event::decoded, PbPb_ZMuSkimMuonDPG_cff::deltaR, emCands_, emPtCut_, emuTkVtx_, event_, extTkVtx_, fetchDecodedTracks(), fetchEmCalo(), fetchHadCalo(), fetchPF(), fetchTracks(), fRegionDump_, hadCands_, hadPtCut_, hasTracks_, l1ct::PVObj::hwZ0, mps_fire::i, iEvent, initEvent(), inputTypeName, l1muType, l1pfalgo_, l1pualgo_, l1tkegalgo_, l1tkegsorter_, l1ct::Scales::makeZ0(), SiStripPI::min, eostools::move(), amptDefaultParameters_cff::mu, muCands_, DiMuonV_cfg::muons, dqmiodumpmetadata::n, l1ct::OutputRegion::nPFTypes, EgHLTOffHistBins_cfi::nr, nVtx_, l1ct::OutputRegion::objTypeName, l1ct::Event::out, patternWriters_, l1ct::Event::pfinputs, putEgObjects(), putEgStaObjects(), putPuppi(), l1ct::Event::pvs, l1ct::Event::pvs_emu, regionizer_, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, tkCands_, tkVtxEmu_, totAndMax(), DiMuonV_cfg::tracks, trkPt_, vecOutput(), vecRegInput(), vecSecInput(), l1t::VertexWord::vertexWord(), L1BJetProducer_cff::vtx, l1ct::Event::write(), convertToRaw::writer, HLTMuonOfflineAnalyzer_cfi::z0, and l1t::VertexWord::z0().

451  {
452  // clear the regions also at the beginning, in case one event didn't complete but the job continues on
453  initEvent(iEvent);
454 
456  if (hasTracks_) {
458  iEvent.getByToken(tkCands_, htracks);
459  const auto &tracks = *htracks;
460  for (unsigned int itk = 0, ntk = tracks.size(); itk < ntk; ++itk) {
461  const auto &tk = tracks[itk];
462  // adding objects to PF
463  if (debugR_ > 0 && deltaR(tk.eta(), tk.phi(), debugEta_, debugPhi_) > debugR_)
464  continue;
465  if (tk.pt() > trkPt_) {
466  addTrack(tk, l1t::PFTrackRef(htracks, itk));
467  }
468  }
469  }
470 
473  iEvent.getByToken(muCands_, muons);
474  for (unsigned int i = 0, n = muons->size(); i < n; ++i) {
475  const l1t::SAMuon &mu = (*muons)[i];
476  if (debugR_ > 0 && deltaR(mu.eta(), mu.phi(), debugEta_, debugPhi_) > debugR_)
477  continue;
479  }
480  // ------ READ CALOS -----
482  for (const auto &tag : emCands_) {
483  iEvent.getByToken(tag, caloHandle);
484  const auto &calos = *caloHandle;
485  for (unsigned int ic = 0, nc = calos.size(); ic < nc; ++ic) {
486  const auto &calo = calos[ic];
487  if (debugR_ > 0 && deltaR(calo.eta(), calo.phi(), debugEta_, debugPhi_) > debugR_)
488  continue;
489  if (calo.pt() > emPtCut_)
490  addEmCalo(calo, l1t::PFClusterRef(caloHandle, ic));
491  }
492  }
493  for (const auto &tag : hadCands_) {
494  iEvent.getByToken(tag, caloHandle);
495  const auto &calos = *caloHandle;
496  for (unsigned int ic = 0, nc = calos.size(); ic < nc; ++ic) {
497  const auto &calo = calos[ic];
498  if (debugR_ > 0 && deltaR(calo.eta(), calo.phi(), debugEta_, debugPhi_) > debugR_)
499  continue;
500  if (calo.pt() > hadPtCut_)
501  addHadCalo(calo, l1t::PFClusterRef(caloHandle, ic));
502  }
503  }
504 
506 
507  // First, get a copy of the discretized and corrected inputs, and write them out
508  iEvent.put(fetchEmCalo(), "EmCalo");
509  iEvent.put(fetchHadCalo(), "Calo");
510  iEvent.put(fetchTracks(), "TK");
511  iEvent.put(fetchDecodedTracks(), "DecodedTK");
512 
513  // Then do the vertexing, and save it out
514  std::vector<float> z0s;
515  std::vector<std::pair<float, float>> ptsums;
516  float z0 = 0;
517  double ptsum = 0;
518  l1t::VertexWord pvwd;
519  // FIXME: collections seem to be already sorted
520  if (emuTkVtx_) {
522  iEvent.getByToken(tkVtxEmu_, vtxEmuHandle);
523  for (const auto &vtx : *vtxEmuHandle) {
524  ptsums.push_back(std::pair<float, float>(vtx.pt(), vtx.z0()));
525  if (ptsum == 0 || vtx.pt() > ptsum) {
526  ptsum = vtx.pt();
527  pvwd = vtx;
528  }
529  }
530  } else {
532  iEvent.getByToken(extTkVtx_, vtxHandle);
533  for (const auto &vtx : *vtxHandle) {
534  ptsums.push_back(std::pair<float, float>(vtx.pt(), vtx.z0()));
535  if (ptsum == 0 || vtx.pt() > ptsum) {
536  ptsum = vtx.pt();
537  z0 = vtx.z0();
538  }
539  }
540  pvwd = l1t::VertexWord(1, z0, 1, ptsum, 1, 1, 1);
541  }
542  l1ct::PVObjEmu hwpv;
543  hwpv.hwZ0 = l1ct::Scales::makeZ0(pvwd.z0());
544  event_.pvs.push_back(hwpv);
545  event_.pvs_emu.push_back(pvwd.vertexWord());
546  //get additional vertices if requested
547  if (nVtx_ > 1) {
548  std::stable_sort(ptsums.begin(), ptsums.end(), [](const auto &a, const auto &b) { return a.first > b.first; });
549  for (int i0 = 0; i0 < std::min(int(ptsums.size()), int(nVtx_)); i0++) {
550  z0s.push_back(ptsums[i0].second);
551  }
552  for (unsigned int i = 1; i < z0s.size(); ++i) {
553  l1ct::PVObjEmu hwpv;
554  hwpv.hwZ0 = l1ct::Scales::makeZ0(z0s[i]);
555  event_.pvs.push_back(hwpv); //Skip emu
556  }
557  }
558  // Then also save the tracks with a vertex cut
559 #if 0
560  iEvent.put(l1regions_.fetchTracks(/*ptmin=*/0.0, /*fromPV=*/true), "TKVtx");
561 #endif
562 
563  // Then run PF in each region
564  event_.out.resize(event_.pfinputs.size());
565  for (unsigned int ir = 0, nr = event_.pfinputs.size(); ir < nr; ++ir) {
566  l1pfalgo_->run(event_.pfinputs[ir], event_.out[ir]);
567  l1pfalgo_->mergeNeutrals(event_.out[ir]);
568  l1tkegalgo_->run(event_.pfinputs[ir], event_.out[ir]);
569  l1tkegalgo_->runIso(event_.pfinputs[ir], event_.pvs, event_.out[ir]);
570  }
571 
572  // Then run puppi (regionally)
573  for (unsigned int ir = 0, nr = event_.pfinputs.size(); ir < nr; ++ir) {
574  l1pualgo_->run(event_.pfinputs[ir], event_.pvs, event_.out[ir]);
575  //l1pualgo_->runNeutralsPU(l1region, z0, -1., puGlobals);
576  }
577 
578  // NOTE: This needs to happen before the EG sorting per board so that the EG objects
579  // get a global reference to the EGSta before being mixed among differente regions
580  std::vector<edm::Ref<BXVector<l1t::EGamma>>> egsta_refs;
581  if (l1tkegalgo_->writeEgSta()) {
582  putEgStaObjects(iEvent, "L1Eg");
583  }
584 
585  // l1tkegsorter_->setDebug(true);
586  for (auto &board : event_.board_out) {
587  l1tkegsorter_->runPho(event_.pfinputs, event_.out, board.region_index, board.egphoton);
588  l1tkegsorter_->runEle(event_.pfinputs, event_.out, board.region_index, board.egelectron);
589  }
590 
591  // save PF into the event
592  iEvent.put(fetchPF(), "PF");
593 
594  // and save puppi
595  putPuppi(iEvent);
596 
597  // save the EG objects
598  putEgObjects(iEvent, l1tkegalgo_->writeEgSta(), "L1TkEm", "L1TkEmPerBoard", "L1TkEle", "L1TkElePerBoard");
599 
600  // Then go do the multiplicities
601  for (int i = 0; i <= l1muType; ++i) {
602  auto vecInputs = vecSecInput(InputType(i));
603  auto tm = totAndMax(*vecInputs);
604  addUInt(tm.first, std::string("totNSec") + inputTypeName[i], iEvent);
605  addUInt(tm.second, std::string("maxNSec") + inputTypeName[i], iEvent);
606  iEvent.put(std::move(vecInputs), std::string("vecNSec") + inputTypeName[i]);
607  }
608  for (int i = 0; i <= l1muType; ++i) {
609  auto vecInputs = vecRegInput(InputType(i));
610  auto tm = totAndMax(*vecInputs);
611  addUInt(tm.first, std::string("totNReg") + inputTypeName[i], iEvent);
612  addUInt(tm.second, std::string("maxNReg") + inputTypeName[i], iEvent);
613  iEvent.put(std::move(vecInputs), std::string("vecNReg") + inputTypeName[i]);
614  }
615  for (int i = 0; i < l1ct::OutputRegion::nPFTypes; ++i) {
616  auto vecPF = vecOutput(OutputType(i), false);
617  auto tmPF = totAndMax(*vecPF);
618  addUInt(tmPF.first, std::string("totNPF") + l1ct::OutputRegion::objTypeName[i], iEvent);
619  addUInt(tmPF.second, std::string("maxNPF") + l1ct::OutputRegion::objTypeName[i], iEvent);
621  auto vecPuppi = vecOutput(OutputType(i), true);
622  auto tmPuppi = totAndMax(*vecPuppi);
623  addUInt(tmPuppi.first, std::string("totNPuppi") + l1ct::OutputRegion::objTypeName[i], iEvent);
624  addUInt(tmPuppi.second, std::string("maxNPuppi") + l1ct::OutputRegion::objTypeName[i], iEvent);
625  iEvent.put(std::move(vecPuppi), std::string("vecNPuppi") + l1ct::OutputRegion::objTypeName[i]);
626  }
627 
628  if (fRegionDump_.is_open()) {
630  }
631  for (auto &writer : patternWriters_) {
632  writer->write(event_);
633  }
634 
635  // finally clear the regions
636  event_.clear();
637 }
edm::EDGetTokenT< std::vector< l1t::VertexWord > > tkVtxEmu_
std::vector< PVObjEmu > pvs
z0_t makeZ0(float z0)
Definition: datatypes.h:185
edm::EDGetTokenT< std::vector< l1t::Vertex > > extTkVtx_
edm::EDGetTokenT< l1t::PFTrackCollection > tkCands_
void putEgObjects(edm::Event &iEvent, const bool writeEgSta, const std::string &tkEmLabel, const std::string &tkEmPerBoardLabel, const std::string &tkEleLabel, const std::string &tkElePerBoardLabel) const
std::vector< std::unique_ptr< L1TCorrelatorLayer1PatternFileWriter > > patternWriters_
std::unique_ptr< std::vector< l1t::PFTrack > > fetchDecodedTracks() const
std::vector< OutputRegion > out
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
Definition: DiMuonV_cfg.py:214
l1ct::OutputRegion::ObjType OutputType
std::vector< edm::EDGetTokenT< l1t::PFClusterCollection > > hadCands_
std::unique_ptr< l1ct::PFAlgoEmulatorBase > l1pfalgo_
std::unique_ptr< l1ct::PFTkEGAlgoEmulator > l1tkegalgo_
void putPuppi(edm::Event &iEvent) const
void addEmCalo(const l1t::PFCluster &t, l1t::PFClusterRef ref)
U second(std::pair< T, U > const &p)
std::unique_ptr< l1t::PFCandidateCollection > fetchTracks() const
void addMuon(const l1t::SAMuon &t, l1t::PFCandidate::MuonRef ref)
int iEvent
Definition: GenABIO.cc:224
void addTrack(const l1t::PFTrack &t, l1t::PFTrackRef ref)
bool write(std::fstream &to) const
std::unique_ptr< l1ct::RegionizerEmulator > regionizer_
std::vector< edm::EDGetTokenT< l1t::PFClusterCollection > > emCands_
edm::EDGetTokenT< l1t::SAMuonCollection > muCands_
static constexpr const char * inputTypeName[l1muType+1]
std::unique_ptr< l1t::PFCandidateCollection > fetchHadCalo() const
std::unique_ptr< l1ct::LinPuppiEmulator > l1pualgo_
void addHadCalo(const l1t::PFCluster &t, l1t::PFClusterRef ref)
std::unique_ptr< std::vector< unsigned > > vecRegInput(InputType i) const
RegionizerDecodedInputs decoded
std::unique_ptr< l1t::PFCandidateCollection > fetchEmCalo() const
std::unique_ptr< l1t::PFCandidateCollection > fetchPF() const
std::unique_ptr< std::vector< unsigned > > vecOutput(OutputType i, bool usePuppi) const
std::unique_ptr< l1ct::PFTkEGSorterEmulator > l1tkegsorter_
double b
Definition: hdecay.h:120
static constexpr const char * objTypeName[nObjTypes]
double z0() const
Definition: VertexWord.h:158
double a
Definition: hdecay.h:121
std::pair< unsigned int, unsigned int > totAndMax(const std::vector< unsigned > &perRegion) const
void putEgStaObjects(edm::Event &iEvent, const std::string &egLablel) const
std::vector< ap_uint< 64 > > pvs_emu
vtxword_t vertexWord() const
Definition: VertexWord.h:143
def move(src, dest)
Definition: eostools.py:511
void clear()
Definition: Common.h:9
std::unique_ptr< std::vector< unsigned > > vecSecInput(InputType i) const
void addUInt(unsigned int value, std::string iLabel, edm::Event &iEvent)
std::vector< PFInputRegion > pfinputs
std::vector< OutputBoard > board_out

◆ putEgObjects()

void L1TCorrelatorLayer1Producer::putEgObjects ( edm::Event iEvent,
const bool  writeEgSta,
const std::string &  tkEmLabel,
const std::string &  tkEmPerBoardLabel,
const std::string &  tkEleLabel,
const std::string &  tkElePerBoardLabel 
) const
private

Definition at line 1130 of file L1TCorrelatorLayer1Producer.cc.

References l1ct::Event::board_out, l1t::TkEm::CT, event_, iEvent, eostools::move(), edm::refToPtr(), and l1t::L1Candidate::setHwQual().

Referenced by produce().

1135  {
1136  auto tkems = std::make_unique<l1t::TkEmCollection>();
1137  auto tkemRefProd = iEvent.getRefBeforePut<l1t::TkEmCollection>(tkEmLabel);
1138  auto tkemPerBoard = std::make_unique<l1t::TkEmRegionalOutput>(tkemRefProd);
1139  auto tkeles = std::make_unique<l1t::TkElectronCollection>();
1140  auto tkeleRefProd = iEvent.getRefBeforePut<l1t::TkElectronCollection>(tkEleLabel);
1141  auto tkelePerBoard = std::make_unique<l1t::TkElectronRegionalOutput>(tkeleRefProd);
1142 
1143  // TkEG objects are written out after the per-board sorting.
1144  // The mapping to each board is saved into the regionalmap for further (stage-2 consumption)
1145  std::vector<int> nele_obj;
1146  std::vector<int> npho_obj;
1147 
1148  for (const auto &board : event_.board_out) {
1149  npho_obj.clear();
1150  for (const auto &egiso : board.egphoton) {
1151  if (egiso.hwPt == 0)
1152  continue;
1153 
1154  reco::Candidate::PolarLorentzVector mom(egiso.floatPt(), egiso.floatEta(), egiso.floatPhi(), 0.);
1155 
1157  egiso.srcCluster->constituentsAndFractions()[0].first,
1158  egiso.floatRelIso(l1ct::EGIsoObjEmu::IsoType::TkIso),
1159  egiso.floatRelIso(l1ct::EGIsoObjEmu::IsoType::TkIsoPV));
1160  tkem.setHwQual(egiso.hwQual);
1161  tkem.setPFIsol(egiso.floatRelIso(l1ct::EGIsoObjEmu::IsoType::PfIso));
1162  tkem.setPFIsolPV(egiso.floatRelIso(l1ct::EGIsoObjEmu::IsoType::PfIsoPV));
1163  tkem.setEgBinaryWord(egiso.pack(), l1t::TkEm::HWEncoding::CT);
1164  tkems->push_back(tkem);
1165  npho_obj.push_back(tkems->size() - 1);
1166  }
1167  tkemPerBoard->addRegion(npho_obj, board.eta, board.phi);
1168 
1169  nele_obj.clear();
1170  for (const auto &egele : board.egelectron) {
1171  if (egele.hwPt == 0)
1172  continue;
1173 
1174  reco::Candidate::PolarLorentzVector mom(egele.floatPt(), egele.floatVtxEta(), egele.floatVtxPhi(), 0.);
1175 
1177  egele.srcCluster->constituentsAndFractions()[0].first,
1178  edm::refToPtr(egele.srcTrack->track()),
1179  egele.floatRelIso(l1ct::EGIsoEleObjEmu::IsoType::TkIso));
1180  tkele.setHwQual(egele.hwQual);
1181  tkele.setPFIsol(egele.floatRelIso(l1ct::EGIsoEleObjEmu::IsoType::PfIso));
1182  tkele.setEgBinaryWord(egele.pack(), l1t::TkElectron::HWEncoding::CT);
1183  tkele.setIdScore(egele.floatIDScore());
1184  tkele.setCharge(egele.intCharge());
1185  tkele.setTrkzVtx(egele.floatZ0());
1186  tkeles->push_back(tkele);
1187  nele_obj.push_back(tkeles->size() - 1);
1188  }
1189  tkelePerBoard->addRegion(nele_obj, board.eta, board.phi);
1190  }
1191 
1192  iEvent.put(std::move(tkems), tkEmLabel);
1193  iEvent.put(std::move(tkemPerBoard), tkEmPerBoardLabel);
1194  iEvent.put(std::move(tkeles), tkEleLabel);
1195  iEvent.put(std::move(tkelePerBoard), tkElePerBoardLabel);
1196 }
std::vector< TkElectron > TkElectronCollection
Definition: TkElectronFwd.h:16
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
Definition: RefToPtr.h:18
void setHwQual(int qual)
Definition: L1Candidate.h:31
std::vector< TkEm > TkEmCollection
Definition: TkEmFwd.h:17
int iEvent
Definition: GenABIO.cc:224
Definition: TkEm.h:23
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
def move(src, dest)
Definition: eostools.py:511
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
std::vector< OutputBoard > board_out

◆ putEgStaObjects()

void L1TCorrelatorLayer1Producer::putEgStaObjects ( edm::Event iEvent,
const std::string &  egLablel 
) const
private

Definition at line 1108 of file L1TCorrelatorLayer1Producer.cc.

References event_, iEvent, eostools::move(), EgHLTOffHistBins_cfi::nr, l1ct::Event::out, AlCaHLTBitMon_ParallelJobs::p, l1ct::Event::pfinputs, and l1t::L1Candidate::setHwQual().

Referenced by produce().

1108  {
1109  auto egs = std::make_unique<BXVector<l1t::EGamma>>();
1110  // FIXME: in case more BXes are introduced shuld probably use egs->key(egs->end(bx));
1111 
1112  for (unsigned int ir = 0, nr = event_.pfinputs.size(); ir < nr; ++ir) {
1113  const auto &reg = event_.pfinputs[ir].region;
1114 
1115  // EG standalone objects
1116  for (unsigned int ieg = 0, neg = event_.out[ir].egsta.size(); ieg < neg; ++ieg) {
1117  const auto &p = event_.out[ir].egsta[ieg];
1118  if (p.hwPt == 0 || !reg.isFiducial(p))
1119  continue;
1120  l1t::EGamma eg(
1121  reco::Candidate::PolarLorentzVector(p.floatPt(), reg.floatGlbEta(p.hwEta), reg.floatGlbPhi(p.hwPhi), 0.));
1122  eg.setHwQual(p.hwQual);
1123  egs->push_back(0, eg);
1124  }
1125  }
1126 
1127  iEvent.put(std::move(egs), egLablel);
1128 }
void setHwQual(int qual)
Definition: L1Candidate.h:31
std::vector< OutputRegion > out
int iEvent
Definition: GenABIO.cc:224
def move(src, dest)
Definition: eostools.py:511
std::vector< PFInputRegion > pfinputs
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38

◆ putPuppi()

void L1TCorrelatorLayer1Producer::putPuppi ( edm::Event iEvent) const
private

Definition at line 1060 of file L1TCorrelatorLayer1Producer.cc.

References l1t::PFCandidate::ChargedHadron, l1t::PFCandidate::Electron, event_, iEvent, EgHLTOffHistBins_cfi::mass, eostools::move(), l1t::PFCandidate::Muon, l1t::PFCandidate::NeutralHadron, EgHLTOffHistBins_cfi::nr, l1ct::Event::out, AlCaHLTBitMon_ParallelJobs::p, l1ct::Event::pfinputs, l1t::PFCandidate::Photon, and setRefs_().

Referenced by produce().

1060  {
1061  auto refprod = iEvent.getRefBeforePut<l1t::PFCandidateCollection>("Puppi");
1062  auto coll = std::make_unique<l1t::PFCandidateCollection>();
1063  auto reg = std::make_unique<l1t::PFCandidateRegionalOutput>(refprod);
1064  std::vector<int> nobj;
1065  for (unsigned int ir = 0, nr = event_.pfinputs.size(); ir < nr; ++ir) {
1066  nobj.clear();
1067  for (const auto &p : event_.out[ir].puppi) {
1068  if (p.hwPt == 0)
1069  continue;
1070  // note: Puppi candidates are already in global coordinates & fiducial-only!
1072  float mass = 0.13f;
1073  if (p.hwId.charged()) {
1074  if (p.hwId.isMuon()) {
1076  mass = 0.105;
1077  } else if (p.hwId.isElectron()) {
1079  mass = 0.005;
1080  } else
1082  } else {
1084  mass = p.hwId.isPhoton() ? 0.0 : 0.5;
1085  }
1086  reco::Particle::PolarLorentzVector p4(p.floatPt(), p.floatEta(), p.floatPhi(), mass);
1087  coll->emplace_back(type, p.intCharge(), p4, p.floatPuppiW(), p.intPt(), p.intEta(), p.intPhi());
1088  if (p.hwId.charged()) {
1089  coll->back().setZ0(p.floatZ0());
1090  coll->back().setDxy(p.floatDxy());
1091  coll->back().setHwZ0(p.hwZ0());
1092  coll->back().setHwDxy(p.hwDxy());
1093  coll->back().setHwTkQuality(p.hwTkQuality());
1094  } else {
1095  coll->back().setHwPuppiWeight(p.hwPuppiW());
1096  coll->back().setHwEmID(p.hwEmID());
1097  }
1098  coll->back().setEncodedPuppi64(p.pack().to_uint64());
1099  setRefs_(coll->back(), p);
1100  nobj.push_back(coll->size() - 1);
1101  }
1102  reg->addRegion(nobj, event_.pfinputs[ir].region.floatEtaCenter(), event_.pfinputs[ir].region.floatPhiCenter());
1103  }
1104  iEvent.put(std::move(coll), "Puppi");
1105  iEvent.put(std::move(reg), "PuppiRegional");
1106 }
void setRefs_(l1t::PFCandidate &pf, const T &p) const
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition: PFCandidate.h:86
std::vector< OutputRegion > out
int iEvent
Definition: GenABIO.cc:224
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
def move(src, dest)
Definition: eostools.py:511
std::vector< PFInputRegion > pfinputs

◆ rawHgcalClusterEncode()

template<class T >
void L1TCorrelatorLayer1Producer::rawHgcalClusterEncode ( ap_uint< 256 > &  cwrd,
const l1ct::DetectorSector< T > &  sec,
const l1t::PFCluster c 
) const
inlineprivate

Definition at line 122 of file L1TCorrelatorLayer1Producer.cc.

References DummyCfis::c, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), l1ct::Scales::ETAPHI_LSB, M_PI, fileinputsource_cfi::sec, l1ct::Scales::SRRTOT_LSB, and l1ct::Scales::SRRTOT_SCALE.

Referenced by addDecodedHadCalo(), and addRawHgcalCluster().

122  {
123  cwrd = 0;
124  ap_ufixed<14, 12, AP_RND_CONV, AP_SAT> w_pt = c.pt();
125  ap_uint<14> w_empt = round(c.emEt() / 0.25);
126  constexpr float ETAPHI_LSB = M_PI / 720;
127  ap_int<9> w_eta = round(sec.region.localEta(c.eta()) / ETAPHI_LSB);
128  ap_int<9> w_phi = round(sec.region.localPhi(c.phi()) / ETAPHI_LSB);
129  ap_uint<10> w_qual = c.hwQual();
130  // NOTE: this is an arbitrary choice to keep the rounding consistent with the "addDecodedHadCalo" one
131  ap_uint<13> w_srrtot = round(c.sigmaRR() * l1ct::Scales::SRRTOT_SCALE / l1ct::Scales::SRRTOT_LSB);
132  ap_uint<12> w_meanz = round(c.absZBarycenter());
133  // NOTE: the calibration can actually make hoe become negative....we add a small protection for now
134  // We use ap_ufixed to handle saturation and rounding
135  ap_ufixed<10, 5, AP_RND_CONV, AP_SAT> w_hoe = c.hOverE();
136 
137  cwrd(13, 0) = w_pt.range();
138  cwrd(27, 14) = w_empt;
139  cwrd(72, 64) = w_eta;
140  cwrd(81, 73) = w_phi;
141  cwrd(115, 106) = w_qual;
142 
143  // FIXME: we add the variables use by composite-ID. The definitin will have to be reviewd once the
144  // hgc format is better defined. For now we use
145  // hwMeanZ = word 1 bits 30-19
146  // hwSrrTot = word 3 bits 21 - 9
147  // hoe = word 1 bits 63-52 (currently spare in the interface)
148  cwrd(213, 201) = w_srrtot;
149  cwrd(94, 83) = w_meanz;
150  cwrd(127, 116) = w_hoe.range();
151  }
constexpr float SRRTOT_LSB
Definition: datatypes.h:150
constexpr float ETAPHI_LSB
Definition: datatypes.h:145
#define M_PI
constexpr unsigned int SRRTOT_SCALE
Definition: datatypes.h:151

◆ setRefs_()

template<typename T >
void L1TCorrelatorLayer1Producer::setRefs_ ( l1t::PFCandidate pf,
const T p 
) const
private

Definition at line 863 of file L1TCorrelatorLayer1Producer.cc.

References clusterRefMap_, Exception, match(), muonRefMap_, AlCaHLTBitMon_ParallelJobs::p, packedPFCandidateRefMixer_cfi::pf, and trackRefMap_.

Referenced by fetchEmCalo(), fetchHadCalo(), fetchPF(), fetchTracks(), and putPuppi().

863  {
864  if (p.srcCluster) {
865  auto match = clusterRefMap_.find(p.srcCluster);
866  if (match == clusterRefMap_.end()) {
867  throw cms::Exception("CorruptData") << "Invalid cluster pointer in PF candidate id " << p.intId() << " pt "
868  << p.floatPt() << " eta " << p.floatEta() << " phi " << p.floatPhi();
869  }
870  pf.setPFCluster(match->second);
871  }
872  if (p.srcTrack) {
873  auto match = trackRefMap_.find(p.srcTrack);
874  if (match == trackRefMap_.end()) {
875  throw cms::Exception("CorruptData") << "Invalid track pointer in PF candidate id " << p.intId() << " pt "
876  << p.floatPt() << " eta " << p.floatEta() << " phi " << p.floatPhi();
877  }
878  pf.setPFTrack(match->second);
879  }
880  if (p.srcMu) {
881  auto match = muonRefMap_.find(p.srcMu);
882  if (match == muonRefMap_.end()) {
883  throw cms::Exception("CorruptData") << "Invalid muon pointer in PF candidate id " << p.intId() << " pt "
884  << p.floatPt() << " eta " << p.floatEta() << " phi " << p.floatPhi();
885  }
886  pf.setMuon(match->second);
887  }
888 }
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackRef > trackRefMap_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::unordered_map< const l1t::SAMuon *, l1t::PFCandidate::MuonRef > muonRefMap_
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_

◆ totAndMax()

std::pair< unsigned int, unsigned int > L1TCorrelatorLayer1Producer::totAndMax ( const std::vector< unsigned > &  perRegion) const
private

Definition at line 1250 of file L1TCorrelatorLayer1Producer.cc.

References SiStripPI::max, and ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::ntot.

Referenced by produce().

1251  {
1252  unsigned int ntot = 0, nmax = 0;
1253  for (unsigned ni : perRegion) {
1254  ntot += ni;
1255  nmax = std::max(nmax, ni);
1256  }
1257  return std::make_pair(ntot, nmax);
1258 }

◆ vecOutput()

std::unique_ptr< std::vector< unsigned > > L1TCorrelatorLayer1Producer::vecOutput ( OutputType  i,
bool  usePuppi 
) const
private

Definition at line 1243 of file L1TCorrelatorLayer1Producer.cc.

References event_, mps_fire::i, l1ct::Event::out, and findQualityFiles::v.

Referenced by produce().

1243  {
1244  auto v = std::make_unique<std::vector<unsigned>>();
1245  for (const auto &reg : event_.out) {
1246  v->push_back(reg.nObj(i, usePuppi));
1247  }
1248  return v;
1249 }
std::vector< OutputRegion > out

◆ vecRegInput()

std::unique_ptr< std::vector< unsigned > > L1TCorrelatorLayer1Producer::vecRegInput ( InputType  i) const
private

Definition at line 1222 of file L1TCorrelatorLayer1Producer.cc.

References caloType, emcaloType, event_, l1muType, l1ct::Event::pfinputs, submitPVValidationJobs::t, trackType, and findQualityFiles::v.

Referenced by produce().

1222  {
1223  auto v = std::make_unique<std::vector<unsigned>>();
1224  for (const auto &reg : event_.pfinputs) {
1225  switch (t) {
1226  case caloType:
1227  v->push_back(reg.hadcalo.size());
1228  break;
1229  case emcaloType:
1230  v->push_back(reg.emcalo.size());
1231  break;
1232  case trackType:
1233  v->push_back(reg.track.size());
1234  break;
1235  case l1muType:
1236  v->push_back(reg.muon.size());
1237  break;
1238  }
1239  }
1240  return v;
1241 }
std::vector< PFInputRegion > pfinputs

◆ vecSecInput()

std::unique_ptr< std::vector< unsigned > > L1TCorrelatorLayer1Producer::vecSecInput ( InputType  i) const
private

Definition at line 1198 of file L1TCorrelatorLayer1Producer.cc.

References caloType, l1ct::Event::decoded, l1ct::RegionizerDecodedInputs::emcalo, emcaloType, event_, l1ct::RegionizerDecodedInputs::hadcalo, l1muType, l1ct::RegionizerDecodedInputs::muon, alignCSCRings::s, submitPVValidationJobs::t, l1ct::RegionizerDecodedInputs::track, trackType, and findQualityFiles::v.

Referenced by produce().

1198  {
1199  auto v = std::make_unique<std::vector<unsigned>>();
1200  {
1201  switch (t) {
1202  case caloType:
1203  for (const auto &s : event_.decoded.hadcalo)
1204  v->push_back(s.size());
1205  break;
1206  case emcaloType:
1207  for (const auto &s : event_.decoded.emcalo)
1208  v->push_back(s.size());
1209  break;
1210  case trackType:
1211  for (const auto &s : event_.decoded.track)
1212  v->push_back(s.size());
1213  break;
1214  case l1muType:
1215  v->push_back(event_.decoded.muon.size());
1216  break;
1217  }
1218  }
1219  return v;
1220 }
std::vector< DetectorSector< HadCaloObjEmu > > hadcalo
RegionizerDecodedInputs decoded
std::vector< DetectorSector< EmCaloObjEmu > > emcalo
DetectorSector< MuObjEmu > muon
std::vector< DetectorSector< TkObjEmu > > track

Member Data Documentation

◆ clusterRefMap_

std::unordered_map<const l1t::PFCluster *, l1t::PFClusterRef> L1TCorrelatorLayer1Producer::clusterRefMap_
private

Definition at line 96 of file L1TCorrelatorLayer1Producer.cc.

Referenced by addEmCalo(), addHadCalo(), initEvent(), and setRefs_().

◆ config_

edm::ParameterSet L1TCorrelatorLayer1Producer::config_
private

Definition at line 58 of file L1TCorrelatorLayer1Producer.cc.

◆ debugEta_

float L1TCorrelatorLayer1Producer::debugEta_
private

Definition at line 93 of file L1TCorrelatorLayer1Producer.cc.

Referenced by produce().

◆ debugPhi_

float L1TCorrelatorLayer1Producer::debugPhi_
private

Definition at line 93 of file L1TCorrelatorLayer1Producer.cc.

Referenced by produce().

◆ debugR_

float L1TCorrelatorLayer1Producer::debugR_
private

Definition at line 93 of file L1TCorrelatorLayer1Producer.cc.

Referenced by produce().

◆ emCands_

std::vector<edm::EDGetTokenT<l1t::PFClusterCollection> > L1TCorrelatorLayer1Producer::emCands_
private

Definition at line 70 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ emPtCut_

float L1TCorrelatorLayer1Producer::emPtCut_
private

Definition at line 73 of file L1TCorrelatorLayer1Producer.cc.

Referenced by produce().

◆ emuTkVtx_

bool L1TCorrelatorLayer1Producer::emuTkVtx_
private

Definition at line 63 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ event_

l1ct::Event L1TCorrelatorLayer1Producer::event_
private

◆ extTkVtx_

edm::EDGetTokenT<std::vector<l1t::Vertex> > L1TCorrelatorLayer1Producer::extTkVtx_
private

Definition at line 64 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ fRegionDump_

std::fstream L1TCorrelatorLayer1Producer::fRegionDump_
private

Definition at line 88 of file L1TCorrelatorLayer1Producer.cc.

Referenced by beginStream(), and produce().

◆ hadCands_

std::vector<edm::EDGetTokenT<l1t::PFClusterCollection> > L1TCorrelatorLayer1Producer::hadCands_
private

Definition at line 71 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ hadPtCut_

float L1TCorrelatorLayer1Producer::hadPtCut_
private

Definition at line 73 of file L1TCorrelatorLayer1Producer.cc.

Referenced by produce().

◆ hasTracks_

bool L1TCorrelatorLayer1Producer::hasTracks_
private

Definition at line 60 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ hgcalInput_

std::unique_ptr<l1ct::HgcalClusterDecoderEmulator> L1TCorrelatorLayer1Producer::hgcalInput_
private

◆ inputTypeName

constexpr const char* L1TCorrelatorLayer1Producer::inputTypeName[l1muType+1] = {"Calo", "EmCalo", "TK", "Mu"}
staticprivate

Definition at line 175 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ l1pfalgo_

std::unique_ptr<l1ct::PFAlgoEmulatorBase> L1TCorrelatorLayer1Producer::l1pfalgo_
private

Definition at line 80 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ l1pualgo_

std::unique_ptr<l1ct::LinPuppiEmulator> L1TCorrelatorLayer1Producer::l1pualgo_
private

Definition at line 81 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ l1tkegalgo_

std::unique_ptr<l1ct::PFTkEGAlgoEmulator> L1TCorrelatorLayer1Producer::l1tkegalgo_
private

Definition at line 82 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ l1tkegsorter_

std::unique_ptr<l1ct::PFTkEGSorterEmulator> L1TCorrelatorLayer1Producer::l1tkegsorter_
private

Definition at line 83 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ muCands_

edm::EDGetTokenT<l1t::SAMuonCollection> L1TCorrelatorLayer1Producer::muCands_
private

Definition at line 68 of file L1TCorrelatorLayer1Producer.cc.

Referenced by produce().

◆ muonInput_

std::unique_ptr<l1ct::GMTMuonDecoderEmulator> L1TCorrelatorLayer1Producer::muonInput_
private

Definition at line 77 of file L1TCorrelatorLayer1Producer.cc.

Referenced by addDecodedMuon(), and L1TCorrelatorLayer1Producer().

◆ muonRefMap_

std::unordered_map<const l1t::SAMuon *, l1t::PFCandidate::MuonRef> L1TCorrelatorLayer1Producer::muonRefMap_
private

Definition at line 98 of file L1TCorrelatorLayer1Producer.cc.

Referenced by addMuon(), initEvent(), and setRefs_().

◆ nVtx_

int L1TCorrelatorLayer1Producer::nVtx_
private

Definition at line 66 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ patternWriterConfigs_

const edm::VParameterSet L1TCorrelatorLayer1Producer::patternWriterConfigs_
private

Definition at line 89 of file L1TCorrelatorLayer1Producer.cc.

Referenced by beginStream().

◆ patternWriters_

std::vector<std::unique_ptr<L1TCorrelatorLayer1PatternFileWriter> > L1TCorrelatorLayer1Producer::patternWriters_
private

Definition at line 90 of file L1TCorrelatorLayer1Producer.cc.

Referenced by beginStream(), endStream(), and produce().

◆ regionDumpName_

const std::string L1TCorrelatorLayer1Producer::regionDumpName_
private

Definition at line 86 of file L1TCorrelatorLayer1Producer.cc.

Referenced by beginStream().

◆ regionizer_

std::unique_ptr<l1ct::RegionizerEmulator> L1TCorrelatorLayer1Producer::regionizer_
private

Definition at line 79 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ tkCands_

edm::EDGetTokenT<l1t::PFTrackCollection> L1TCorrelatorLayer1Producer::tkCands_
private

Definition at line 61 of file L1TCorrelatorLayer1Producer.cc.

Referenced by produce().

◆ tkVtxEmu_

edm::EDGetTokenT<std::vector<l1t::VertexWord> > L1TCorrelatorLayer1Producer::tkVtxEmu_
private

Definition at line 65 of file L1TCorrelatorLayer1Producer.cc.

Referenced by L1TCorrelatorLayer1Producer(), and produce().

◆ trackInput_

std::unique_ptr<l1ct::TrackInputEmulator> L1TCorrelatorLayer1Producer::trackInput_
private

Definition at line 76 of file L1TCorrelatorLayer1Producer.cc.

Referenced by addDecodedTrack(), and L1TCorrelatorLayer1Producer().

◆ trackRefMap_

std::unordered_map<const l1t::PFTrack *, l1t::PFTrackRef> L1TCorrelatorLayer1Producer::trackRefMap_
private

Definition at line 97 of file L1TCorrelatorLayer1Producer.cc.

Referenced by addTrack(), initEvent(), and setRefs_().

◆ trkPt_

float L1TCorrelatorLayer1Producer::trkPt_
private

Definition at line 62 of file L1TCorrelatorLayer1Producer.cc.

Referenced by produce().

◆ writeRawHgcalCluster_

bool L1TCorrelatorLayer1Producer::writeRawHgcalCluster_
private

Definition at line 87 of file L1TCorrelatorLayer1Producer.cc.

Referenced by addHadCalo().