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 1040 of file VirtualJetProducer.cc.

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

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

◆ fillDescriptionsFromVirtualJetProducer()

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

Definition at line 1052 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().

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

◆ 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 1031 of file VirtualJetProducer.cc.

References edm::EventSetup::getData().

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

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

◆ getTopology()

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

Definition at line 1035 of file VirtualJetProducer.cc.

References edm::EventSetup::getData().

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

1035  {
1036  return iSetup.getData(topology_token_);
1037 }
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 791 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().

791  {
792  if (verbosity_ >= 1) {
793  std::cout << "<VirtualJetProducer::writeCompoundJets (moduleLabel = " << moduleLabel_ << ")>:" << std::endl;
794  }
795 
796  // get a list of output jets
797  auto jetCollection = std::make_unique<reco::BasicJetCollection>();
798  // get a list of output subjets
799  auto subjetCollection = std::make_unique<std::vector<T>>();
800 
801  // This will store the handle for the subjets after we write them
802  edm::OrphanHandle<std::vector<T>> subjetHandleAfterPut;
803  // this is the mapping of subjet to hard jet
804  std::vector<std::vector<int>> indices;
805  // this is the list of hardjet 4-momenta
806  std::vector<math::XYZTLorentzVector> p4_hardJets;
807  // this is the hardjet areas
808  std::vector<double> area_hardJets;
809 
810  // Loop over the hard jets
811  std::vector<fastjet::PseudoJet>::const_iterator it = fjJets_.begin(), iEnd = fjJets_.end(), iBegin = fjJets_.begin();
812  indices.resize(fjJets_.size());
813  for (; it != iEnd; ++it) {
814  fastjet::PseudoJet const& localJet = *it;
815  unsigned int jetIndex = it - iBegin;
816  // Get the 4-vector for the hard jet
817  p4_hardJets.push_back(math::XYZTLorentzVector(localJet.px(), localJet.py(), localJet.pz(), localJet.e()));
818  double localJetArea = 0.0;
819  if (doAreaFastjet_ && localJet.has_area()) {
820  localJetArea = localJet.area();
821  }
822  area_hardJets.push_back(localJetArea);
823 
824  // create the subjet list
825  std::vector<fastjet::PseudoJet> constituents;
826  if (it->has_pieces()) {
827  constituents = it->pieces();
828  } else if (it->has_constituents()) {
829  constituents = it->constituents();
830  }
831 
832  std::vector<fastjet::PseudoJet>::const_iterator itSubJetBegin = constituents.begin(), itSubJet = itSubJetBegin,
833  itSubJetEnd = constituents.end();
834  for (; itSubJet != itSubJetEnd; ++itSubJet) {
835  fastjet::PseudoJet const& subjet = *itSubJet;
836  if (verbosity_ >= 1) {
837  std::cout << "subjet #" << (itSubJet - itSubJetBegin) << ": Pt = " << subjet.pt() << ", eta = " << subjet.eta()
838  << ", phi = " << subjet.phi() << ", mass = " << subjet.m()
839  << " (#constituents = " << subjet.constituents().size() << ")" << std::endl;
840  std::vector<fastjet::PseudoJet> subjet_constituents = subjet.constituents();
841  int idx_constituent = 0;
842  for (std::vector<fastjet::PseudoJet>::const_iterator constituent = subjet_constituents.begin();
843  constituent != subjet_constituents.end();
844  ++constituent) {
845  if (constituent->pt() < 1.e-3)
846  continue; // CV: skip ghosts
847  std::cout << " constituent #" << idx_constituent << ": Pt = " << constituent->pt()
848  << ", eta = " << constituent->eta() << ", phi = " << constituent->phi() << ","
849  << " mass = " << constituent->m() << std::endl;
850  ++idx_constituent;
851  }
852  }
853 
854  if (verbosity_ >= 1) {
855  std::cout << "subjet #" << (itSubJet - itSubJetBegin) << ": Pt = " << subjet.pt() << ", eta = " << subjet.eta()
856  << ", phi = " << subjet.phi() << ", mass = " << subjet.m()
857  << " (#constituents = " << subjet.constituents().size() << ")" << std::endl;
858  std::vector<fastjet::PseudoJet> subjet_constituents = subjet.constituents();
859  int idx_constituent = 0;
860  for (std::vector<fastjet::PseudoJet>::const_iterator constituent = subjet_constituents.begin();
861  constituent != subjet_constituents.end();
862  ++constituent) {
863  if (constituent->pt() < 1.e-3)
864  continue; // CV: skip ghosts
865  std::cout << " constituent #" << idx_constituent << ": Pt = " << constituent->pt()
866  << ", eta = " << constituent->eta() << ", phi = " << constituent->phi() << ","
867  << " mass = " << constituent->m() << std::endl;
868  ++idx_constituent;
869  }
870  }
871 
872  math::XYZTLorentzVector p4Subjet(subjet.px(), subjet.py(), subjet.pz(), subjet.e());
873  reco::Particle::Point point(0, 0, 0);
874 
875  // This will hold ptr's to the subjets
876  std::vector<reco::CandidatePtr> subjetConstituents;
877 
878  // Get the transient subjet constituents from fastjet
879  std::vector<fastjet::PseudoJet> subjetFastjetConstituents = subjet.constituents();
880  std::vector<reco::CandidatePtr> constituents = getConstituents(subjetFastjetConstituents);
881 
882  indices[jetIndex].push_back(subjetCollection->size());
883 
884  // Add the concrete subjet type to the subjet list to write to event record
885  subjetCollection->push_back(*std::make_unique<T>());
886  auto& jet = subjetCollection->back();
887  if ((applyWeight_) && (makePFJet(jetTypeE)))
888  reco::writeSpecific(dynamic_cast<reco::PFJet&>(jet), p4Subjet, point, constituents, &weights_);
889  else if constexpr (std::is_same_v<T, reco::CaloJet>) {
891  jet, p4Subjet, point, constituents, iSetup.getData(geometry_token_), iSetup.getData(topology_token_));
892  } else {
893  reco::writeSpecific(jet, p4Subjet, point, constituents);
894  }
895  jet.setIsWeighted(applyWeight_);
896  double subjetArea = 0.0;
897  if (doAreaFastjet_ && itSubJet->has_area()) {
898  subjetArea = itSubJet->area();
899  }
900  jet.setJetArea(subjetArea);
901  }
902  }
903 
904  // put subjets into event record
905  subjetHandleAfterPut = iEvent.put(std::move(subjetCollection), jetCollInstanceName_);
906 
907  // Now create the hard jets with ptr's to the subjets as constituents
908  std::vector<math::XYZTLorentzVector>::const_iterator ip4 = p4_hardJets.begin(), ip4Begin = p4_hardJets.begin(),
909  ip4End = p4_hardJets.end();
910 
911  for (; ip4 != ip4End; ++ip4) {
912  int p4_index = ip4 - ip4Begin;
913  std::vector<int>& ind = indices[p4_index];
914  std::vector<reco::CandidatePtr> i_hardJetConstituents;
915  // Add the subjets to the hard jet
916  for (std::vector<int>::const_iterator isub = ind.begin(); isub != ind.end(); ++isub) {
917  reco::CandidatePtr candPtr(subjetHandleAfterPut, *isub, false);
918  i_hardJetConstituents.push_back(candPtr);
919  }
920  reco::Particle::Point point(0, 0, 0);
921  reco::BasicJet toput(*ip4, point, i_hardJetConstituents);
922  toput.setJetArea(area_hardJets[ip4 - ip4Begin]);
923  jetCollection->push_back(toput);
924  }
925 
926  // put hard jets into event record
927  // Store the Orphan handle for adding HTT information
929 
932  }
933 }
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(), suppress, 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() == 1 ? 1 : fjJets_.size() * (fjJets_.size() >> 1));
689  std::vector<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  [[clang::suppress]] distance[jJet].first =
758  std::sqrt(reco::deltaR2(etaJ[ijet], phiJ[ijet], etaJ[jJet], phiJ[jJet])) * orParam_;
760  jetArea -= distance[jJet].second;
761  for (unsigned kJet = 0; kJet < jJet; ++kJet) {
763  distance[kJet].first,
764  rij[jJet][kJet].first,
765  distance[jJet].second,
766  distance[kJet].second,
767  rij[jJet][kJet].second);
768  } // end loop over harder jets
769  } // end loop over harder jets
770  jetArea *= (rParam_ * rParam_);
771  }
772  auto& jet = (*jets)[ijet];
773  jet.setJetArea(jetArea);
774 
775  if (doPUOffsetCorr_) {
776  jet.setPileup(subtractor_->getPileUpEnergy(ijet));
777  } else {
778  jet.setPileup(0.0);
779  }
780 
781  // std::cout << "area " << ijet << " " << jetArea << " " << Area<T>::get(jet) << std::endl;
782  // std::cout << "JetVI " << ijet << ' '<< jet.pt() << " " << jet.et() << ' '<< jet.energy() << ' '<< jet.mass() << std::endl;
783  }
784  }
785  // put the jets in the collection
787 }
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 937 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().

937  {
938  if (verbosity_ >= 1) {
939  std::cout << "<VirtualJetProducer::writeJetsWithConstituents (moduleLabel = " << moduleLabel_ << ")>:" << std::endl;
940  }
941 
942  // get a list of output jets MV: make this compatible with template
943  auto jetCollection = std::make_unique<reco::PFJetCollection>();
944 
945  // this is the mapping of jet to constituents
946  std::vector<std::vector<int>> indices;
947  // this is the list of jet 4-momenta
948  std::vector<math::XYZTLorentzVector> p4_Jets;
949  // this is the jet areas
950  std::vector<double> area_Jets;
951 
952  // get a list of output constituents
953  auto constituentCollection = std::make_unique<reco::PFCandidateCollection>();
954 
955  // This will store the handle for the constituents after we write them
956  edm::OrphanHandle<reco::PFCandidateCollection> constituentHandleAfterPut;
957 
958  // Loop over the jets and extract constituents
959  std::vector<fastjet::PseudoJet> constituentsSub;
960  std::vector<fastjet::PseudoJet>::const_iterator it = fjJets_.begin(), iEnd = fjJets_.end(), iBegin = fjJets_.begin();
961  indices.resize(fjJets_.size());
962 
963  for (; it != iEnd; ++it) {
964  fastjet::PseudoJet const& localJet = *it;
965  unsigned int jetIndex = it - iBegin;
966  // Get the 4-vector for the hard jet
967  p4_Jets.push_back(math::XYZTLorentzVector(localJet.px(), localJet.py(), localJet.pz(), localJet.e()));
968  double localJetArea = 0.0;
969  if (doAreaFastjet_ && localJet.has_area()) {
970  localJetArea = localJet.area();
971  }
972  area_Jets.push_back(localJetArea);
973 
974  // create the constituent list
975  std::vector<fastjet::PseudoJet> constituents, ghosts;
976  if (it->has_pieces())
977  constituents = it->pieces();
978  else if (it->has_constituents())
979  fastjet::SelectorIsPureGhost().sift(it->constituents(), ghosts, constituents); //filter out ghosts
980 
981  //loop over constituents of jet (can be subjets or normal constituents)
982  indices[jetIndex].reserve(constituents.size());
983  constituentsSub.reserve(constituentsSub.size() + constituents.size());
984  for (fastjet::PseudoJet const& constit : constituents) {
985  indices[jetIndex].push_back(constituentsSub.size());
986  constituentsSub.push_back(constit);
987  }
988  }
989 
990  //Loop over constituents and store in the event
991  static const reco::PFCandidate dummySinceTranslateIsNotStatic;
992  for (fastjet::PseudoJet const& constit : constituentsSub) {
993  auto orig = inputs_[constit.user_index()];
994  auto id = dummySinceTranslateIsNotStatic.translatePdgIdToType(orig->pdgId());
995  reco::PFCandidate pCand(reco::PFCandidate(orig->charge(), orig->p4(), id));
997  pVec.SetPxPyPzE(constit.px(), constit.py(), constit.pz(), constit.e());
998  pCand.setP4(pVec);
999  pCand.setSourceCandidatePtr(orig->sourceCandidatePtr(0));
1000  constituentCollection->push_back(pCand);
1001  }
1002  // put constituents into event record
1003  constituentHandleAfterPut = iEvent.put(std::move(constituentCollection), jetCollInstanceName_);
1004 
1005  // Now create the jets with ptr's to the constituents
1006  std::vector<math::XYZTLorentzVector>::const_iterator ip4 = p4_Jets.begin(), ip4Begin = p4_Jets.begin(),
1007  ip4End = p4_Jets.end();
1008 
1009  for (; ip4 != ip4End; ++ip4) {
1010  int p4_index = ip4 - ip4Begin;
1011  std::vector<int>& ind = indices[p4_index];
1012  std::vector<reco::CandidatePtr> i_jetConstituents;
1013  // Add the constituents to the jet
1014  for (std::vector<int>::const_iterator iconst = ind.begin(); iconst != ind.end(); ++iconst) {
1015  reco::CandidatePtr candPtr(constituentHandleAfterPut, *iconst, false);
1016  i_jetConstituents.push_back(candPtr);
1017  }
1018  if (!i_jetConstituents.empty()) { //only keep jets which have constituents after subtraction
1019  reco::Particle::Point point(0, 0, 0);
1020  reco::PFJet jet;
1021  reco::writeSpecific(jet, *ip4, point, i_jetConstituents);
1022  jet.setJetArea(area_Jets[ip4 - ip4Begin]);
1023  jetCollection->emplace_back(jet);
1024  }
1025  }
1026 
1027  // put jets into event record
1029 }
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.