CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
VirtualJetProducer Class Referenceabstract

#include <VirtualJetProducer.h>

Inheritance diagram for VirtualJetProducer:
edm::stream::EDProducer<> cms::CompoundJetProducer cms::CSJetProducer cms::SubEventGenJetProducer CMSInsideOutJetProducer FastjetJetProducer SubjetFilterJetProducer cms::SubJetProducer cms::CATopJetProducer cms::HTTTopJetProducer

Classes

struct  JetType
 

Public Types

typedef std::shared_ptr< fastjet::GhostedAreaSpec > ActiveAreaSpecPtr
 
typedef std::shared_ptr< fastjet::AreaDefinition > AreaDefinitionPtr
 
typedef std::shared_ptr< fastjet::ClusterSequence > ClusterSequencePtr
 
typedef std::shared_ptr< fastjet::JetDefinition > JetDefPtr
 
typedef std::shared_ptr< fastjet::JetDefinition::Plugin > PluginPtr
 
typedef std::shared_ptr< fastjet::Selector > SelectorPtr
 
- 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
 

Public Member Functions

std::string jetType () const
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 VirtualJetProducer (const edm::ParameterSet &iConfig)
 
 ~VirtualJetProducer () 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)
 
static void fillDescriptionsFromVirtualJetProducer (edm::ParameterSetDescription &desc)
 

Protected Member Functions

virtual void addHTTTopJetTagInfoCollection (edm::Event &iEvent, const edm::EventSetup &iSetup, edm::OrphanHandle< reco::BasicJetCollection > &oh)
 
virtual void copyConstituents (const std::vector< fastjet::PseudoJet > &fjConstituents, reco::Jet *jet)
 
virtual std::vector< reco::CandidatePtrgetConstituents (const std::vector< fastjet::PseudoJet > &fjConstituents)
 
CaloGeometry const & getGeometry (edm::EventSetup const &) const
 
HcalTopology const & getTopology (edm::EventSetup const &) const
 
virtual void inputTowers ()
 
virtual bool isAnomalousTower (reco::CandidatePtr input)
 
bool makeBasicJet (const JetType::Type &fTag)
 
bool makeCaloJet (const JetType::Type &fTag)
 
bool makeGenJet (const JetType::Type &fTag)
 
bool makePFClusterJet (const JetType::Type &fTag)
 
bool makePFJet (const JetType::Type &fTag)
 
virtual void makeProduces (std::string s, std::string tag="")
 
bool makeTrackJet (const JetType::Type &fTag)
 
void offsetCorrectJets (std::vector< fastjet::PseudoJet > &orphanInput)
 
virtual void output (edm::Event &iEvent, edm::EventSetup const &iSetup)
 
virtual void runAlgorithm (edm::Event &iEvent, const edm::EventSetup &iSetup)=0
 
template<typename T >
void writeCompoundJets (edm::Event &iEvent, edm::EventSetup const &iSetup)
 function template to write out the outputs More...
 
template<typename T >
void writeJets (edm::Event &iEvent, edm::EventSetup const &iSetup)
 
template<typename T >
void writeJetsWithConstituents (edm::Event &iEvent, edm::EventSetup const &iSetup)
 function template to write out the outputs More...
 

Protected Attributes

int activeAreaRepeats_
 
bool applyWeight_
 
bool doAreaDiskApprox_
 
bool doAreaFastjet_
 
bool doFastJetNonUniform_
 
bool doPUOffsetCorr_
 
bool doPVCorrection_
 
bool doRhoFastjet_
 
ActiveAreaSpecPtr fjActiveArea_
 
AreaDefinitionPtr fjAreaDefinition_
 
ClusterSequencePtr fjClusterSeq_
 
std::vector< fastjet::PseudoJet > fjInputs_
 
JetDefPtr fjJetDefinition_
 
std::vector< fastjet::PseudoJet > fjJets_
 
PluginPtr fjPlugin_
 
SelectorPtr fjSelector_
 
bool fromHTTTopJetProducer_ = false
 
double ghostArea_
 
double ghostEtaMax_
 
edm::EDGetTokenT< reco::VertexCollectioninput_vertex_token_
 
edm::EDGetTokenT< edm::ValueMap< float > > input_weights_token_
 
double inputEMin_
 
double inputEtMin_
 
std::vector< edm::Ptr< reco::Candidate > > inputs_
 
std::string jetAlgorithm_
 
std::string jetCollInstanceName_
 
double jetPtMin_
 
std::string jetType_
 
JetType::Type jetTypeE
 
unsigned int maxInputs_
 
unsigned int minSeed_
 
std::string moduleLabel_
 
unsigned int nExclude_
 
std::vector< double > puCenters_
 
std::string puSubtractorName_
 
double puWidth_
 
bool restrictInputs_
 
double rhoEtaMax_
 
double rParam_
 
edm::InputTag src_
 
edm::InputTag srcPVs_
 
std::shared_ptr< PileUpSubtractorsubtractor_
 
bool useDeterministicSeed_
 
bool useExplicitGhosts_
 
int verbosity_
 
reco::Particle::Point vertex_
 
double voronoiRfact_
 
edm::ValueMap< float > weights_
 
bool writeCompound_
 
bool writeJetsWithConst_
 

Private Attributes

std::unique_ptr< AnomalousToweranomalousTowerDef_
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeometry_token_
 
edm::EDGetTokenT< std::vector< edm::FwdPtr< reco::PFCandidate > > > input_candidatefwdptr_token_
 
edm::EDGetTokenT< reco::CandidateViewinput_candidateview_token_
 
edm::EDGetTokenT< std::vector< edm::FwdPtr< reco::GenParticle > > > input_gencandidatefwdptr_token_
 
edm::EDGetTokenT< std::vector< edm::FwdPtr< pat::PackedCandidate > > > input_packedcandidatefwdptr_token_
 
edm::EDGetTokenT< std::vector< edm::FwdPtr< pat::PackedGenParticle > > > input_packedgencandidatefwdptr_token_
 
edm::ESGetToken< HcalTopology, HcalRecNumberingRecordtopology_token_
 

Detailed Description

Definition at line 38 of file VirtualJetProducer.h.

Member Typedef Documentation

◆ ActiveAreaSpecPtr

typedef std::shared_ptr<fastjet::GhostedAreaSpec> VirtualJetProducer::ActiveAreaSpecPtr

Definition at line 79 of file VirtualJetProducer.h.

◆ AreaDefinitionPtr

typedef std::shared_ptr<fastjet::AreaDefinition> VirtualJetProducer::AreaDefinitionPtr

Definition at line 80 of file VirtualJetProducer.h.

◆ ClusterSequencePtr

typedef std::shared_ptr<fastjet::ClusterSequence> VirtualJetProducer::ClusterSequencePtr

Definition at line 76 of file VirtualJetProducer.h.

◆ JetDefPtr

typedef std::shared_ptr<fastjet::JetDefinition> VirtualJetProducer::JetDefPtr

Definition at line 78 of file VirtualJetProducer.h.

◆ PluginPtr

typedef std::shared_ptr<fastjet::JetDefinition::Plugin> VirtualJetProducer::PluginPtr

Definition at line 77 of file VirtualJetProducer.h.

◆ SelectorPtr

typedef std::shared_ptr<fastjet::Selector> VirtualJetProducer::SelectorPtr

Definition at line 81 of file VirtualJetProducer.h.

Constructor & Destructor Documentation

◆ VirtualJetProducer()

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

Definition at line 116 of file VirtualJetProducer.cc.

References btagElecInJet_cfi::CaloJet, deDxTools::esConsumes(), Exception, get, edm::ParameterSet::getParameter(), and runBasic_cfi::srcWeights.

116  {
117  moduleLabel_ = iConfig.getParameter<string>("@module_label");
118  src_ = iConfig.getParameter<edm::InputTag>("src");
119  srcPVs_ = iConfig.getParameter<edm::InputTag>("srcPVs");
120  jetType_ = iConfig.getParameter<string>("jetType");
121  jetAlgorithm_ = iConfig.getParameter<string>("jetAlgorithm");
122  rParam_ = iConfig.getParameter<double>("rParam");
123  inputEtMin_ = iConfig.getParameter<double>("inputEtMin");
124  inputEMin_ = iConfig.getParameter<double>("inputEMin");
125  jetPtMin_ = iConfig.getParameter<double>("jetPtMin");
126  doPVCorrection_ = iConfig.getParameter<bool>("doPVCorrection");
127  doAreaFastjet_ = iConfig.getParameter<bool>("doAreaFastjet");
128  doRhoFastjet_ = iConfig.getParameter<bool>("doRhoFastjet");
129  jetCollInstanceName_ = iConfig.getParameter<string>("jetCollInstanceName");
130  doPUOffsetCorr_ = iConfig.getParameter<bool>("doPUOffsetCorr");
131  puSubtractorName_ = iConfig.getParameter<string>("subtractorName");
133  iConfig.getParameter<bool>("useExplicitGhosts"); // use explicit ghosts in the fastjet clustering sequence?
134  doAreaDiskApprox_ = iConfig.getParameter<bool>("doAreaDiskApprox");
135  voronoiRfact_ = iConfig.getParameter<double>(
136  "voronoiRfact"); // Voronoi-based area calculation allows for an empirical scale factor
137  rhoEtaMax_ = iConfig.getParameter<double>(
138  "Rho_EtaMax"); // do fasjet area / rho calcluation? => accept corresponding parameters
139  ghostEtaMax_ = iConfig.getParameter<double>("Ghost_EtaMax");
140  activeAreaRepeats_ = iConfig.getParameter<int>("Active_Area_Repeats");
141  ghostArea_ = iConfig.getParameter<double>("GhostArea");
142  restrictInputs_ = iConfig.getParameter<bool>("restrictInputs"); // restrict inputs to first "maxInputs" towers?
143  maxInputs_ = iConfig.getParameter<unsigned int>("maxInputs");
144  writeCompound_ = iConfig.getParameter<bool>(
145  "writeCompound"); // Check to see if we are writing compound jets for substructure and jet grooming
146  writeJetsWithConst_ = iConfig.getParameter<bool>("writeJetsWithConst"); //write subtracted jet constituents
147  doFastJetNonUniform_ = iConfig.getParameter<bool>("doFastJetNonUniform");
148  puCenters_ = iConfig.getParameter<vector<double>>("puCenters");
149  puWidth_ = iConfig.getParameter<double>("puWidth");
150  nExclude_ = iConfig.getParameter<unsigned int>("nExclude");
151  useDeterministicSeed_ = iConfig.getParameter<bool>("useDeterministicSeed");
152  minSeed_ = iConfig.getParameter<unsigned int>("minSeed");
153  verbosity_ = iConfig.getParameter<int>("verbosity");
154  applyWeight_ = iConfig.getParameter<bool>("applyWeight");
155  if (applyWeight_) {
156  edm::InputTag srcWeights = iConfig.getParameter<edm::InputTag>("srcWeights");
157  if (srcWeights.label() == src_.label())
158  LogWarning("VirtualJetProducer")
159  << "Particle and weights collection have the same label. You may be applying the same weights twice.\n";
160  if (!srcWeights.label().empty())
162  }
163 
164  anomalousTowerDef_ = std::make_unique<AnomalousTower>(iConfig);
165 
166  input_vertex_token_ = consumes<reco::VertexCollection>(srcPVs_);
167  input_candidateview_token_ = consumes<reco::CandidateView>(src_);
169  consumes<vector<edm::FwdPtr<reco::PFCandidate>>>(iConfig.getParameter<edm::InputTag>("src"));
171  consumes<vector<edm::FwdPtr<pat::PackedCandidate>>>(iConfig.getParameter<edm::InputTag>("src"));
173  consumes<vector<edm::FwdPtr<reco::GenParticle>>>(iConfig.getParameter<edm::InputTag>("src"));
175  consumes<vector<edm::FwdPtr<pat::PackedGenParticle>>>(iConfig.getParameter<edm::InputTag>("src"));
176 
177  //
178  // additional parameters to think about:
179  // - overlap threshold (set to 0.75 for the time being)
180  // - p parameter for generalized kT (set to -2 for the time being)
181  // - fastjet PU subtraction parameters (not yet considered)
182  //
183  if (jetAlgorithm_ == "Kt")
184  fjJetDefinition_ = std::make_shared<fastjet::JetDefinition>(fastjet::kt_algorithm, rParam_);
185 
186  else if (jetAlgorithm_ == "CambridgeAachen")
187  fjJetDefinition_ = std::make_shared<fastjet::JetDefinition>(fastjet::cambridge_algorithm, rParam_);
188 
189  else if (jetAlgorithm_ == "AntiKt")
190  fjJetDefinition_ = std::make_shared<fastjet::JetDefinition>(fastjet::antikt_algorithm, rParam_);
191 
192  else if (jetAlgorithm_ == "GeneralizedKt")
193  fjJetDefinition_ = std::make_shared<fastjet::JetDefinition>(fastjet::genkt_algorithm, rParam_, -2);
194 
195  else if (jetAlgorithm_ == "SISCone") {
196  fjPlugin_ = PluginPtr(new fastjet::SISConePlugin(rParam_, 0.75, 0, 0.0, false, fastjet::SISConePlugin::SM_pttilde));
197  fjJetDefinition_ = std::make_shared<fastjet::JetDefinition>(&*fjPlugin_);
198 
199  } else if (jetAlgorithm_ == "IterativeCone") {
200  fjPlugin_ = PluginPtr(new fastjet::CMSIterativeConePlugin(rParam_, 1.0));
201  fjJetDefinition_ = std::make_shared<fastjet::JetDefinition>(&*fjPlugin_);
202 
203  } else if (jetAlgorithm_ == "CDFMidPoint") {
204  fjPlugin_ = PluginPtr(new fastjet::CDFMidPointPlugin(rParam_, 0.75));
205  fjJetDefinition_ = std::make_shared<fastjet::JetDefinition>(&*fjPlugin_);
206 
207  } else if (jetAlgorithm_ == "ATLASCone") {
208  fjPlugin_ = PluginPtr(new fastjet::ATLASConePlugin(rParam_));
209  fjJetDefinition_ = std::make_shared<fastjet::JetDefinition>(&*fjPlugin_);
210 
211  } else {
212  throw cms::Exception("Invalid jetAlgorithm") << "Jet algorithm for VirtualJetProducer is invalid, Abort!\n";
213  }
214 
216 
217  if (JetType::CaloJet == jetTypeE) {
220  }
221 
222  if (doPUOffsetCorr_) {
223  if (puSubtractorName_.empty()) {
224  LogWarning("VirtualJetProducer")
225  << "Pile Up correction on; however, pile up type is not specified. Using default... \n";
226  subtractor_ = std::make_shared<PileUpSubtractor>(iConfig, consumesCollector());
227  } else
228  subtractor_ = std::shared_ptr<PileUpSubtractor>(
229  PileUpSubtractorFactory::get()->create(puSubtractorName_, iConfig, consumesCollector()));
230  }
231 
232  // do approximate disk-based area calculation => warn if conflicting request
234  throw cms::Exception("Conflicting area calculations")
235  << "Both the calculation of jet area via fastjet and via an analytical disk approximation have been requested. "
236  "Please decide on one.\n";
237 
238  if (doAreaFastjet_ || doRhoFastjet_) {
239  if (voronoiRfact_ <= 0) {
240  fjActiveArea_ = std::make_shared<fastjet::GhostedAreaSpec>(ghostEtaMax_, activeAreaRepeats_, ghostArea_);
241 
242  if (!useExplicitGhosts_) {
243  fjAreaDefinition_ = std::make_shared<fastjet::AreaDefinition>(fastjet::active_area, *fjActiveArea_);
244  } else {
246  std::make_shared<fastjet::AreaDefinition>(fastjet::active_area_explicit_ghosts, *fjActiveArea_);
247  }
248  }
249  fjSelector_ = std::make_shared<fastjet::Selector>(fastjet::SelectorAbsRapMax(rhoEtaMax_));
250  }
251 
252  if ((doFastJetNonUniform_) && (puCenters_.empty()))
253  throw cms::Exception("doFastJetNonUniform")
254  << "Parameter puCenters for doFastJetNonUniform is not defined." << std::endl;
255 
256  // make the "produces" statements
258  produces<vector<double>>("rhos");
259  produces<vector<double>>("sigmas");
260  produces<double>("rho");
261  produces<double>("sigma");
262 }
JetType::Type jetTypeE
std::shared_ptr< PileUpSubtractor > subtractor_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< reco::CandidateView > input_candidateview_token_
edm::EDGetTokenT< std::vector< edm::FwdPtr< pat::PackedCandidate > > > input_packedcandidatefwdptr_token_
std::string puSubtractorName_
std::string const & label() const
Definition: InputTag.h:36
std::vector< double > puCenters_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometry_token_
std::string jetCollInstanceName_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topology_token_
virtual void makeProduces(std::string s, std::string tag="")
ActiveAreaSpecPtr fjActiveArea_
edm::EDGetTokenT< edm::ValueMap< float > > input_weights_token_
edm::EDGetTokenT< std::vector< edm::FwdPtr< pat::PackedGenParticle > > > input_packedgencandidatefwdptr_token_
edm::EDGetTokenT< reco::VertexCollection > input_vertex_token_
std::unique_ptr< AnomalousTower > anomalousTowerDef_
edm::EDGetTokenT< std::vector< edm::FwdPtr< reco::GenParticle > > > input_gencandidatefwdptr_token_
edm::EDGetTokenT< std::vector< edm::FwdPtr< reco::PFCandidate > > > input_candidatefwdptr_token_
std::shared_ptr< fastjet::JetDefinition::Plugin > PluginPtr
AreaDefinitionPtr fjAreaDefinition_
#define get
Log< level::Warning, false > LogWarning
static Type byName(const std::string &name)

◆ ~VirtualJetProducer()

VirtualJetProducer::~VirtualJetProducer ( )
override

Definition at line 265 of file VirtualJetProducer.cc.

265 {}

Member Function Documentation

◆ addHTTTopJetTagInfoCollection()

virtual void VirtualJetProducer::addHTTTopJetTagInfoCollection ( edm::Event iEvent,
const edm::EventSetup iSetup,
edm::OrphanHandle< reco::BasicJetCollection > &  oh 
)
inlineprotectedvirtual

Reimplemented in cms::HTTTopJetProducer.

Definition at line 116 of file VirtualJetProducer.h.

118  {};

◆ copyConstituents()

void VirtualJetProducer::copyConstituents ( const std::vector< fastjet::PseudoJet > &  fjConstituents,
reco::Jet jet 
)
protectedvirtual

Definition at line 521 of file VirtualJetProducer.cc.

References mps_fire::i, and metsig::jet.

521  {
522  for (unsigned int i = 0; i < fjConstituents.size(); ++i) {
523  int index = fjConstituents[i].user_index();
524  if (index >= 0 && static_cast<unsigned int>(index) < inputs_.size())
525  jet->addDaughter(inputs_[index]);
526  }
527 }
std::vector< edm::Ptr< reco::Candidate > > inputs_

◆ fillDescriptions()

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

Definition at line 1039 of file VirtualJetProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

1039  {
1042  desc.add<string>("jetCollInstanceName", "");
1043 
1044  // addDefault must be used here instead of add unless
1045  // all the classes that inherit from this class redefine
1046  // the fillDescriptions function. Otherwise, the autogenerated
1047  // cfi filenames are the same and conflict.
1048  descriptions.addDefault(desc);
1049 }
void addDefault(ParameterSetDescription const &psetDescription)
static void fillDescriptionsFromVirtualJetProducer(edm::ParameterSetDescription &desc)

◆ fillDescriptionsFromVirtualJetProducer()

void VirtualJetProducer::fillDescriptionsFromVirtualJetProducer ( edm::ParameterSetDescription desc)
static

Definition at line 1051 of file VirtualJetProducer.cc.

References submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

Referenced by cms::CSJetProducer::fillDescriptions(), FastjetJetProducer::fillDescriptions(), cms::CATopJetProducer::fillDescriptions(), and cms::HTTTopJetProducer::fillDescriptions().

1051  {
1052  desc.add<edm::InputTag>("src", edm::InputTag("particleFlow"));
1053  desc.add<edm::InputTag>("srcPVs", edm::InputTag(""));
1054  desc.add<string>("jetType", "PFJet");
1055  desc.add<string>("jetAlgorithm", "AntiKt");
1056  desc.add<double>("rParam", 0.4);
1057  desc.add<double>("inputEtMin", 0.0);
1058  desc.add<double>("inputEMin", 0.0);
1059  desc.add<double>("jetPtMin", 5.);
1060  desc.add<bool>("doPVCorrection", false);
1061  desc.add<bool>("doAreaFastjet", false);
1062  desc.add<bool>("doRhoFastjet", false);
1063  desc.add<bool>("doPUOffsetCorr", false);
1064  desc.add<double>("puPtMin", 10.);
1065  desc.add<double>("nSigmaPU", 1.0);
1066  desc.add<double>("radiusPU", 0.5);
1067  desc.add<string>("subtractorName", "");
1068  desc.add<bool>("useExplicitGhosts", false);
1069  desc.add<bool>("doAreaDiskApprox", false);
1070  desc.add<double>("voronoiRfact", -0.9);
1071  desc.add<double>("Rho_EtaMax", 4.4);
1072  desc.add<double>("Ghost_EtaMax", 5.);
1073  desc.add<int>("Active_Area_Repeats", 1);
1074  desc.add<double>("GhostArea", 0.01);
1075  desc.add<bool>("restrictInputs", false);
1076  desc.add<unsigned int>("maxInputs", 1);
1077  desc.add<bool>("writeCompound", false);
1078  desc.add<bool>("writeJetsWithConst", false);
1079  desc.add<bool>("doFastJetNonUniform", false);
1080  desc.add<bool>("useDeterministicSeed", false);
1081  desc.add<unsigned int>("minSeed", 14327);
1082  desc.add<int>("verbosity", 0);
1083  desc.add<double>("puWidth", 0.);
1084  desc.add<unsigned int>("nExclude", 0);
1085  desc.add<unsigned int>("maxBadEcalCells", 9999999);
1086  desc.add<unsigned int>("maxBadHcalCells", 9999999);
1087  desc.add<unsigned int>("maxProblematicEcalCells", 9999999);
1088  desc.add<unsigned int>("maxProblematicHcalCells", 9999999);
1089  desc.add<unsigned int>("maxRecoveredEcalCells", 9999999);
1090  desc.add<unsigned int>("maxRecoveredHcalCells", 9999999);
1091  vector<double> puCentersDefault;
1092  desc.add<vector<double>>("puCenters", puCentersDefault);
1093  desc.add<bool>("applyWeight", false);
1094  desc.add<edm::InputTag>("srcWeights", edm::InputTag(""));
1095  desc.add<double>("minimumTowersFraction", 0.);
1096 }

◆ getConstituents()

vector< reco::CandidatePtr > VirtualJetProducer::getConstituents ( const std::vector< fastjet::PseudoJet > &  fjConstituents)
protectedvirtual

Definition at line 530 of file VirtualJetProducer.cc.

References mps_fire::i, and mps_fire::result.

Referenced by FastjetJetProducer::produceTrackJets(), and cms::SubEventGenJetProducer::runAlgorithm().

530  {
531  vector<reco::CandidatePtr> result;
532  result.reserve(fjConstituents.size() / 2);
533  for (unsigned int i = 0; i < fjConstituents.size(); i++) {
534  auto index = fjConstituents[i].user_index();
535  if (index >= 0 && static_cast<unsigned int>(index) < inputs_.size()) {
536  result.emplace_back(inputs_[index]);
537  }
538  }
539  return result;
540 }
std::vector< edm::Ptr< reco::Candidate > > inputs_

◆ getGeometry()

CaloGeometry const & VirtualJetProducer::getGeometry ( edm::EventSetup const &  iSetup) const
protected

Definition at line 1030 of file VirtualJetProducer.cc.

References edm::EventSetup::getData().

Referenced by SubjetFilterJetProducer::writeCompoundJets(), and cms::CompoundJetProducer::writeCompoundJets().

1030  {
1031  return iSetup.getData(geometry_token_);
1032 }
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometry_token_

◆ getTopology()

HcalTopology const & VirtualJetProducer::getTopology ( edm::EventSetup const &  iSetup) const
protected

Definition at line 1034 of file VirtualJetProducer.cc.

References edm::EventSetup::getData().

Referenced by SubjetFilterJetProducer::writeCompoundJets(), and cms::CompoundJetProducer::writeCompoundJets().

1034  {
1035  return iSetup.getData(topology_token_);
1036 }
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topology_token_

◆ inputTowers()

void VirtualJetProducer::inputTowers ( )
protectedvirtual

Reimplemented in cms::CompoundJetProducer, SubjetFilterJetProducer, and cms::SubEventGenJetProducer.

Definition at line 450 of file VirtualJetProducer.cc.

References hgcalPlots::ct, geometryDiff::epsilon, mps_fire::i, input, edm::isNotFinite(), jetUpdater_cfi::sort, l1tHGCalTowerProducer_cfi::tower, and w().

Referenced by SubjetFilterJetProducer::inputTowers(), cms::CompoundJetProducer::inputTowers(), and FastjetJetProducer::produceTrackJets().

450  {
451  auto inBegin = inputs_.begin(), inEnd = inputs_.end(), i = inBegin;
452  for (; i != inEnd; ++i) {
453  auto const& input = **i;
454  // std::cout << "CaloTowerVI jets " << input->pt() << " " << input->et() << ' '<< input->energy() << ' ' << (isAnomalousTower(input) ? " bad" : " ok") << std::endl;
455  if (edm::isNotFinite(input.pt()))
456  continue;
457  if (input.et() < inputEtMin_)
458  continue;
459  if (input.energy() < inputEMin_)
460  continue;
461  if (isAnomalousTower(*i))
462  continue;
463  // Change by SRR : this is no longer an error nor warning, this can happen with PU mitigation algos.
464  // Also switch to something more numerically safe. (VI: 10^-42GeV????)
465  if (input.pt() < 100 * std::numeric_limits<double>::epsilon()) {
466  continue;
467  }
469  const CaloTower& tower = dynamic_cast<const CaloTower&>(input);
470  auto const& ct = tower.p4(vertex_); // very expensive as computed in eta/phi
471  fjInputs_.emplace_back(ct.px(), ct.py(), ct.pz(), ct.energy());
472  fjInputs_.back().set_user_index(i - inBegin);
473  //std::cout << "tower:" << *tower << '\n';
474  } else {
475  /*
476  if(makePFJet(jetTypeE)) {
477  reco::PFCandidate& pfc = (reco::PFCandidate&)input;
478  std::cout << "PF cand:" << pfc << '\n';
479  }
480  */
481  if (!applyWeight_) {
482  fjInputs_.emplace_back(input.px(), input.py(), input.pz(), input.energy());
483  fjInputs_.back().set_user_index(i - inBegin);
484  } else {
486  throw cms::Exception("InvalidInput")
487  << "applyWeight set to True, but no weights given in VirtualJetProducer\n";
488  float w = weights_[*i];
489  if (w > 0) {
490  fjInputs_.emplace_back(input.px() * w, input.py() * w, input.pz() * w, input.energy() * w);
491  fjInputs_.back().set_user_index(i - inBegin);
492  }
493  }
494  }
495  }
496 
497  if (restrictInputs_ && fjInputs_.size() > maxInputs_) {
499  std::sort(fjInputs_.begin(), fjInputs_.end(), pTComparator);
500  fjInputs_.resize(maxInputs_);
501  edm::LogWarning("JetRecoTooManyEntries")
502  << "Too many inputs in the event, limiting to first " << maxInputs_ << ". Output is suspect.";
503  }
504 }
JetType::Type jetTypeE
edm::ValueMap< float > weights_
reco::Particle::Point vertex_
T w() const
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:98
static std::string const input
Definition: EdmProvDump.cc:50
virtual bool isAnomalousTower(reco::CandidatePtr input)
std::vector< fastjet::PseudoJet > fjInputs_
std::vector< edm::Ptr< reco::Candidate > > inputs_
edm::EDGetTokenT< edm::ValueMap< float > > input_weights_token_
Log< level::Warning, false > LogWarning
bool makeCaloJet(const JetType::Type &fTag)

◆ isAnomalousTower()

bool VirtualJetProducer::isAnomalousTower ( reco::CandidatePtr  input)
protectedvirtual

Definition at line 507 of file VirtualJetProducer.cc.

Referenced by cms::SubEventGenJetProducer::inputTowers().

507  {
508  if (!makeCaloJet(jetTypeE))
509  return false;
510  else
511  return (*anomalousTowerDef_)(*input);
512 }
JetType::Type jetTypeE
std::unique_ptr< AnomalousTower > anomalousTowerDef_
bool makeCaloJet(const JetType::Type &fTag)

◆ jetType()

std::string VirtualJetProducer::jetType ( ) const
inline

Definition at line 88 of file VirtualJetProducer.h.

88 { return jetType_; }

◆ makeBasicJet()

bool VirtualJetProducer::makeBasicJet ( const JetType::Type fTag)
inlineprotected

Definition at line 64 of file VirtualJetProducer.h.

◆ makeCaloJet()

bool VirtualJetProducer::makeCaloJet ( const JetType::Type fTag)
inlineprotected

◆ makeGenJet()

bool VirtualJetProducer::makeGenJet ( const JetType::Type fTag)
inlineprotected

Definition at line 61 of file VirtualJetProducer.h.

References nanoDQM_cfi::GenJet.

◆ makePFClusterJet()

bool VirtualJetProducer::makePFClusterJet ( const JetType::Type fTag)
inlineprotected

◆ makePFJet()

bool VirtualJetProducer::makePFJet ( const JetType::Type fTag)
inlineprotected

Definition at line 60 of file VirtualJetProducer.h.

◆ makeProduces()

void VirtualJetProducer::makeProduces ( std::string  s,
std::string  tag = "" 
)
protectedvirtual

Definition at line 86 of file VirtualJetProducer.cc.

References isoTrack_cff::alias, and makeGlobalPositionRcd_cfg::tag.

Referenced by SubjetFilterJetProducer::SubjetFilterJetProducer().

86  {
87  if (writeCompound_) {
88  produces<reco::BasicJetCollection>();
89  }
90 
91  if (writeJetsWithConst_) {
92  produces<reco::PFCandidateCollection>(tag).setBranchAlias(alias);
93  produces<reco::PFJetCollection>();
94  } else {
95  if (makeCaloJet(jetTypeE)) {
96  produces<reco::CaloJetCollection>(tag).setBranchAlias(alias);
97  } else if (makePFJet(jetTypeE)) {
98  produces<reco::PFJetCollection>(tag).setBranchAlias(alias);
99  } else if (makeGenJet(jetTypeE)) {
100  produces<reco::GenJetCollection>(tag).setBranchAlias(alias);
101  } else if (makeTrackJet(jetTypeE)) {
102  produces<reco::TrackJetCollection>(tag).setBranchAlias(alias);
103  } else if (makePFClusterJet(jetTypeE)) {
104  produces<reco::PFClusterJetCollection>(tag).setBranchAlias(alias);
105  } else if (makeBasicJet(jetTypeE)) {
106  produces<reco::BasicJetCollection>(tag).setBranchAlias(alias);
107  }
108  }
109 }
JetType::Type jetTypeE
bool makeGenJet(const JetType::Type &fTag)
bool makeBasicJet(const JetType::Type &fTag)
bool makeTrackJet(const JetType::Type &fTag)
bool makePFJet(const JetType::Type &fTag)
bool makePFClusterJet(const JetType::Type &fTag)
bool makeCaloJet(const JetType::Type &fTag)

◆ makeTrackJet()

bool VirtualJetProducer::makeTrackJet ( const JetType::Type fTag)
inlineprotected

◆ offsetCorrectJets()

void VirtualJetProducer::offsetCorrectJets ( std::vector< fastjet::PseudoJet > &  orphanInput)
protected

◆ output()

void VirtualJetProducer::output ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
protectedvirtual

Reimplemented in cms::CompoundJetProducer, and SubjetFilterJetProducer.

Definition at line 544 of file VirtualJetProducer.cc.

References btagElecInJet_cfi::CaloJet, Exception, nanoDQM_cfi::GenJet, and iEvent.

544  {
545  // Write jets and constitutents. Will use fjJets_, inputs_
546  // and fjClusterSeq_
547 
548  if (writeCompound_) {
549  // Write jets and subjets
550  switch (jetTypeE) {
551  case JetType::CaloJet:
552  writeCompoundJets<reco::CaloJet>(iEvent, iSetup);
553  break;
554  case JetType::PFJet:
555  writeCompoundJets<reco::PFJet>(iEvent, iSetup);
556  break;
557  case JetType::GenJet:
558  writeCompoundJets<reco::GenJet>(iEvent, iSetup);
559  break;
560  case JetType::BasicJet:
561  writeCompoundJets<reco::BasicJet>(iEvent, iSetup);
562  break;
563  default:
564  throw cms::Exception("InvalidInput") << "invalid jet type in CompoundJetProducer\n";
565  break;
566  };
567  } else if (writeJetsWithConst_) {
568  // Write jets and new constituents.
569  writeJetsWithConstituents<reco::PFJet>(iEvent, iSetup);
570  } else {
571  switch (jetTypeE) {
572  case JetType::CaloJet:
573  writeJets<reco::CaloJet>(iEvent, iSetup);
574  break;
575  case JetType::PFJet:
576  writeJets<reco::PFJet>(iEvent, iSetup);
577  break;
578  case JetType::GenJet:
579  writeJets<reco::GenJet>(iEvent, iSetup);
580  break;
581  case JetType::TrackJet:
582  writeJets<reco::TrackJet>(iEvent, iSetup);
583  break;
585  writeJets<reco::PFClusterJet>(iEvent, iSetup);
586  break;
587  case JetType::BasicJet:
588  writeJets<reco::BasicJet>(iEvent, iSetup);
589  break;
590  default:
591  throw cms::Exception("InvalidInput") << "invalid jet type in VirtualJetProducer\n";
592  break;
593  };
594  }
595 }
JetType::Type jetTypeE
int iEvent
Definition: GenABIO.cc:224

◆ produce()

void VirtualJetProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 272 of file VirtualJetProducer.cc.

References edm::View< T >::empty(), Exception, mps_fire::i, iEvent, LogDebug, WZElectronSkims53X_cff::max, convertSQLitetoXML_cfg::output, edm::View< T >::ptrAt(), heavyFlavorDQMFirstStep_cff::pvCollection, HLT_2024v14_cff::seeds, edm::View< T >::size(), and edm::swap().

Referenced by cms::SubJetProducer::produce(), CMSInsideOutJetProducer::produce(), cms::CSJetProducer::produce(), SubjetFilterJetProducer::produce(), and FastjetJetProducer::produce().

272  {
273  // If requested, set the fastjet random seed to a deterministic function
274  // of the run/lumi/event.
275  // NOTE!!! The fastjet random number sequence is a global singleton.
276  // Thus, we have to create an object and get access to the global singleton
277  // in order to change it.
278  if (useDeterministicSeed_) {
279  fastjet::GhostedAreaSpec gas;
280  std::vector<int> seeds(2);
281  unsigned int runNum_uint = static_cast<unsigned int>(iEvent.id().run());
282  unsigned int evNum_uint = static_cast<unsigned int>(iEvent.id().event());
283  seeds[0] = std::max(runNum_uint, minSeed_ + 3) + 3 * evNum_uint;
284  seeds[1] = std::max(runNum_uint, minSeed_ + 5) + 5 * evNum_uint;
285  gas.set_random_status(seeds);
286  }
287 
288  LogDebug("VirtualJetProducer") << "Entered produce\n";
289  //determine signal vertex2
290  vertex_ = reco::Jet::Point(0, 0, 0);
292  LogDebug("VirtualJetProducer") << "Adding PV info\n";
295  if (!pvCollection->empty())
296  vertex_ = pvCollection->begin()->position();
297  }
298 
299  // Get Weights Collection
302 
303  // For Pileup subtraction using offset correction:
304  // set up geometry map
305  if (doPUOffsetCorr_) {
306  subtractor_->setupGeometryMap(iEvent, iSetup);
307  }
308 
309  // clear data
310  LogDebug("VirtualJetProducer") << "Clear data\n";
311  fjInputs_.clear();
312  fjJets_.clear();
313  inputs_.clear();
314 
315  // get inputs and convert them to the fastjet format (fastjet::PeudoJet)
317 
321  edm::Handle<std::vector<edm::FwdPtr<pat::PackedGenParticle>>> packedgeninputsHandleAsFwdPtr;
322 
323  bool isView = iEvent.getByToken(input_candidateview_token_, inputsHandle);
324  if (isView) {
325  if (inputsHandle->empty()) {
326  output(iEvent, iSetup);
327  return;
328  }
329  for (size_t i = 0; i < inputsHandle->size(); ++i) {
330  inputs_.push_back(inputsHandle->ptrAt(i));
331  }
332  } else {
333  bool isPF = iEvent.getByToken(input_candidatefwdptr_token_, pfinputsHandleAsFwdPtr);
334  bool isPFFwdPtr = iEvent.getByToken(input_packedcandidatefwdptr_token_, packedinputsHandleAsFwdPtr);
335  bool isGen = iEvent.getByToken(input_gencandidatefwdptr_token_, geninputsHandleAsFwdPtr);
336  bool isGenFwdPtr = iEvent.getByToken(input_packedgencandidatefwdptr_token_, packedgeninputsHandleAsFwdPtr);
337 
338  if (isPF) {
339  if (pfinputsHandleAsFwdPtr->empty()) {
340  output(iEvent, iSetup);
341  return;
342  }
343  for (size_t i = 0; i < pfinputsHandleAsFwdPtr->size(); ++i) {
344  if ((*pfinputsHandleAsFwdPtr)[i].ptr().isAvailable()) {
345  inputs_.push_back((*pfinputsHandleAsFwdPtr)[i].ptr());
346  } else if ((*pfinputsHandleAsFwdPtr)[i].backPtr().isAvailable()) {
347  inputs_.push_back((*pfinputsHandleAsFwdPtr)[i].backPtr());
348  }
349  }
350  } else if (isPFFwdPtr) {
351  if (packedinputsHandleAsFwdPtr->empty()) {
352  output(iEvent, iSetup);
353  return;
354  }
355  for (size_t i = 0; i < packedinputsHandleAsFwdPtr->size(); ++i) {
356  if ((*packedinputsHandleAsFwdPtr)[i].ptr().isAvailable()) {
357  inputs_.push_back((*packedinputsHandleAsFwdPtr)[i].ptr());
358  } else if ((*packedinputsHandleAsFwdPtr)[i].backPtr().isAvailable()) {
359  inputs_.push_back((*packedinputsHandleAsFwdPtr)[i].backPtr());
360  }
361  }
362  } else if (isGen) {
363  if (geninputsHandleAsFwdPtr->empty()) {
364  output(iEvent, iSetup);
365  return;
366  }
367  for (size_t i = 0; i < geninputsHandleAsFwdPtr->size(); ++i) {
368  if ((*geninputsHandleAsFwdPtr)[i].ptr().isAvailable()) {
369  inputs_.push_back((*geninputsHandleAsFwdPtr)[i].ptr());
370  } else if ((*geninputsHandleAsFwdPtr)[i].backPtr().isAvailable()) {
371  inputs_.push_back((*geninputsHandleAsFwdPtr)[i].backPtr());
372  }
373  }
374  } else if (isGenFwdPtr) {
375  if (geninputsHandleAsFwdPtr->empty()) {
376  output(iEvent, iSetup);
377  return;
378  }
379  for (size_t i = 0; i < packedgeninputsHandleAsFwdPtr->size(); ++i) {
380  if ((*packedgeninputsHandleAsFwdPtr)[i].ptr().isAvailable()) {
381  inputs_.push_back((*packedgeninputsHandleAsFwdPtr)[i].ptr());
382  } else if ((*packedgeninputsHandleAsFwdPtr)[i].backPtr().isAvailable()) {
383  inputs_.push_back((*packedgeninputsHandleAsFwdPtr)[i].backPtr());
384  }
385  }
386  } else {
387  throw cms::Exception("Invalid Jet Inputs")
388  << "Did not specify appropriate inputs for VirtualJetProducer, Abort!\n";
389  }
390  }
391  LogDebug("VirtualJetProducer") << "Got inputs\n";
392 
393  // Convert candidates to fastjet::PseudoJets.
394  // Also correct to Primary Vertex. Will modify fjInputs_
395  // and use inputs_
396  fjInputs_.reserve(inputs_.size());
397  inputTowers();
398  LogDebug("VirtualJetProducer") << "Inputted towers\n";
399 
400  // For Pileup subtraction using offset correction:
401  // Subtract pedestal.
402  if (doPUOffsetCorr_) {
403  subtractor_->setDefinition(fjJetDefinition_);
405  subtractor_->calculatePedestal(fjInputs_);
406  subtractor_->subtractPedestal(fjInputs_);
407  LogDebug("VirtualJetProducer") << "Subtracted pedestal\n";
408  }
409  // Run algorithm. Will modify fjJets_ and allocate fjClusterSeq_.
410  // This will use fjInputs_
411  runAlgorithm(iEvent, iSetup);
412 
413  // if ( doPUOffsetCorr_ ) {
414  // subtractor_->setAlgorithm(fjClusterSeq_);
415  // }
416 
417  LogDebug("VirtualJetProducer") << "Ran algorithm\n";
418  // For Pileup subtraction using offset correction:
419  // Now we find jets and need to recalculate their energy,
420  // mark towers participated in jet,
421  // remove occupied towers from the list and recalculate mean and sigma
422  // put the initial towers collection to the jet,
423  // and subtract from initial towers in jet recalculated mean and sigma of towers
424  if (doPUOffsetCorr_) {
425  LogDebug("VirtualJetProducer") << "Do PUOffsetCorr\n";
426  vector<fastjet::PseudoJet> orphanInput;
427  subtractor_->calculateOrphanInput(orphanInput);
428  subtractor_->calculatePedestal(orphanInput);
429  subtractor_->offsetCorrectJets();
430  }
431  // Write the output jets.
432  // This will (by default) call the member function template
433  // "writeJets", but can be overridden.
434  // this will use inputs_
435  output(iEvent, iSetup);
436  LogDebug("VirtualJetProducer") << "Wrote jets\n";
437 
438  // Clear the work vectors so that memory is free for other modules.
439  // Use the trick of swapping with an empty vector so that the memory
440  // is actually given back rather than silently kept.
441  decltype(fjInputs_)().swap(fjInputs_);
442  decltype(fjJets_)().swap(fjJets_);
443  decltype(inputs_)().swap(inputs_);
444 
445  return;
446 }
JetType::Type jetTypeE
std::shared_ptr< PileUpSubtractor > subtractor_
edm::ValueMap< float > weights_
reco::Particle::Point vertex_
Ptr< value_type > ptrAt(size_type i) const
edm::EDGetTokenT< reco::CandidateView > input_candidateview_token_
std::vector< fastjet::PseudoJet > fjJets_
bool empty() const
virtual void inputTowers()
edm::EDGetTokenT< std::vector< edm::FwdPtr< pat::PackedCandidate > > > input_packedcandidatefwdptr_token_
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:98
virtual void runAlgorithm(edm::Event &iEvent, const edm::EventSetup &iSetup)=0
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
size_type size() const
bool makePFJet(const JetType::Type &fTag)
std::vector< fastjet::PseudoJet > fjInputs_
int iEvent
Definition: GenABIO.cc:224
std::vector< edm::Ptr< reco::Candidate > > inputs_
edm::EDGetTokenT< edm::ValueMap< float > > input_weights_token_
edm::EDGetTokenT< std::vector< edm::FwdPtr< pat::PackedGenParticle > > > input_packedgencandidatefwdptr_token_
edm::EDGetTokenT< reco::VertexCollection > input_vertex_token_
edm::EDGetTokenT< std::vector< edm::FwdPtr< reco::GenParticle > > > input_gencandidatefwdptr_token_
edm::EDGetTokenT< std::vector< edm::FwdPtr< reco::PFCandidate > > > input_candidatefwdptr_token_
virtual void output(edm::Event &iEvent, edm::EventSetup const &iSetup)
bool makeCaloJet(const JetType::Type &fTag)
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
#define LogDebug(id)

◆ runAlgorithm()

virtual void VirtualJetProducer::runAlgorithm ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
protectedpure virtual

◆ writeCompoundJets()

template<class T >
void VirtualJetProducer::writeCompoundJets ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
protected

function template to write out the outputs

Definition at line 790 of file VirtualJetProducer.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), gather_cfg::cout, edm::EventSetup::getData(), iEvent, dqmdumpme::indices, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, metsig::jet, jetfilter_cfi::jetCollection, eostools::move(), point, reco::Jet::setJetArea(), and reco::writeSpecific().

790  {
791  if (verbosity_ >= 1) {
792  std::cout << "<VirtualJetProducer::writeCompoundJets (moduleLabel = " << moduleLabel_ << ")>:" << std::endl;
793  }
794 
795  // get a list of output jets
796  auto jetCollection = std::make_unique<reco::BasicJetCollection>();
797  // get a list of output subjets
798  auto subjetCollection = std::make_unique<std::vector<T>>();
799 
800  // This will store the handle for the subjets after we write them
801  edm::OrphanHandle<std::vector<T>> subjetHandleAfterPut;
802  // this is the mapping of subjet to hard jet
803  std::vector<std::vector<int>> indices;
804  // this is the list of hardjet 4-momenta
805  std::vector<math::XYZTLorentzVector> p4_hardJets;
806  // this is the hardjet areas
807  std::vector<double> area_hardJets;
808 
809  // Loop over the hard jets
810  std::vector<fastjet::PseudoJet>::const_iterator it = fjJets_.begin(), iEnd = fjJets_.end(), iBegin = fjJets_.begin();
811  indices.resize(fjJets_.size());
812  for (; it != iEnd; ++it) {
813  fastjet::PseudoJet const& localJet = *it;
814  unsigned int jetIndex = it - iBegin;
815  // Get the 4-vector for the hard jet
816  p4_hardJets.push_back(math::XYZTLorentzVector(localJet.px(), localJet.py(), localJet.pz(), localJet.e()));
817  double localJetArea = 0.0;
818  if (doAreaFastjet_ && localJet.has_area()) {
819  localJetArea = localJet.area();
820  }
821  area_hardJets.push_back(localJetArea);
822 
823  // create the subjet list
824  std::vector<fastjet::PseudoJet> constituents;
825  if (it->has_pieces()) {
826  constituents = it->pieces();
827  } else if (it->has_constituents()) {
828  constituents = it->constituents();
829  }
830 
831  std::vector<fastjet::PseudoJet>::const_iterator itSubJetBegin = constituents.begin(), itSubJet = itSubJetBegin,
832  itSubJetEnd = constituents.end();
833  for (; itSubJet != itSubJetEnd; ++itSubJet) {
834  fastjet::PseudoJet const& subjet = *itSubJet;
835  if (verbosity_ >= 1) {
836  std::cout << "subjet #" << (itSubJet - itSubJetBegin) << ": Pt = " << subjet.pt() << ", eta = " << subjet.eta()
837  << ", phi = " << subjet.phi() << ", mass = " << subjet.m()
838  << " (#constituents = " << subjet.constituents().size() << ")" << std::endl;
839  std::vector<fastjet::PseudoJet> subjet_constituents = subjet.constituents();
840  int idx_constituent = 0;
841  for (std::vector<fastjet::PseudoJet>::const_iterator constituent = subjet_constituents.begin();
842  constituent != subjet_constituents.end();
843  ++constituent) {
844  if (constituent->pt() < 1.e-3)
845  continue; // CV: skip ghosts
846  std::cout << " constituent #" << idx_constituent << ": Pt = " << constituent->pt()
847  << ", eta = " << constituent->eta() << ", phi = " << constituent->phi() << ","
848  << " mass = " << constituent->m() << std::endl;
849  ++idx_constituent;
850  }
851  }
852 
853  if (verbosity_ >= 1) {
854  std::cout << "subjet #" << (itSubJet - itSubJetBegin) << ": Pt = " << subjet.pt() << ", eta = " << subjet.eta()
855  << ", phi = " << subjet.phi() << ", mass = " << subjet.m()
856  << " (#constituents = " << subjet.constituents().size() << ")" << std::endl;
857  std::vector<fastjet::PseudoJet> subjet_constituents = subjet.constituents();
858  int idx_constituent = 0;
859  for (std::vector<fastjet::PseudoJet>::const_iterator constituent = subjet_constituents.begin();
860  constituent != subjet_constituents.end();
861  ++constituent) {
862  if (constituent->pt() < 1.e-3)
863  continue; // CV: skip ghosts
864  std::cout << " constituent #" << idx_constituent << ": Pt = " << constituent->pt()
865  << ", eta = " << constituent->eta() << ", phi = " << constituent->phi() << ","
866  << " mass = " << constituent->m() << std::endl;
867  ++idx_constituent;
868  }
869  }
870 
871  math::XYZTLorentzVector p4Subjet(subjet.px(), subjet.py(), subjet.pz(), subjet.e());
872  reco::Particle::Point point(0, 0, 0);
873 
874  // This will hold ptr's to the subjets
875  std::vector<reco::CandidatePtr> subjetConstituents;
876 
877  // Get the transient subjet constituents from fastjet
878  std::vector<fastjet::PseudoJet> subjetFastjetConstituents = subjet.constituents();
879  std::vector<reco::CandidatePtr> constituents = getConstituents(subjetFastjetConstituents);
880 
881  indices[jetIndex].push_back(subjetCollection->size());
882 
883  // Add the concrete subjet type to the subjet list to write to event record
884  subjetCollection->push_back(*std::make_unique<T>());
885  auto& jet = subjetCollection->back();
886  if ((applyWeight_) && (makePFJet(jetTypeE)))
887  reco::writeSpecific(dynamic_cast<reco::PFJet&>(jet), p4Subjet, point, constituents, &weights_);
888  else if constexpr (std::is_same_v<T, reco::CaloJet>) {
890  jet, p4Subjet, point, constituents, iSetup.getData(geometry_token_), iSetup.getData(topology_token_));
891  } else {
892  reco::writeSpecific(jet, p4Subjet, point, constituents);
893  }
894  jet.setIsWeighted(applyWeight_);
895  double subjetArea = 0.0;
896  if (doAreaFastjet_ && itSubJet->has_area()) {
897  subjetArea = itSubJet->area();
898  }
899  jet.setJetArea(subjetArea);
900  }
901  }
902 
903  // put subjets into event record
904  subjetHandleAfterPut = iEvent.put(std::move(subjetCollection), jetCollInstanceName_);
905 
906  // Now create the hard jets with ptr's to the subjets as constituents
907  std::vector<math::XYZTLorentzVector>::const_iterator ip4 = p4_hardJets.begin(), ip4Begin = p4_hardJets.begin(),
908  ip4End = p4_hardJets.end();
909 
910  for (; ip4 != ip4End; ++ip4) {
911  int p4_index = ip4 - ip4Begin;
912  std::vector<int>& ind = indices[p4_index];
913  std::vector<reco::CandidatePtr> i_hardJetConstituents;
914  // Add the subjets to the hard jet
915  for (std::vector<int>::const_iterator isub = ind.begin(); isub != ind.end(); ++isub) {
916  reco::CandidatePtr candPtr(subjetHandleAfterPut, *isub, false);
917  i_hardJetConstituents.push_back(candPtr);
918  }
919  reco::Particle::Point point(0, 0, 0);
920  reco::BasicJet toput(*ip4, point, i_hardJetConstituents);
921  toput.setJetArea(area_hardJets[ip4 - ip4Begin]);
922  jetCollection->push_back(toput);
923  }
924 
925  // put hard jets into event record
926  // Store the Orphan handle for adding HTT information
928 
931  }
932 }
JetType::Type jetTypeE
edm::ValueMap< float > weights_
virtual void addHTTTopJetTagInfoCollection(edm::Event &iEvent, const edm::EventSetup &iSetup, edm::OrphanHandle< reco::BasicJetCollection > &oh)
virtual std::vector< reco::CandidatePtr > getConstituents(const std::vector< fastjet::PseudoJet > &fjConstituents)
std::vector< fastjet::PseudoJet > fjJets_
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, CaloGeometry const &geometry, HcalTopology const &topology)
Definition: JetSpecific.cc:32
Jets made from CaloTowers.
Definition: BasicJet.h:19
bool makePFJet(const JetType::Type &fTag)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometry_token_
int iEvent
Definition: GenABIO.cc:224
std::string jetCollInstanceName_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topology_token_
math::XYZPoint Point
point in the space
Definition: Particle.h:25
def move(src, dest)
Definition: eostools.py:511
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

◆ writeJets()

template<typename T >
void VirtualJetProducer::writeJets ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
protected

Definition at line 610 of file VirtualJetProducer.cc.

References Options::const, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), reco::deltaR2(), HLT_2024v14_cff::distance, PVValHelper::eta, TrackingDataMCValidation_Standalone_cff::etamax, TrackingDataMCValidation_Standalone_cff::etamin, Exception, dqmdumpme::first, iEvent, reco::helper::VirtualJetProducerHelper::intersection(), edm::isNotFinite(), metsig::jet, run3scouting_cff::jetArea, PDWG_EXODelayedJetMET_cff::jets, isotrackApplyRegressor::k, M_PI, eostools::move(), HLT_2024v14_cff::nEta, fastjet::BackgroundEstimator::rho(), edm::second(), fastjet::BackgroundEstimator::set_excluded_jets(), fastjet::BackgroundEstimator::sigma(), mathSSE::sqrt(), and reco::writeSpecific().

610  {
611  // std::cout << "writeJets " << typeid(T).name()
612  // << (doRhoFastjet_ ? " doRhoFastjet " : "")
613  // << (doAreaFastjet_ ? " doAreaFastjet " : "")
614  // << (doAreaDiskApprox_ ? " doAreaDiskApprox " : "")
615  // << std::endl;
616 
617  if (doRhoFastjet_) {
618  // declare jet collection without the two jets,
619  // for unbiased background estimation.
620  std::vector<fastjet::PseudoJet> fjexcluded_jets;
621  fjexcluded_jets = fjJets_;
622 
623  if (fjexcluded_jets.size() > 2)
624  fjexcluded_jets.resize(nExclude_);
625 
626  if (doFastJetNonUniform_) {
627  auto rhos = std::make_unique<std::vector<double>>();
628  auto sigmas = std::make_unique<std::vector<double>>();
629  int nEta = puCenters_.size();
630  rhos->reserve(nEta);
631  sigmas->reserve(nEta);
632  fastjet::ClusterSequenceAreaBase const* clusterSequenceWithArea =
633  dynamic_cast<fastjet::ClusterSequenceAreaBase const*>(fjClusterSeq_.get());
634 
635  if (clusterSequenceWithArea == nullptr) {
636  if (!fjJets_.empty()) {
637  throw cms::Exception("LogicError") << "fjClusterSeq is not initialized while inputs are present\n ";
638  }
639  } else {
640  for (int ie = 0; ie < nEta; ++ie) {
641  double eta = puCenters_[ie];
642  double etamin = eta - puWidth_;
643  double etamax = eta + puWidth_;
644  fastjet::RangeDefinition range_rho(etamin, etamax);
645  fastjet::BackgroundEstimator bkgestim(*clusterSequenceWithArea, range_rho);
646  bkgestim.set_excluded_jets(fjexcluded_jets);
647  rhos->push_back(bkgestim.rho());
648  sigmas->push_back(bkgestim.sigma());
649  }
650  }
651  iEvent.put(std::move(rhos), "rhos");
652  iEvent.put(std::move(sigmas), "sigmas");
653  } else {
654  auto rho = std::make_unique<double>(0.0);
655  auto sigma = std::make_unique<double>(0.0);
656  double mean_area = 0;
657 
658  fastjet::ClusterSequenceAreaBase const* clusterSequenceWithArea =
659  dynamic_cast<fastjet::ClusterSequenceAreaBase const*>(fjClusterSeq_.get());
660  if (clusterSequenceWithArea == nullptr) {
661  if (!fjJets_.empty()) {
662  throw cms::Exception("LogicError") << "fjClusterSeq is not initialized while inputs are present\n ";
663  }
664  } else {
665  clusterSequenceWithArea->get_median_rho_and_sigma(*fjSelector_, false, *rho, *sigma, mean_area);
666  if ((*rho < 0) || (edm::isNotFinite(*rho))) {
667  edm::LogError("BadRho") << "rho value is " << *rho << " area:" << mean_area
668  << " and n_empty_jets: " << clusterSequenceWithArea->n_empty_jets(*fjSelector_)
669  << " with range " << fjSelector_->description() << ". Setting rho to rezo.";
670  *rho = 0;
671  }
672  }
673  iEvent.put(std::move(rho), "rho");
674  iEvent.put(std::move(sigma), "sigma");
675  }
676  } // doRhoFastjet_
677 
678  // produce output jet collection
679 
680  using namespace reco;
681 
682  // allocate fjJets_.size() Ts in vector
683  auto jets = std::make_unique<std::vector<T>>(fjJets_.size());
684 
685  if (!fjJets_.empty()) {
686  // Distance between jet centers and overlap area -- for disk-based area calculation
687  using RIJ = std::pair<double, double>;
688  std::vector<RIJ> rijStorage(fjJets_.size() * (fjJets_.size() / 2));
689  RIJ* rij[fjJets_.size()];
690  unsigned int k = 0;
691  for (unsigned int ijet = 0; ijet < fjJets_.size(); ++ijet) {
692  rij[ijet] = &rijStorage[k];
693  k += ijet;
694  }
695 
696  float etaJ[fjJets_.size()], phiJ[fjJets_.size()];
697 
698  auto orParam_ = 1. / rParam_;
699  // fill jets
700  [[maybe_unused]] const CaloGeometry* pGeometry = nullptr;
701  [[maybe_unused]] const HcalTopology* pTopology = nullptr;
702  if constexpr (std::is_same_v<T, reco::CaloJet>) {
703  pGeometry = &getGeometry(iSetup);
704  pTopology = &getTopology(iSetup);
705  }
706  for (unsigned int ijet = 0; ijet < fjJets_.size(); ++ijet) {
707  auto& jet = (*jets)[ijet];
708 
709  // get the fastjet jet
710  const fastjet::PseudoJet& fjJet = fjJets_[ijet];
711  // get the constituents from fastjet
712  std::vector<fastjet::PseudoJet> const& fjConstituents = fastjet::sorted_by_pt(fjJet.constituents());
713  // convert them to CandidatePtr vector
714  std::vector<CandidatePtr> const& constituents = getConstituents(fjConstituents);
715 
716  // write the specifics to the jet (simultaneously sets 4-vector, vertex).
717  // These are overridden functions that will call the appropriate
718  // specific allocator.
719  if ((applyWeight_) && (makePFJet(jetTypeE)))
720  writeSpecific(dynamic_cast<reco::PFJet&>(jet),
721  Particle::LorentzVector(fjJet.px(), fjJet.py(), fjJet.pz(), fjJet.E()),
722  vertex_,
723  constituents,
724  &weights_);
725  else {
726  if constexpr (std::is_same_v<T, reco::CaloJet>) {
728  Particle::LorentzVector(fjJet.px(), fjJet.py(), fjJet.pz(), fjJet.E()),
729  vertex_,
730  constituents,
731  *pGeometry,
732  *pTopology);
733  } else {
735  jet, Particle::LorentzVector(fjJet.px(), fjJet.py(), fjJet.pz(), fjJet.E()), vertex_, constituents);
736  }
737  }
738  phiJ[ijet] = jet.phi();
739  etaJ[ijet] = jet.eta();
740  jet.setIsWeighted(applyWeight_);
741  }
742 
743  // calcuate the jet area
744  for (unsigned int ijet = 0; ijet < fjJets_.size(); ++ijet) {
745  // calcuate the jet area
746  double jetArea = 0.0;
747  // get the fastjet jet
748  const auto& fjJet = fjJets_[ijet];
749  if (doAreaFastjet_ && fjJet.has_area()) {
750  jetArea = fjJet.area();
751  } else if (doAreaDiskApprox_) {
752  // Here it is assumed that fjJets_ is in decreasing order of pT,
753  // which should happen in FastjetJetProducer::runAlgorithm()
754  jetArea = M_PI;
755  RIJ* distance = rij[ijet];
756  for (unsigned jJet = 0; jJet < ijet; ++jJet) {
757  distance[jJet].first = std::sqrt(reco::deltaR2(etaJ[ijet], phiJ[ijet], etaJ[jJet], phiJ[jJet])) * orParam_;
759  jetArea -= distance[jJet].second;
760  for (unsigned kJet = 0; kJet < jJet; ++kJet) {
762  distance[kJet].first,
763  rij[jJet][kJet].first,
764  distance[jJet].second,
765  distance[kJet].second,
766  rij[jJet][kJet].second);
767  } // end loop over harder jets
768  } // end loop over harder jets
769  jetArea *= (rParam_ * rParam_);
770  }
771  auto& jet = (*jets)[ijet];
772  jet.setJetArea(jetArea);
773 
774  if (doPUOffsetCorr_) {
775  jet.setPileup(subtractor_->getPileUpEnergy(ijet));
776  } else {
777  jet.setPileup(0.0);
778  }
779 
780  // std::cout << "area " << ijet << " " << jetArea << " " << Area<T>::get(jet) << std::endl;
781  // std::cout << "JetVI " << ijet << ' '<< jet.pt() << " " << jet.et() << ' '<< jet.energy() << ' '<< jet.mass() << std::endl;
782  }
783  }
784  // put the jets in the collection
786 }
JetType::Type jetTypeE
std::shared_ptr< PileUpSubtractor > subtractor_
edm::ValueMap< float > weights_
reco::Particle::Point vertex_
HcalTopology const & getTopology(edm::EventSetup const &) const
virtual std::vector< reco::CandidatePtr > getConstituents(const std::vector< fastjet::PseudoJet > &fjConstituents)
std::vector< fastjet::PseudoJet > fjJets_
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, CaloGeometry const &geometry, HcalTopology const &topology)
Definition: JetSpecific.cc:32
std::vector< double > puCenters_
Log< level::Error, false > LogError
U second(std::pair< T, U > const &p)
bool makePFJet(const JetType::Type &fTag)
int iEvent
Definition: GenABIO.cc:224
std::string jetCollInstanceName_
ClusterSequencePtr fjClusterSeq_
T sqrt(T t)
Definition: SSEVec.h:23
CaloGeometry const & getGeometry(edm::EventSetup const &) const
#define M_PI
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
fixed size matrix
def move(src, dest)
Definition: eostools.py:511
math::PtEtaPhiELorentzVectorF LorentzVector

◆ writeJetsWithConstituents()

template<class T >
void VirtualJetProducer::writeJetsWithConstituents ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
protected

function template to write out the outputs

Definition at line 936 of file VirtualJetProducer.cc.

References gather_cfg::cout, EcalPhiSymFlatTableProducers_cfi::id, iEvent, dqmdumpme::indices, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, metsig::jet, jetfilter_cfi::jetCollection, eostools::move(), point, reco::LeafCandidate::setP4(), reco::PFCandidate::setSourceCandidatePtr(), reco::PFCandidate::translatePdgIdToType(), and reco::writeSpecific().

936  {
937  if (verbosity_ >= 1) {
938  std::cout << "<VirtualJetProducer::writeJetsWithConstituents (moduleLabel = " << moduleLabel_ << ")>:" << std::endl;
939  }
940 
941  // get a list of output jets MV: make this compatible with template
942  auto jetCollection = std::make_unique<reco::PFJetCollection>();
943 
944  // this is the mapping of jet to constituents
945  std::vector<std::vector<int>> indices;
946  // this is the list of jet 4-momenta
947  std::vector<math::XYZTLorentzVector> p4_Jets;
948  // this is the jet areas
949  std::vector<double> area_Jets;
950 
951  // get a list of output constituents
952  auto constituentCollection = std::make_unique<reco::PFCandidateCollection>();
953 
954  // This will store the handle for the constituents after we write them
955  edm::OrphanHandle<reco::PFCandidateCollection> constituentHandleAfterPut;
956 
957  // Loop over the jets and extract constituents
958  std::vector<fastjet::PseudoJet> constituentsSub;
959  std::vector<fastjet::PseudoJet>::const_iterator it = fjJets_.begin(), iEnd = fjJets_.end(), iBegin = fjJets_.begin();
960  indices.resize(fjJets_.size());
961 
962  for (; it != iEnd; ++it) {
963  fastjet::PseudoJet const& localJet = *it;
964  unsigned int jetIndex = it - iBegin;
965  // Get the 4-vector for the hard jet
966  p4_Jets.push_back(math::XYZTLorentzVector(localJet.px(), localJet.py(), localJet.pz(), localJet.e()));
967  double localJetArea = 0.0;
968  if (doAreaFastjet_ && localJet.has_area()) {
969  localJetArea = localJet.area();
970  }
971  area_Jets.push_back(localJetArea);
972 
973  // create the constituent list
974  std::vector<fastjet::PseudoJet> constituents, ghosts;
975  if (it->has_pieces())
976  constituents = it->pieces();
977  else if (it->has_constituents())
978  fastjet::SelectorIsPureGhost().sift(it->constituents(), ghosts, constituents); //filter out ghosts
979 
980  //loop over constituents of jet (can be subjets or normal constituents)
981  indices[jetIndex].reserve(constituents.size());
982  constituentsSub.reserve(constituentsSub.size() + constituents.size());
983  for (fastjet::PseudoJet const& constit : constituents) {
984  indices[jetIndex].push_back(constituentsSub.size());
985  constituentsSub.push_back(constit);
986  }
987  }
988 
989  //Loop over constituents and store in the event
990  static const reco::PFCandidate dummySinceTranslateIsNotStatic;
991  for (fastjet::PseudoJet const& constit : constituentsSub) {
992  auto orig = inputs_[constit.user_index()];
993  auto id = dummySinceTranslateIsNotStatic.translatePdgIdToType(orig->pdgId());
994  reco::PFCandidate pCand(reco::PFCandidate(orig->charge(), orig->p4(), id));
996  pVec.SetPxPyPzE(constit.px(), constit.py(), constit.pz(), constit.e());
997  pCand.setP4(pVec);
998  pCand.setSourceCandidatePtr(orig->sourceCandidatePtr(0));
999  constituentCollection->push_back(pCand);
1000  }
1001  // put constituents into event record
1002  constituentHandleAfterPut = iEvent.put(std::move(constituentCollection), jetCollInstanceName_);
1003 
1004  // Now create the jets with ptr's to the constituents
1005  std::vector<math::XYZTLorentzVector>::const_iterator ip4 = p4_Jets.begin(), ip4Begin = p4_Jets.begin(),
1006  ip4End = p4_Jets.end();
1007 
1008  for (; ip4 != ip4End; ++ip4) {
1009  int p4_index = ip4 - ip4Begin;
1010  std::vector<int>& ind = indices[p4_index];
1011  std::vector<reco::CandidatePtr> i_jetConstituents;
1012  // Add the constituents to the jet
1013  for (std::vector<int>::const_iterator iconst = ind.begin(); iconst != ind.end(); ++iconst) {
1014  reco::CandidatePtr candPtr(constituentHandleAfterPut, *iconst, false);
1015  i_jetConstituents.push_back(candPtr);
1016  }
1017  if (!i_jetConstituents.empty()) { //only keep jets which have constituents after subtraction
1018  reco::Particle::Point point(0, 0, 0);
1019  reco::PFJet jet;
1020  reco::writeSpecific(jet, *ip4, point, i_jetConstituents);
1021  jet.setJetArea(area_Jets[ip4 - ip4Begin]);
1022  jetCollection->emplace_back(jet);
1023  }
1024  }
1025 
1026  // put jets into event record
1028 }
std::vector< fastjet::PseudoJet > fjJets_
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, CaloGeometry const &geometry, HcalTopology const &topology)
Definition: JetSpecific.cc:32
Jets made from PFObjects.
Definition: PFJet.h:20
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
int iEvent
Definition: GenABIO.cc:224
std::string jetCollInstanceName_
std::vector< edm::Ptr< reco::Candidate > > inputs_
math::XYZPoint Point
point in the space
Definition: Particle.h:25
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:231
def move(src, dest)
Definition: eostools.py:511
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

Member Data Documentation

◆ activeAreaRepeats_

int VirtualJetProducer::activeAreaRepeats_
protected

Definition at line 182 of file VirtualJetProducer.h.

◆ anomalousTowerDef_

std::unique_ptr<AnomalousTower> VirtualJetProducer::anomalousTowerDef_
private

Definition at line 224 of file VirtualJetProducer.h.

◆ applyWeight_

bool VirtualJetProducer::applyWeight_
protected

Definition at line 216 of file VirtualJetProducer.h.

◆ doAreaDiskApprox_

bool VirtualJetProducer::doAreaDiskApprox_
protected

Definition at line 172 of file VirtualJetProducer.h.

◆ doAreaFastjet_

bool VirtualJetProducer::doAreaFastjet_
protected

◆ doFastJetNonUniform_

bool VirtualJetProducer::doFastJetNonUniform_
protected

Definition at line 175 of file VirtualJetProducer.h.

◆ doPUOffsetCorr_

bool VirtualJetProducer::doPUOffsetCorr_
protected

Definition at line 186 of file VirtualJetProducer.h.

◆ doPVCorrection_

bool VirtualJetProducer::doPVCorrection_
protected

Definition at line 163 of file VirtualJetProducer.h.

◆ doRhoFastjet_

bool VirtualJetProducer::doRhoFastjet_
protected

◆ fjActiveArea_

ActiveAreaSpecPtr VirtualJetProducer::fjActiveArea_
protected

Definition at line 195 of file VirtualJetProducer.h.

◆ fjAreaDefinition_

AreaDefinitionPtr VirtualJetProducer::fjAreaDefinition_
protected

◆ fjClusterSeq_

ClusterSequencePtr VirtualJetProducer::fjClusterSeq_
protected

◆ fjInputs_

std::vector<fastjet::PseudoJet> VirtualJetProducer::fjInputs_
protected

◆ fjJetDefinition_

JetDefPtr VirtualJetProducer::fjJetDefinition_
protected

◆ fjJets_

std::vector<fastjet::PseudoJet> VirtualJetProducer::fjJets_
protected

◆ fjPlugin_

PluginPtr VirtualJetProducer::fjPlugin_
protected

Definition at line 194 of file VirtualJetProducer.h.

◆ fjSelector_

SelectorPtr VirtualJetProducer::fjSelector_
protected

Definition at line 197 of file VirtualJetProducer.h.

◆ fromHTTTopJetProducer_

bool VirtualJetProducer::fromHTTTopJetProducer_ = false
protected

Definition at line 215 of file VirtualJetProducer.h.

Referenced by cms::HTTTopJetProducer::HTTTopJetProducer().

◆ geometry_token_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> VirtualJetProducer::geometry_token_
private

Definition at line 221 of file VirtualJetProducer.h.

◆ ghostArea_

double VirtualJetProducer::ghostArea_
protected

Definition at line 183 of file VirtualJetProducer.h.

◆ ghostEtaMax_

double VirtualJetProducer::ghostEtaMax_
protected

Definition at line 181 of file VirtualJetProducer.h.

◆ input_candidatefwdptr_token_

edm::EDGetTokenT<std::vector<edm::FwdPtr<reco::PFCandidate> > > VirtualJetProducer::input_candidatefwdptr_token_
private

Definition at line 228 of file VirtualJetProducer.h.

◆ input_candidateview_token_

edm::EDGetTokenT<reco::CandidateView> VirtualJetProducer::input_candidateview_token_
private

Definition at line 227 of file VirtualJetProducer.h.

◆ input_gencandidatefwdptr_token_

edm::EDGetTokenT<std::vector<edm::FwdPtr<reco::GenParticle> > > VirtualJetProducer::input_gencandidatefwdptr_token_
private

Definition at line 230 of file VirtualJetProducer.h.

◆ input_packedcandidatefwdptr_token_

edm::EDGetTokenT<std::vector<edm::FwdPtr<pat::PackedCandidate> > > VirtualJetProducer::input_packedcandidatefwdptr_token_
private

Definition at line 229 of file VirtualJetProducer.h.

◆ input_packedgencandidatefwdptr_token_

edm::EDGetTokenT<std::vector<edm::FwdPtr<pat::PackedGenParticle> > > VirtualJetProducer::input_packedgencandidatefwdptr_token_
private

Definition at line 231 of file VirtualJetProducer.h.

◆ input_vertex_token_

edm::EDGetTokenT<reco::VertexCollection> VirtualJetProducer::input_vertex_token_
protected

Definition at line 234 of file VirtualJetProducer.h.

Referenced by FastjetJetProducer::produceTrackJets().

◆ input_weights_token_

edm::EDGetTokenT<edm::ValueMap<float> > VirtualJetProducer::input_weights_token_
protected

Definition at line 235 of file VirtualJetProducer.h.

◆ inputEMin_

double VirtualJetProducer::inputEMin_
protected

Definition at line 161 of file VirtualJetProducer.h.

Referenced by cms::SubEventGenJetProducer::inputTowers().

◆ inputEtMin_

double VirtualJetProducer::inputEtMin_
protected

Definition at line 160 of file VirtualJetProducer.h.

Referenced by cms::SubEventGenJetProducer::inputTowers().

◆ inputs_

std::vector<edm::Ptr<reco::Candidate> > VirtualJetProducer::inputs_
protected

◆ jetAlgorithm_

std::string VirtualJetProducer::jetAlgorithm_
protected

Definition at line 158 of file VirtualJetProducer.h.

◆ jetCollInstanceName_

std::string VirtualJetProducer::jetCollInstanceName_
protected

Definition at line 206 of file VirtualJetProducer.h.

Referenced by cms::CompoundJetProducer::writeCompoundJets().

◆ jetPtMin_

double VirtualJetProducer::jetPtMin_
protected

◆ jetType_

std::string VirtualJetProducer::jetType_
protected

Definition at line 157 of file VirtualJetProducer.h.

◆ jetTypeE

JetType::Type VirtualJetProducer::jetTypeE
protected

◆ maxInputs_

unsigned int VirtualJetProducer::maxInputs_
protected

Definition at line 167 of file VirtualJetProducer.h.

◆ minSeed_

unsigned int VirtualJetProducer::minSeed_
protected

Definition at line 212 of file VirtualJetProducer.h.

◆ moduleLabel_

std::string VirtualJetProducer::moduleLabel_
protected

◆ nExclude_

unsigned int VirtualJetProducer::nExclude_
protected

Definition at line 204 of file VirtualJetProducer.h.

◆ puCenters_

std::vector<double> VirtualJetProducer::puCenters_
protected

Definition at line 202 of file VirtualJetProducer.h.

◆ puSubtractorName_

std::string VirtualJetProducer::puSubtractorName_
protected

Definition at line 187 of file VirtualJetProducer.h.

◆ puWidth_

double VirtualJetProducer::puWidth_
protected

Definition at line 203 of file VirtualJetProducer.h.

◆ restrictInputs_

bool VirtualJetProducer::restrictInputs_
protected

Definition at line 166 of file VirtualJetProducer.h.

◆ rhoEtaMax_

double VirtualJetProducer::rhoEtaMax_
protected

Definition at line 180 of file VirtualJetProducer.h.

◆ rParam_

double VirtualJetProducer::rParam_
protected

Definition at line 159 of file VirtualJetProducer.h.

◆ src_

edm::InputTag VirtualJetProducer::src_
protected

◆ srcPVs_

edm::InputTag VirtualJetProducer::srcPVs_
protected

Definition at line 156 of file VirtualJetProducer.h.

◆ subtractor_

std::shared_ptr<PileUpSubtractor> VirtualJetProducer::subtractor_
protected

Definition at line 209 of file VirtualJetProducer.h.

◆ topology_token_

edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> VirtualJetProducer::topology_token_
private

Definition at line 222 of file VirtualJetProducer.h.

◆ useDeterministicSeed_

bool VirtualJetProducer::useDeterministicSeed_
protected

Definition at line 211 of file VirtualJetProducer.h.

◆ useExplicitGhosts_

bool VirtualJetProducer::useExplicitGhosts_
protected

Definition at line 171 of file VirtualJetProducer.h.

Referenced by FastjetJetProducer::FastjetJetProducer().

◆ verbosity_

int VirtualJetProducer::verbosity_
protected

Definition at line 214 of file VirtualJetProducer.h.

Referenced by FastjetJetProducer::runAlgorithm().

◆ vertex_

reco::Particle::Point VirtualJetProducer::vertex_
protected

◆ voronoiRfact_

double VirtualJetProducer::voronoiRfact_
protected

◆ weights_

edm::ValueMap<float> VirtualJetProducer::weights_
protected

Definition at line 217 of file VirtualJetProducer.h.

◆ writeCompound_

bool VirtualJetProducer::writeCompound_
protected

Definition at line 207 of file VirtualJetProducer.h.

◆ writeJetsWithConst_

bool VirtualJetProducer::writeJetsWithConst_
protected

Definition at line 208 of file VirtualJetProducer.h.