13 #include "Math/GenVector/VectorUtil.h"
21 : mBX(p.getParameter<int>(
"BX")),
22 mVerbose(p.getUntrackedParameter<int>(
"verbose", 0)),
24 mCone(p.getParameter<double>(
"UseTowersInCone")),
26 mEtThreshold(p.getParameter<double>(
"minimumEt")),
27 mEThreshold(p.getParameter<double>(
"minimumE")),
28 mTauId(p.getParameter<int>(
"TauId")) {
29 produces<CaloTowerCollection>();
43 cands->reserve(caloTowers->size());
47 for (
auto myL1Jet = jetsgen->begin(
mBX); myL1Jet != jetsgen->end(
mBX); myL1Jet++) {
51 for (; idx < caloTowers->size(); idx++) {
52 const CaloTower* cal = &((*caloTowers)[idx]);
53 bool isAccepted =
false;
55 edm::LogInfo(
"JetDebugInfo") <<
"CaloTowerFromL1TCreatorForTauHLT::produce-> " << idx
56 <<
" tower et/eta/phi/e: " << cal->
et() <<
'/' << cal->
eta() <<
'/'
57 << cal->
phi() <<
'/' << cal->
energy() <<
" is...";
65 cands->push_back(*cal);
79 edm::LogWarning(
"MissingProduct") <<
"L1Upgrade jet bx collection not found." << std::endl;
90 aDesc.
add<
int>(
"TauId", 0)->setComment(
"Item from L1 Tau collection used for seeding. From 0 to 11");
91 aDesc.
add<
double>(
"UseTowersInCone", 0.8)->
setComment(
"Radius of cone around seed");
92 aDesc.
add<
double>(
"minimumE", 0.8)->
setComment(
"Minimum tower energy");
93 aDesc.
add<
double>(
"minimumEt", 0.5)->
setComment(
"Minimum tower ET");
94 aDesc.
add<
int>(
"BX", 0)->setComment(
"Set bunch crossing; 0 = in time, -1 = previous, 1 = following");
95 aDesc.
addUntracked<
int>(
"verbose", 0)->setComment(
"Verbosity level; 0=silent");
97 desc.
add(
"CaloTowerFromL1TCreatorForTauHLT", aDesc);
98 desc.
setComment(
"Produce tower collection around L1 particle seed.");
void setComment(std::string const &value)
void produce(edm::StreamID sid, edm::Event &evt, const edm::EventSetup &stp) const override
process one event
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
BXVector< Tau > TauBxCollection
const int mVerbose
verbosity
const edm::EDGetTokenT< l1t::TauBxCollection > mTauTrigger_token
label of tau trigger type analysis
~CaloTowerFromL1TCreatorForTauHLT() override
destructor
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const int mBX
bunch crossing
const double mEtThreshold
imitator of L1 seeds
Log< level::Info, false > LogInfo
void setComment(std::string const &value)
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
CaloTowerFromL1TCreatorForTauHLT(const edm::ParameterSet &)
constructor from parameter set
mVerbose(fConfig.getUntrackedParameter< bool >("verbose", false))
static void fillDescriptions(edm::ConfigurationDescriptions &desc)
double et(double vtxZ) const
const double mEThreshold
E threshold.
Log< level::Warning, false > LogWarning
const edm::EDGetTokenT< CaloTowerCollection > mtowers_token
label of source collection
double phi() const final
momentum azimuthal angle
const double mCone
use only towers in cone mCone around L1 candidate for regional jet reco
double energy() const final
energy
double eta() const final
momentum pseudorapidity