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<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper cms::CompoundJetProducer cms::CSJetProducer cms::SubEventGenJetProducer CMSInsideOutJetProducer FastjetJetProducer SubjetFilterJetProducer cms::SubJetProducer cms::CATopJetProducer cms::HTTTopJetProducer

Classes

struct  JetType
 

Public Types

typedef boost::shared_ptr< fastjet::GhostedAreaSpec > ActiveAreaSpecPtr
 
typedef boost::shared_ptr< fastjet::AreaDefinition > AreaDefinitionPtr
 
typedef boost::shared_ptr< fastjet::ClusterSequence > ClusterSequencePtr
 
typedef boost::shared_ptr< fastjet::JetDefinition > JetDefPtr
 
typedef boost::shared_ptr< fastjet::JetDefinition::Plugin > PluginPtr
 
typedef boost::shared_ptr< fastjet::RangeDefinition > RangeDefPtr
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

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
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fillDescriptionsFromVirtualJetProducer (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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)
 
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 Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Protected Attributes

int activeAreaRepeats_
 
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_
 
RangeDefPtr fjRangeDef_
 
bool fromHTTTopJetProducer_
 
double ghostArea_
 
double ghostEtaMax_
 
edm::EDGetTokenT< reco::VertexCollectioninput_vertex_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_
 
boost::shared_ptr< PileUpSubtractorsubtractor_
 
bool useDeterministicSeed_
 
bool useExplicitGhosts_
 
int verbosity_
 
reco::Particle::Point vertex_
 
double voronoiRfact_
 
bool writeCompound_
 
bool writeJetsWithConst_
 

Private Attributes

std::auto_ptr< AnomalousToweranomalousTowerDef_
 
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_
 

Detailed Description

Definition at line 36 of file VirtualJetProducer.h.

Member Typedef Documentation

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

Definition at line 91 of file VirtualJetProducer.h.

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

Definition at line 92 of file VirtualJetProducer.h.

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

Definition at line 88 of file VirtualJetProducer.h.

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

Definition at line 90 of file VirtualJetProducer.h.

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

Definition at line 89 of file VirtualJetProducer.h.

typedef boost::shared_ptr<fastjet::RangeDefinition> VirtualJetProducer::RangeDefPtr

Definition at line 93 of file VirtualJetProducer.h.

Constructor & Destructor Documentation

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

Definition at line 127 of file VirtualJetProducer.cc.

References diMuonSkim_cfi::byName, Exception, reco::get(), and edm::ParameterSet::getParameter().

127  {
128 
129  moduleLabel_ = iConfig.getParameter<string> ("@module_label");
130  src_ = iConfig.getParameter<edm::InputTag>("src");
131  srcPVs_ = iConfig.getParameter<edm::InputTag>("srcPVs");
132  jetType_ = iConfig.getParameter<string> ("jetType");
133  jetAlgorithm_ = iConfig.getParameter<string> ("jetAlgorithm");
134  rParam_ = iConfig.getParameter<double> ("rParam");
135  inputEtMin_ = iConfig.getParameter<double> ("inputEtMin");
136  inputEMin_ = iConfig.getParameter<double> ("inputEMin");
137  jetPtMin_ = iConfig.getParameter<double> ("jetPtMin");
138  doPVCorrection_ = iConfig.getParameter<bool> ("doPVCorrection");
139  doAreaFastjet_ = iConfig.getParameter<bool> ("doAreaFastjet");
140  doRhoFastjet_ = iConfig.getParameter<bool> ("doRhoFastjet");
141  jetCollInstanceName_ = iConfig.getParameter<string> ("jetCollInstanceName");
142  doPUOffsetCorr_ = iConfig.getParameter<bool> ("doPUOffsetCorr");
143  puSubtractorName_ = iConfig.getParameter<string> ("subtractorName");
144  useExplicitGhosts_ = iConfig.getParameter<bool> ("useExplicitGhosts"); // use explicit ghosts in the fastjet clustering sequence?
145  doAreaDiskApprox_ = iConfig.getParameter<bool> ("doAreaDiskApprox");
146  voronoiRfact_ = iConfig.getParameter<double> ("voronoiRfact"); // Voronoi-based area calculation allows for an empirical scale factor
147  rhoEtaMax_ = iConfig.getParameter<double> ("Rho_EtaMax"); // do fasjet area / rho calcluation? => accept corresponding parameters
148  ghostEtaMax_ = iConfig.getParameter<double> ("Ghost_EtaMax");
149  activeAreaRepeats_ = iConfig.getParameter<int> ("Active_Area_Repeats");
150  ghostArea_ = iConfig.getParameter<double> ("GhostArea");
151  restrictInputs_ = iConfig.getParameter<bool> ("restrictInputs"); // restrict inputs to first "maxInputs" towers?
152  maxInputs_ = iConfig.getParameter<unsigned int>("maxInputs");
153  writeCompound_ = iConfig.getParameter<bool> ("writeCompound"); // Check to see if we are writing compound jets for substructure and jet grooming
154  writeJetsWithConst_ = iConfig.getParameter<bool>("writeJetsWithConst"); //write subtracted jet constituents
155  doFastJetNonUniform_ = iConfig.getParameter<bool> ("doFastJetNonUniform");
156  puCenters_ = iConfig.getParameter<vector<double> >("puCenters");
157  puWidth_ = iConfig.getParameter<double> ("puWidth");
158  nExclude_ = iConfig.getParameter<unsigned int>("nExclude");
159  useDeterministicSeed_ = iConfig.getParameter<bool> ("useDeterministicSeed");
160  minSeed_ = iConfig.getParameter<unsigned int>("minSeed");
161  verbosity_ = iConfig.getParameter<int> ("verbosity");
162 
163  anomalousTowerDef_ = auto_ptr<AnomalousTower>(new AnomalousTower(iConfig));
164 
165  input_vertex_token_ = consumes<reco::VertexCollection>(srcPVs_);
166  input_candidateview_token_ = consumes<reco::CandidateView>(src_);
167  input_candidatefwdptr_token_ = consumes<vector<edm::FwdPtr<reco::PFCandidate> > >(iConfig.getParameter<edm::InputTag>("src"));
168  input_packedcandidatefwdptr_token_ = consumes<vector<edm::FwdPtr<pat::PackedCandidate> > >(iConfig.getParameter<edm::InputTag>("src"));
169  input_gencandidatefwdptr_token_ = consumes<vector<edm::FwdPtr<reco::GenParticle> > >(iConfig.getParameter<edm::InputTag>("src"));
170  input_packedgencandidatefwdptr_token_ = consumes<vector<edm::FwdPtr<pat::PackedGenParticle> > >(iConfig.getParameter<edm::InputTag>("src"));
171 
172  //
173  // additional parameters to think about:
174  // - overlap threshold (set to 0.75 for the time being)
175  // - p parameter for generalized kT (set to -2 for the time being)
176  // - fastjet PU subtraction parameters (not yet considered)
177  //
178  if (jetAlgorithm_=="Kt")
179  fjJetDefinition_= JetDefPtr(new fastjet::JetDefinition(fastjet::kt_algorithm,rParam_));
180 
181  else if (jetAlgorithm_=="CambridgeAachen")
182  fjJetDefinition_= JetDefPtr(new fastjet::JetDefinition(fastjet::cambridge_algorithm,rParam_) );
183 
184  else if (jetAlgorithm_=="AntiKt")
185  fjJetDefinition_= JetDefPtr( new fastjet::JetDefinition(fastjet::antikt_algorithm,rParam_) );
186 
187  else if (jetAlgorithm_=="GeneralizedKt")
188  fjJetDefinition_= JetDefPtr( new fastjet::JetDefinition(fastjet::genkt_algorithm,rParam_,-2) );
189 
190  else if (jetAlgorithm_=="SISCone") {
191 
192  fjPlugin_ = PluginPtr( new fastjet::SISConePlugin(rParam_,0.75,0,0.0,false,fastjet::SISConePlugin::SM_pttilde) );
193  fjJetDefinition_= JetDefPtr( new fastjet::JetDefinition(&*fjPlugin_) );
194 
195  } else if (jetAlgorithm_=="IterativeCone") {
196 
197  fjPlugin_ = PluginPtr(new fastjet::CMSIterativeConePlugin(rParam_,1.0));
198  fjJetDefinition_= JetDefPtr(new fastjet::JetDefinition(&*fjPlugin_));
199 
200  } else if (jetAlgorithm_=="CDFMidPoint") {
201 
202  fjPlugin_ = PluginPtr(new fastjet::CDFMidPointPlugin(rParam_,0.75));
203  fjJetDefinition_= JetDefPtr(new fastjet::JetDefinition(&*fjPlugin_));
204 
205  } else if (jetAlgorithm_=="ATLASCone") {
206 
207  fjPlugin_ = PluginPtr(new fastjet::ATLASConePlugin(rParam_));
208  fjJetDefinition_= JetDefPtr(new fastjet::JetDefinition(&*fjPlugin_));
209 
210  } else {
211  throw cms::Exception("Invalid jetAlgorithm") <<"Jet algorithm for VirtualJetProducer is invalid, Abort!\n";
212  }
213 
215 
216  if ( doPUOffsetCorr_ ) {
217  if(puSubtractorName_.empty()){
218  LogWarning("VirtualJetProducer") << "Pile Up correction on; however, pile up type is not specified. Using default... \n";
219  subtractor_ = boost::shared_ptr<PileUpSubtractor>(new PileUpSubtractor(iConfig, consumesCollector()));
220  } else subtractor_ = boost::shared_ptr<PileUpSubtractor>(
222  }
223 
224  // do approximate disk-based area calculation => warn if conflicting request
226  throw cms::Exception("Conflicting area calculations") << "Both the calculation of jet area via fastjet and via an analytical disk approximation have been requested. Please decide on one.\n";
227 
228  if ( doAreaFastjet_ || doRhoFastjet_ ) {
229 
230  if (voronoiRfact_ <= 0) {
232  fjActiveArea_->set_fj2_placement(true);
233 
234  if ( !useExplicitGhosts_ ) {
235  fjAreaDefinition_ = AreaDefinitionPtr( new fastjet::AreaDefinition(fastjet::active_area, *fjActiveArea_ ) );
236  } else {
237  fjAreaDefinition_ = AreaDefinitionPtr( new fastjet::AreaDefinition(fastjet::active_area_explicit_ghosts, *fjActiveArea_ ) );
238  }
239  }
240  fjRangeDef_ = RangeDefPtr( new fastjet::RangeDefinition(rhoEtaMax_) );
241  }
242 
243  if( ( doFastJetNonUniform_ ) && ( puCenters_.empty() ) )
244  throw cms::Exception("doFastJetNonUniform") << "Parameter puCenters for doFastJetNonUniform is not defined." << std::endl;
245 
246  // make the "produces" statements
248  produces<vector<double> >("rhos");
249  produces<vector<double> >("sigmas");
250  produces<double>("rho");
251  produces<double>("sigma");
252 
253 
254 }
boost::shared_ptr< fastjet::AreaDefinition > AreaDefinitionPtr
JetType::Type jetTypeE
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::CandidateView > input_candidateview_token_
edm::EDGetTokenT< std::vector< edm::FwdPtr< pat::PackedCandidate > > > input_packedcandidatefwdptr_token_
boost::shared_ptr< fastjet::JetDefinition::Plugin > PluginPtr
std::string puSubtractorName_
std::vector< double > puCenters_
boost::shared_ptr< fastjet::RangeDefinition > RangeDefPtr
std::string jetCollInstanceName_
boost::shared_ptr< PileUpSubtractor > subtractor_
virtual void makeProduces(std::string s, std::string tag="")
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
boost::shared_ptr< fastjet::JetDefinition > JetDefPtr
std::auto_ptr< AnomalousTower > anomalousTowerDef_
ActiveAreaSpecPtr fjActiveArea_
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_
boost::shared_ptr< fastjet::GhostedAreaSpec > ActiveAreaSpecPtr
AreaDefinitionPtr fjAreaDefinition_
static Type byName(const std::string &name)
T get(const Candidate &c)
Definition: component.h:55
VirtualJetProducer::~VirtualJetProducer ( )
override

Definition at line 257 of file VirtualJetProducer.cc.

258 {
259 }

Member Function Documentation

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

Reimplemented in cms::HTTTopJetProducer.

Definition at line 130 of file VirtualJetProducer.h.

References convertSQLitetoXML_cfg::output.

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

Definition at line 505 of file VirtualJetProducer.cc.

References reco::CompositePtrCandidate::addDaughter(), mps_fire::i, and diffTreeTool::index.

507 {
508  for (unsigned int i=0;i<fjConstituents.size();++i) {
509  int index = fjConstituents[i].user_index();
510  if ( index >= 0 && static_cast<unsigned int>(index) < inputs_.size() )
511  jet->addDaughter(inputs_[index]);
512  }
513 }
std::vector< edm::Ptr< reco::Candidate > > inputs_
void addDaughter(const CandidatePtr &)
add a daughter via a reference
void VirtualJetProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 997 of file VirtualJetProducer.cc.

References edm::ParameterSetDescription::add(), and edm::ConfigurationDescriptions::addDefault().

997  {
998 
1001  desc.add<string>("jetCollInstanceName", "" );
1002 
1003  // addDefault must be used here instead of add unless
1004  // all the classes that inherit from this class redefine
1005  // the fillDescriptions function. Otherwise, the autogenerated
1006  // cfi filenames are the same and conflict.
1007  descriptions.addDefault(desc);
1008 }
void addDefault(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptionsFromVirtualJetProducer(edm::ParameterSetDescription &desc)
void VirtualJetProducer::fillDescriptionsFromVirtualJetProducer ( edm::ParameterSetDescription desc)
static

Definition at line 1010 of file VirtualJetProducer.cc.

References edm::ParameterSetDescription::add(), and funct::false.

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

1011 {
1012  desc.add<edm::InputTag>("src", edm::InputTag("particleFlow") );
1013  desc.add<edm::InputTag>("srcPVs", edm::InputTag("") );
1014  desc.add<string>("jetType", "PFJet" );
1015  desc.add<string>("jetAlgorithm", "AntiKt" );
1016  desc.add<double>("rParam", 0.4 );
1017  desc.add<double>("inputEtMin", 0.0 );
1018  desc.add<double>("inputEMin", 0.0 );
1019  desc.add<double>("jetPtMin", 5. );
1020  desc.add<bool> ("doPVCorrection", false );
1021  desc.add<bool> ("doAreaFastjet", false );
1022  desc.add<bool> ("doRhoFastjet", false );
1023  desc.add<bool> ("doPUOffsetCorr", false );
1024  desc.add<double>("puPtMin", 10.);
1025  desc.add<double>("nSigmaPU", 1.0 );
1026  desc.add<double>("radiusPU", 0.5 );
1027  desc.add<string>("subtractorName", "" );
1028  desc.add<bool> ("useExplicitGhosts", false );
1029  desc.add<bool> ("doAreaDiskApprox", false );
1030  desc.add<double>("voronoiRfact", -0.9 );
1031  desc.add<double>("Rho_EtaMax", 4.4 );
1032  desc.add<double>("Ghost_EtaMax", 5. );
1033  desc.add<int> ("Active_Area_Repeats", 1 );
1034  desc.add<double>("GhostArea", 0.01 );
1035  desc.add<bool> ("restrictInputs", false );
1036  desc.add<unsigned int> ("maxInputs", 1 );
1037  desc.add<bool> ("writeCompound", false );
1038  desc.add<bool> ("writeJetsWithConst", false );
1039  desc.add<bool> ("doFastJetNonUniform", false );
1040  desc.add<bool> ("useDeterministicSeed",false );
1041  desc.add<unsigned int> ("minSeed", 14327 );
1042  desc.add<int> ("verbosity", 0 );
1043  desc.add<double>("puWidth", 0. );
1044  desc.add<unsigned int>("nExclude", 0 );
1045  desc.add<unsigned int>("maxBadEcalCells", 9999999 );
1046  desc.add<unsigned int>("maxBadHcalCells", 9999999 );
1047  desc.add<unsigned int>("maxProblematicEcalCells", 9999999 );
1048  desc.add<unsigned int>("maxProblematicHcalCells", 9999999 );
1049  desc.add<unsigned int>("maxRecoveredEcalCells", 9999999 );
1050  desc.add<unsigned int>("maxRecoveredHcalCells", 9999999 );
1051  vector<double> puCentersDefault;
1052  desc.add<vector<double>>("puCenters", puCentersDefault);
1053 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
vector< reco::CandidatePtr > VirtualJetProducer::getConstituents ( const std::vector< fastjet::PseudoJet > &  fjConstituents)
protectedvirtual

Definition at line 518 of file VirtualJetProducer.cc.

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

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

519 {
520  vector<reco::CandidatePtr> result; result.reserve(fjConstituents.size()/2);
521  for (unsigned int i=0;i<fjConstituents.size();i++) {
522  auto index = fjConstituents[i].user_index();
523  if ( index >= 0 && static_cast<unsigned int>(index) < inputs_.size() ) {
524  result.emplace_back(inputs_[index]);
525  }
526  }
527  return result;
528 }
std::vector< edm::Ptr< reco::Candidate > > inputs_
void VirtualJetProducer::inputTowers ( )
protectedvirtual

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

Definition at line 446 of file VirtualJetProducer.cc.

References geometryDiff::epsilon, mps_fire::i, input, edm::isNotFinite(), and CaloTower::p4().

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

447 {
448  auto inBegin = inputs_.begin(),
449  inEnd = inputs_.end(), i = inBegin;
450  for (; i != inEnd; ++i ) {
451  auto const & input = **i;
452  // std::cout << "CaloTowerVI jets " << input->pt() << " " << input->et() << ' '<< input->energy() << ' ' << (isAnomalousTower(input) ? " bad" : " ok") << std::endl;
453  if (edm::isNotFinite(input.pt())) continue;
454  if (input.et() <inputEtMin_) continue;
455  if (input.energy()<inputEMin_) continue;
456  if (isAnomalousTower(*i)) continue;
457  // Change by SRR : this is no longer an error nor warning, this can happen with PU mitigation algos.
458  // Also switch to something more numerically safe. (VI: 10^-42GeV????)
459  if (input.pt() < 100 * std::numeric_limits<double>::epsilon() ) {
460  continue;
461  }
463  const CaloTower & tower = dynamic_cast<const CaloTower &>(input);
464  auto const & ct = tower.p4(vertex_); // very expensive as computed in eta/phi
465  fjInputs_.emplace_back(ct.px(),ct.py(),ct.pz(),ct.energy());
466  //std::cout << "tower:" << *tower << '\n';
467  }
468  else {
469  /*
470  if(makePFJet(jetTypeE)) {
471  reco::PFCandidate& pfc = (reco::PFCandidate&)input;
472  std::cout << "PF cand:" << pfc << '\n';
473  }
474  */
475  fjInputs_.emplace_back(input.px(),input.py(),input.pz(),
476  input.energy());
477  }
478  fjInputs_.back().set_user_index(i - inBegin);
479  }
480 
481  if ( restrictInputs_ && fjInputs_.size() > maxInputs_ ) {
483  std::sort(fjInputs_.begin(), fjInputs_.end(), pTComparator);
484  fjInputs_.resize(maxInputs_);
485  edm::LogWarning("JetRecoTooManyEntries") << "Too many inputs in the event, limiting to first " << maxInputs_ << ". Output is suspect.";
486  }
487 }
JetType::Type jetTypeE
reco::Particle::Point vertex_
math::PtEtaPhiMLorentzVector p4(double vtxZ) const
Definition: CaloTower.cc:129
static std::string const input
Definition: EdmProvDump.cc:44
virtual bool isAnomalousTower(reco::CandidatePtr input)
std::vector< fastjet::PseudoJet > fjInputs_
bool isNotFinite(T x)
Definition: isFinite.h:10
std::vector< edm::Ptr< reco::Candidate > > inputs_
bool makeCaloJet(const JetType::Type &fTag)
bool VirtualJetProducer::isAnomalousTower ( reco::CandidatePtr  input)
protectedvirtual

Definition at line 490 of file VirtualJetProducer.cc.

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

491 {
492  if (!makeCaloJet(jetTypeE))
493  return false;
494  else
495  return (*anomalousTowerDef_)(*input);
496 }
JetType::Type jetTypeE
std::auto_ptr< AnomalousTower > anomalousTowerDef_
bool makeCaloJet(const JetType::Type &fTag)
std::string VirtualJetProducer::jetType ( ) const
inline
bool VirtualJetProducer::makeBasicJet ( const JetType::Type fTag)
inlineprotected

Definition at line 73 of file VirtualJetProducer.h.

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

Definition at line 58 of file VirtualJetProducer.h.

References btagElecInJet_cfi::CaloJet.

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

Definition at line 64 of file VirtualJetProducer.h.

References nanoDQM_cfi::GenJet.

64  {
65  return fTag == JetType::GenJet;
66  }
bool VirtualJetProducer::makePFClusterJet ( const JetType::Type fTag)
inlineprotected

Definition at line 70 of file VirtualJetProducer.h.

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

Definition at line 61 of file VirtualJetProducer.h.

61  {
62  return fTag == JetType::PFJet;
63  }
void VirtualJetProducer::makeProduces ( std::string  s,
std::string  tag = "" 
)
protectedvirtual

Definition at line 89 of file VirtualJetProducer.cc.

References GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by SubjetFilterJetProducer::SubjetFilterJetProducer().

90 {
91 
92 
93  if ( writeCompound_ ) {
94  produces<reco::BasicJetCollection>();
95  }
96 
97  if ( writeJetsWithConst_ ) {
98  produces<reco::PFCandidateCollection>(tag).setBranchAlias(alias);
99  produces<reco::PFJetCollection>();
100  } else {
101  if (makeCaloJet(jetTypeE)) {
102  produces<reco::CaloJetCollection>(tag).setBranchAlias(alias);
103  }
104  else if (makePFJet(jetTypeE)) {
105  produces<reco::PFJetCollection>(tag).setBranchAlias(alias);
106  }
107  else if (makeGenJet(jetTypeE)) {
108  produces<reco::GenJetCollection>(tag).setBranchAlias(alias);
109  }
110  else if (makeTrackJet(jetTypeE)) {
111  produces<reco::TrackJetCollection>(tag).setBranchAlias(alias);
112  }
113  else if (makePFClusterJet(jetTypeE)) {
114  produces<reco::PFClusterJetCollection>(tag).setBranchAlias(alias);
115  }
116  else if (makeBasicJet(jetTypeE)) {
117  produces<reco::BasicJetCollection>(tag).setBranchAlias(alias);
118  }
119  }
120 }
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)
bool VirtualJetProducer::makeTrackJet ( const JetType::Type fTag)
inlineprotected

Definition at line 67 of file VirtualJetProducer.h.

Referenced by FastjetJetProducer::produce().

void VirtualJetProducer::offsetCorrectJets ( std::vector< fastjet::PseudoJet > &  orphanInput)
protected
void VirtualJetProducer::output ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
protectedvirtual

Reimplemented in cms::CompoundJetProducer.

Definition at line 533 of file VirtualJetProducer.cc.

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

534 {
535  // Write jets and constitutents. Will use fjJets_, inputs_
536  // and fjClusterSeq_
537 
538  if ( writeCompound_ ) {
539  // Write jets and subjets
540  switch( jetTypeE ) {
541  case JetType::CaloJet :
542  writeCompoundJets<reco::CaloJet>( iEvent, iSetup );
543  break;
544  case JetType::PFJet :
545  writeCompoundJets<reco::PFJet>( iEvent, iSetup );
546  break;
547  case JetType::GenJet :
548  writeCompoundJets<reco::GenJet>( iEvent, iSetup );
549  break;
550  case JetType::BasicJet :
551  writeCompoundJets<reco::BasicJet>( iEvent, iSetup );
552  break;
553  default:
554  throw cms::Exception("InvalidInput") << "invalid jet type in CompoundJetProducer\n";
555  break;
556  };
557  } else if ( writeJetsWithConst_ ) {
558  // Write jets and new constituents.
559  writeJetsWithConstituents<reco::PFJet>( iEvent, iSetup );
560  } else {
561  switch( jetTypeE ) {
562  case JetType::CaloJet :
563  writeJets<reco::CaloJet>( iEvent, iSetup);
564  break;
565  case JetType::PFJet :
566  writeJets<reco::PFJet>( iEvent, iSetup);
567  break;
568  case JetType::GenJet :
569  writeJets<reco::GenJet>( iEvent, iSetup);
570  break;
571  case JetType::TrackJet :
572  writeJets<reco::TrackJet>( iEvent, iSetup);
573  break;
574  case JetType::PFClusterJet :
575  writeJets<reco::PFClusterJet>( iEvent, iSetup);
576  break;
577  case JetType::BasicJet :
578  writeJets<reco::BasicJet>( iEvent, iSetup);
579  break;
580  default:
581  throw cms::Exception("InvalidInput") << "invalid jet type in VirtualJetProducer\n";
582  break;
583  };
584  }
585 
586 }
JetType::Type jetTypeE
int iEvent
Definition: GenABIO.cc:230
void VirtualJetProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 267 of file VirtualJetProducer.cc.

References edm::View< T >::empty(), edm::EventID::event(), Exception, edm::Event::getByToken(), mps_fire::i, edm::EventBase::id(), LogDebug, SiStripPI::max, convertSQLitetoXML_cfg::output, edm::View< T >::ptrAt(), anotherprimaryvertexanalyzer_cfi::pvCollection, edm::EventID::run(), edm::View< T >::size(), and std::swap().

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

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

function template to write out the outputs

Definition at line 760 of file VirtualJetProducer.cc.

References gather_cfg::cout, metsig::jet, eostools::move(), point, edm::Event::put(), reco::Jet::setJetArea(), and reco::writeSpecific().

761 {
762  if ( verbosity_ >= 1 ) {
763  std::cout << "<VirtualJetProducer::writeCompoundJets (moduleLabel = " << moduleLabel_ << ")>:" << std::endl;
764  }
765 
766  // get a list of output jets
767  auto jetCollection = std::make_unique<reco::BasicJetCollection>();
768  // get a list of output subjets
769  auto subjetCollection = std::make_unique<std::vector<T>>();
770 
771  // This will store the handle for the subjets after we write them
772  edm::OrphanHandle< std::vector<T> > subjetHandleAfterPut;
773  // this is the mapping of subjet to hard jet
774  std::vector< std::vector<int> > indices;
775  // this is the list of hardjet 4-momenta
776  std::vector<math::XYZTLorentzVector> p4_hardJets;
777  // this is the hardjet areas
778  std::vector<double> area_hardJets;
779 
780  // Loop over the hard jets
781  std::vector<fastjet::PseudoJet>::const_iterator it = fjJets_.begin(),
782  iEnd = fjJets_.end(),
783  iBegin = fjJets_.begin();
784  indices.resize( fjJets_.size() );
785  for ( ; it != iEnd; ++it ) {
786  fastjet::PseudoJet const & localJet = *it;
787  unsigned int jetIndex = it - iBegin;
788  // Get the 4-vector for the hard jet
789  p4_hardJets.push_back( math::XYZTLorentzVector(localJet.px(), localJet.py(), localJet.pz(), localJet.e() ));
790  double localJetArea = 0.0;
791  if ( doAreaFastjet_ && localJet.has_area() ) {
792  localJetArea = localJet.area();
793  }
794  area_hardJets.push_back( localJetArea );
795 
796  // create the subjet list
797  std::vector<fastjet::PseudoJet> constituents;
798  if ( it->has_pieces() ) {
799  constituents = it->pieces();
800  } else if ( it->has_constituents() ) {
801  constituents = it->constituents();
802  }
803 
804  std::vector<fastjet::PseudoJet>::const_iterator itSubJetBegin = constituents.begin(),
805  itSubJet = itSubJetBegin, itSubJetEnd = constituents.end();
806  for (; itSubJet != itSubJetEnd; ++itSubJet ){
807 
808  fastjet::PseudoJet const & subjet = *itSubJet;
809  if ( verbosity_ >= 1 ) {
810  std::cout << "subjet #" << (itSubJet - itSubJetBegin) << ": Pt = " << subjet.pt() << ", eta = " << subjet.eta() << ", phi = " << subjet.phi() << ", mass = " << subjet.m()
811  << " (#constituents = " << subjet.constituents().size() << ")" << std::endl;
812  std::vector<fastjet::PseudoJet> subjet_constituents = subjet.constituents();
813  int idx_constituent = 0;
814  for ( std::vector<fastjet::PseudoJet>::const_iterator constituent = subjet_constituents.begin();
815  constituent != subjet_constituents.end(); ++constituent ) {
816  if ( constituent->pt() < 1.e-3 ) continue; // CV: skip ghosts
817  std::cout << " constituent #" << idx_constituent << ": Pt = " << constituent->pt() << ", eta = " << constituent->eta() << ", phi = " << constituent->phi() << ","
818  << " mass = " << constituent->m() << std::endl;
819  ++idx_constituent;
820  }
821  }
822 
823  if ( verbosity_ >= 1 ) {
824  std::cout << "subjet #" << (itSubJet - itSubJetBegin) << ": Pt = " << subjet.pt() << ", eta = " << subjet.eta() << ", phi = " << subjet.phi() << ", mass = " << subjet.m()
825  << " (#constituents = " << subjet.constituents().size() << ")" << std::endl;
826  std::vector<fastjet::PseudoJet> subjet_constituents = subjet.constituents();
827  int idx_constituent = 0;
828  for ( std::vector<fastjet::PseudoJet>::const_iterator constituent = subjet_constituents.begin();
829  constituent != subjet_constituents.end(); ++constituent ) {
830  if ( constituent->pt() < 1.e-3 ) continue; // CV: skip ghosts
831  std::cout << " constituent #" << idx_constituent << ": Pt = " << constituent->pt() << ", eta = " << constituent->eta() << ", phi = " << constituent->phi() << ","
832  << " mass = " << constituent->m() << std::endl;
833  ++idx_constituent;
834  }
835  }
836 
837  math::XYZTLorentzVector p4Subjet(subjet.px(), subjet.py(), subjet.pz(), subjet.e() );
839 
840  // This will hold ptr's to the subjets
841  std::vector<reco::CandidatePtr> subjetConstituents;
842 
843  // Get the transient subjet constituents from fastjet
844  std::vector<fastjet::PseudoJet> subjetFastjetConstituents = subjet.constituents();
845  std::vector<reco::CandidatePtr> constituents =
846  getConstituents(subjetFastjetConstituents );
847 
848  indices[jetIndex].push_back( subjetCollection->size() );
849 
850  // Add the concrete subjet type to the subjet list to write to event record
851  T jet;
852  reco::writeSpecific( jet, p4Subjet, point, constituents, iSetup);
853  double subjetArea = 0.0;
854  if ( doAreaFastjet_ && itSubJet->has_area() ){
855  subjetArea = itSubJet->area();
856  }
857  jet.setJetArea( subjetArea );
858  subjetCollection->push_back( jet );
859  }
860  }
861 
862  // put subjets into event record
863  subjetHandleAfterPut = iEvent.put(std::move(subjetCollection), jetCollInstanceName_);
864 
865  // Now create the hard jets with ptr's to the subjets as constituents
866  std::vector<math::XYZTLorentzVector>::const_iterator ip4 = p4_hardJets.begin(),
867  ip4Begin = p4_hardJets.begin(),
868  ip4End = p4_hardJets.end();
869 
870  for ( ; ip4 != ip4End; ++ip4 ) {
871  int p4_index = ip4 - ip4Begin;
872  std::vector<int> & ind = indices[p4_index];
873  std::vector<reco::CandidatePtr> i_hardJetConstituents;
874  // Add the subjets to the hard jet
875  for( std::vector<int>::const_iterator isub = ind.begin();
876  isub != ind.end(); ++isub ) {
877  reco::CandidatePtr candPtr( subjetHandleAfterPut, *isub, false );
878  i_hardJetConstituents.push_back( candPtr );
879  }
881  reco::BasicJet toput( *ip4, point, i_hardJetConstituents);
882  toput.setJetArea( area_hardJets[ip4 - ip4Begin] );
883  jetCollection->push_back( toput );
884  }
885 
886  // put hard jets into event record
887  // Store the Orphan handle for adding HTT information
888  edm::OrphanHandle<reco::BasicJetCollection> oh = iEvent.put(std::move(jetCollection));
889 
891  addHTTTopJetTagInfoCollection( iEvent, iSetup, oh);
892  }
893 
894 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:127
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_
Jets made from CaloTowers.
Definition: BasicJet.h:20
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::string jetCollInstanceName_
math::XYZPoint Point
point in the space
Definition: Particle.h:25
long double T
def move(src, dest)
Definition: eostools.py:510
*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
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, edm::EventSetup const &c)
Definition: JetSpecific.cc:41
template<typename T >
void VirtualJetProducer::writeJets ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
protected

Definition at line 600 of file VirtualJetProducer.cc.

References reco::deltaR2(), SoftLeptonByDistance_cfi::distance, PVValHelper::eta, Exception, plotBeamSpotDB::first, reco::helper::VirtualJetProducerHelper::intersection(), edm::isNotFinite(), metsig::jet, fwrapper::jets, gen::k, M_PI, eostools::move(), DetIdAssociatorESProducer_cff::nEta, edm::Event::put(), fastjet::BackgroundEstimator::rho(), edm::second(), fastjet::BackgroundEstimator::set_excluded_jets(), fastjet::BackgroundEstimator::sigma(), mathSSE::sqrt(), and reco::writeSpecific().

601 {
602  // std::cout << "writeJets " << typeid(T).name()
603  // << (doRhoFastjet_ ? " doRhoFastjet " : "")
604  // << (doAreaFastjet_ ? " doAreaFastjet " : "")
605  // << (doAreaDiskApprox_ ? " doAreaDiskApprox " : "")
606  // << std::endl;
607 
608  if (doRhoFastjet_) {
609  // declare jet collection without the two jets,
610  // for unbiased background estimation.
611  std::vector<fastjet::PseudoJet> fjexcluded_jets;
612  fjexcluded_jets=fjJets_;
613 
614  if(fjexcluded_jets.size()>2) fjexcluded_jets.resize(nExclude_);
615 
617  auto rhos = std::make_unique<std::vector<double>>();
618  auto sigmas = std::make_unique<std::vector<double>>();
619  int nEta = puCenters_.size();
620  rhos->reserve(nEta);
621  sigmas->reserve(nEta);
622  fastjet::ClusterSequenceAreaBase const* clusterSequenceWithArea =
623  dynamic_cast<fastjet::ClusterSequenceAreaBase const *> ( &*fjClusterSeq_ );
624 
625  if (clusterSequenceWithArea ==nullptr ){
626  if (!fjJets_.empty()) {
627  throw cms::Exception("LogicError")<<"fjClusterSeq is not initialized while inputs are present\n ";
628  }
629  } else {
630  for(int ie = 0; ie < nEta; ++ie){
631  double eta = puCenters_[ie];
632  double etamin=eta-puWidth_;
633  double etamax=eta+puWidth_;
634  fastjet::RangeDefinition range_rho(etamin,etamax);
635  fastjet::BackgroundEstimator bkgestim(*clusterSequenceWithArea,range_rho);
636  bkgestim.set_excluded_jets(fjexcluded_jets);
637  rhos->push_back(bkgestim.rho());
638  sigmas->push_back(bkgestim.sigma());
639  }
640  }
641  iEvent.put(std::move(rhos),"rhos");
642  iEvent.put(std::move(sigmas),"sigmas");
643  }else{
644  auto rho = std::make_unique<double>(0.0);
645  auto sigma = std::make_unique<double>(0.0);
646  double mean_area = 0;
647 
648  fastjet::ClusterSequenceAreaBase const* clusterSequenceWithArea =
649  dynamic_cast<fastjet::ClusterSequenceAreaBase const *> ( &*fjClusterSeq_ );
650  /*
651  const double nemptyjets = clusterSequenceWithArea->n_empty_jets(*fjRangeDef_);
652  if(( nemptyjets < -15 ) || ( nemptyjets > fjRangeDef_->area()+ 15)) {
653  edm::LogWarning("StrangeNEmtpyJets") << "n_empty_jets is : " << clusterSequenceWithArea->n_empty_jets(*fjRangeDef_) << " with range " << fjRangeDef_->description() << ".";
654  }
655  */
656  if (clusterSequenceWithArea ==nullptr ){
657  if (!fjJets_.empty()) {
658  throw cms::Exception("LogicError")<<"fjClusterSeq is not initialized while inputs are present\n ";
659  }
660  } else {
661  clusterSequenceWithArea->get_median_rho_and_sigma(*fjRangeDef_,false,*rho,*sigma,mean_area);
662  if((*rho < 0)|| (edm::isNotFinite(*rho))) {
663  edm::LogError("BadRho") << "rho value is " << *rho << " area:" << mean_area << " and n_empty_jets: " << clusterSequenceWithArea->n_empty_jets(*fjRangeDef_) << " with range " << fjRangeDef_->description()
664  <<". Setting rho to rezo.";
665  *rho = 0;
666  }
667  }
668  iEvent.put(std::move(rho),"rho");
669  iEvent.put(std::move(sigma),"sigma");
670  }
671  } // doRhoFastjet_
672 
673  // produce output jet collection
674 
675  using namespace reco;
676 
677  // allocate fjJets_.size() Ts in vector
678  auto jets = std::make_unique<std::vector<T>>(fjJets_.size());
679 
680  // Distance between jet centers and overlap area -- for disk-based area calculation
681  using RIJ = std::pair<double,double>;
682  std::vector<RIJ> rijStorage(fjJets_.size()*(fjJets_.size()/2));
683  RIJ * rij[fjJets_.size()];
684  unsigned int k=0;
685  for (unsigned int ijet=0;ijet<fjJets_.size();++ijet) {
686  rij[ijet] = &rijStorage[k]; k+=ijet;
687  }
688 
689  float etaJ[fjJets_.size()], phiJ[fjJets_.size()];
690 
691  auto orParam_ = 1./rParam_;
692  // fill jets
693  for (unsigned int ijet=0;ijet<fjJets_.size();++ijet) {
694  auto & jet = (*jets)[ijet];
695  // get the fastjet jet
696  const fastjet::PseudoJet& fjJet = fjJets_[ijet];
697  // get the constituents from fastjet
698  std::vector<fastjet::PseudoJet> const & fjConstituents = fastjet::sorted_by_pt(fjJet.constituents());
699  // convert them to CandidatePtr vector
700  std::vector<CandidatePtr> const & constituents = getConstituents(fjConstituents);
701 
702  // write the specifics to the jet (simultaneously sets 4-vector, vertex).
703  // These are overridden functions that will call the appropriate
704  // specific allocator.
706  Particle::LorentzVector(fjJet.px(),
707  fjJet.py(),
708  fjJet.pz(),
709  fjJet.E()),
710  vertex_,
711  constituents, iSetup);
712  phiJ[ijet] = jet.phi();
713  etaJ[ijet] = jet.eta();
714  }
715 
716  // calcuate the jet area
717  for (unsigned int ijet=0;ijet<fjJets_.size();++ijet) {
718  // calcuate the jet area
719  double jetArea=0.0;
720  // get the fastjet jet
721  const auto & fjJet = fjJets_[ijet];
722  if ( doAreaFastjet_ && fjJet.has_area() ) {
723  jetArea = fjJet.area();
724  }
725  else if ( doAreaDiskApprox_ ) {
726  // Here it is assumed that fjJets_ is in decreasing order of pT,
727  // which should happen in FastjetJetProducer::runAlgorithm()
728  jetArea = M_PI;
729  RIJ * distance = rij[ijet];
730  for (unsigned jJet = 0; jJet < ijet; ++jJet) {
731  distance[jJet].first = std::sqrt(reco::deltaR2(etaJ[ijet],phiJ[ijet], etaJ[jJet],phiJ[jJet]))*orParam_;
732  distance[jJet].second = reco::helper::VirtualJetProducerHelper::intersection(distance[jJet].first);
733  jetArea -=distance[jJet].second;
734  for (unsigned kJet = 0; kJet < jJet; ++kJet) {
735  jetArea += reco::helper::VirtualJetProducerHelper::intersection(distance[jJet].first, distance[kJet].first, rij[jJet][kJet].first,
736  distance[jJet].second, distance[kJet].second, rij[jJet][kJet].second);
737  } // end loop over harder jets
738  } // end loop over harder jets
739  jetArea *= (rParam_*rParam_);
740  }
741  auto & jet = (*jets)[ijet];
742  jet.setJetArea (jetArea);
743 
744  if(doPUOffsetCorr_){
745  jet.setPileup(subtractor_->getPileUpEnergy(ijet));
746  }else{
747  jet.setPileup (0.0);
748  }
749 
750  // std::cout << "area " << ijet << " " << jetArea << " " << Area<T>::get(jet) << std::endl;
751  // std::cout << "JetVI " << ijet << ' '<< jet.pt() << " " << jet.et() << ' '<< jet.energy() << ' '<< jet.mass() << std::endl;
752 
753  }
754  // put the jets in the collection
756 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:127
reco::Particle::Point vertex_
virtual std::vector< reco::CandidatePtr > getConstituents(const std::vector< fastjet::PseudoJet > &fjConstituents)
std::vector< fastjet::PseudoJet > fjJets_
std::vector< double > puCenters_
U second(std::pair< T, U > const &p)
std::string jetCollInstanceName_
boost::shared_ptr< PileUpSubtractor > subtractor_
bool isNotFinite(T x)
Definition: isFinite.h:10
ClusterSequencePtr fjClusterSeq_
T sqrt(T t)
Definition: SSEVec.h:18
vector< PseudoJet > jets
#define M_PI
int k[5][pyjets_maxn]
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
Definition: deltaR.h:36
fixed size matrix
def move(src, dest)
Definition: eostools.py:510
math::PtEtaPhiELorentzVectorF LorentzVector
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, edm::EventSetup const &c)
Definition: JetSpecific.cc:41
template<class T >
void VirtualJetProducer::writeJetsWithConstituents ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
protected

function template to write out the outputs

Definition at line 898 of file VirtualJetProducer.cc.

References gather_cfg::cout, triggerObjects_cff::id, metsig::jet, eostools::move(), point, edm::Event::put(), reco::Jet::setJetArea(), reco::LeafCandidate::setP4(), reco::PFCandidate::setSourceCandidatePtr(), reco::PFCandidate::translatePdgIdToType(), and reco::writeSpecific().

899 {
900  if ( verbosity_ >= 1 ) {
901  std::cout << "<VirtualJetProducer::writeJetsWithConstituents (moduleLabel = " << moduleLabel_ << ")>:" << std::endl;
902  }
903 
904  // get a list of output jets MV: make this compatible with template
905  auto jetCollection = std::make_unique<reco::PFJetCollection>();
906 
907  // this is the mapping of jet to constituents
908  std::vector< std::vector<int> > indices;
909  // this is the list of jet 4-momenta
910  std::vector<math::XYZTLorentzVector> p4_Jets;
911  // this is the jet areas
912  std::vector<double> area_Jets;
913 
914  // get a list of output constituents
915  auto constituentCollection = std::make_unique<reco::PFCandidateCollection>();
916 
917  // This will store the handle for the constituents after we write them
918  edm::OrphanHandle<reco::PFCandidateCollection> constituentHandleAfterPut;
919 
920  // Loop over the jets and extract constituents
921  std::vector<fastjet::PseudoJet> constituentsSub;
922  std::vector<fastjet::PseudoJet>::const_iterator it = fjJets_.begin(),
923  iEnd = fjJets_.end(),
924  iBegin = fjJets_.begin();
925  indices.resize( fjJets_.size() );
926 
927  for ( ; it != iEnd; ++it ) {
928  fastjet::PseudoJet const & localJet = *it;
929  unsigned int jetIndex = it - iBegin;
930  // Get the 4-vector for the hard jet
931  p4_Jets.push_back( math::XYZTLorentzVector(localJet.px(), localJet.py(), localJet.pz(), localJet.e() ));
932  double localJetArea = 0.0;
933  if ( doAreaFastjet_ && localJet.has_area() ) {
934  localJetArea = localJet.area();
935  }
936  area_Jets.push_back( localJetArea );
937 
938  // create the constituent list
939  std::vector<fastjet::PseudoJet> constituents,ghosts;
940  if ( it->has_pieces() )
941  constituents = it->pieces();
942  else if ( it->has_constituents() )
943  fastjet::SelectorIsPureGhost().sift(it->constituents(), ghosts, constituents); //filter out ghosts
944 
945  //loop over constituents of jet (can be subjets or normal constituents)
946  indices[jetIndex].reserve(constituents.size());
947  constituentsSub.reserve(constituentsSub.size()+constituents.size());
948  for (fastjet::PseudoJet const& constit : constituents) {
949  indices[jetIndex].push_back( constituentsSub.size() );
950  constituentsSub.push_back(constit);
951  }
952  }
953 
954  //Loop over constituents and store in the event
955  static const reco::PFCandidate dummySinceTranslateIsNotStatic;
956  for (fastjet::PseudoJet const& constit : constituentsSub) {
957  auto orig = inputs_[constit.user_index()];
958  auto id = dummySinceTranslateIsNotStatic.translatePdgIdToType(orig->pdgId());
959  reco::PFCandidate pCand( reco::PFCandidate(orig->charge(), orig->p4(), id) );
961  pVec.SetPxPyPzE(constit.px(),constit.py(),constit.pz(),constit.e());
962  pCand.setP4(pVec);
963  pCand.setSourceCandidatePtr( orig->sourceCandidatePtr(0) );
964  constituentCollection->push_back(pCand);
965  }
966  // put constituents into event record
967  constituentHandleAfterPut = iEvent.put(std::move(constituentCollection), jetCollInstanceName_ );
968 
969  // Now create the jets with ptr's to the constituents
970  std::vector<math::XYZTLorentzVector>::const_iterator ip4 = p4_Jets.begin(),
971  ip4Begin = p4_Jets.begin(),
972  ip4End = p4_Jets.end();
973 
974  for ( ; ip4 != ip4End; ++ip4 ) {
975  int p4_index = ip4 - ip4Begin;
976  std::vector<int> & ind = indices[p4_index];
977  std::vector<reco::CandidatePtr> i_jetConstituents;
978  // Add the constituents to the jet
979  for( std::vector<int>::const_iterator iconst = ind.begin(); iconst != ind.end(); ++iconst ) {
980  reco::CandidatePtr candPtr( constituentHandleAfterPut, *iconst, false );
981  i_jetConstituents.push_back( candPtr );
982  }
983  if(!i_jetConstituents.empty()) { //only keep jets which have constituents after subtraction
986  reco::writeSpecific(jet,*ip4,point,i_jetConstituents,iSetup);
987  jet.setJetArea( area_Jets[ip4 - ip4Begin] );
988  jetCollection->emplace_back( jet );
989  }
990  }
991 
992  // put jets into event record
993  iEvent.put(std::move(jetCollection));
994 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:127
std::vector< fastjet::PseudoJet > fjJets_
Jets made from PFObjects.
Definition: PFJet.h:21
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
virtual void setJetArea(float fArea)
set jet area
Definition: Jet.h:103
std::string jetCollInstanceName_
std::vector< edm::Ptr< reco::Candidate > > inputs_
math::XYZPoint Point
point in the space
Definition: Particle.h:25
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:229
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
def move(src, dest)
Definition: eostools.py:510
*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
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, edm::EventSetup const &c)
Definition: JetSpecific.cc:41

Member Data Documentation

int VirtualJetProducer::activeAreaRepeats_
protected

Definition at line 191 of file VirtualJetProducer.h.

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

Definition at line 226 of file VirtualJetProducer.h.

bool VirtualJetProducer::doAreaDiskApprox_
protected

Definition at line 183 of file VirtualJetProducer.h.

bool VirtualJetProducer::doAreaFastjet_
protected
bool VirtualJetProducer::doFastJetNonUniform_
protected

Definition at line 186 of file VirtualJetProducer.h.

bool VirtualJetProducer::doPUOffsetCorr_
protected

Definition at line 195 of file VirtualJetProducer.h.

bool VirtualJetProducer::doPVCorrection_
protected

Definition at line 174 of file VirtualJetProducer.h.

bool VirtualJetProducer::doRhoFastjet_
protected
ActiveAreaSpecPtr VirtualJetProducer::fjActiveArea_
protected

Definition at line 203 of file VirtualJetProducer.h.

AreaDefinitionPtr VirtualJetProducer::fjAreaDefinition_
protected
ClusterSequencePtr VirtualJetProducer::fjClusterSeq_
protected
std::vector<fastjet::PseudoJet> VirtualJetProducer::fjInputs_
protected
JetDefPtr VirtualJetProducer::fjJetDefinition_
protected
std::vector<fastjet::PseudoJet> VirtualJetProducer::fjJets_
protected
PluginPtr VirtualJetProducer::fjPlugin_
protected

Definition at line 202 of file VirtualJetProducer.h.

RangeDefPtr VirtualJetProducer::fjRangeDef_
protected

Definition at line 205 of file VirtualJetProducer.h.

bool VirtualJetProducer::fromHTTTopJetProducer_
protected

Definition at line 223 of file VirtualJetProducer.h.

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

double VirtualJetProducer::ghostArea_
protected

Definition at line 192 of file VirtualJetProducer.h.

double VirtualJetProducer::ghostEtaMax_
protected

Definition at line 190 of file VirtualJetProducer.h.

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

Definition at line 230 of file VirtualJetProducer.h.

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

Definition at line 229 of file VirtualJetProducer.h.

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

Definition at line 232 of file VirtualJetProducer.h.

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

Definition at line 231 of file VirtualJetProducer.h.

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

Definition at line 233 of file VirtualJetProducer.h.

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

Definition at line 236 of file VirtualJetProducer.h.

Referenced by FastjetJetProducer::produceTrackJets().

double VirtualJetProducer::inputEMin_
protected

Definition at line 172 of file VirtualJetProducer.h.

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

double VirtualJetProducer::inputEtMin_
protected

Definition at line 171 of file VirtualJetProducer.h.

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

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

Definition at line 169 of file VirtualJetProducer.h.

std::string VirtualJetProducer::jetCollInstanceName_
protected

Definition at line 214 of file VirtualJetProducer.h.

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

double VirtualJetProducer::jetPtMin_
protected
std::string VirtualJetProducer::jetType_
protected

Definition at line 168 of file VirtualJetProducer.h.

JetType::Type VirtualJetProducer::jetTypeE
protected
unsigned int VirtualJetProducer::maxInputs_
protected

Definition at line 178 of file VirtualJetProducer.h.

unsigned int VirtualJetProducer::minSeed_
protected

Definition at line 220 of file VirtualJetProducer.h.

std::string VirtualJetProducer::moduleLabel_
protected
unsigned int VirtualJetProducer::nExclude_
protected

Definition at line 212 of file VirtualJetProducer.h.

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

Definition at line 210 of file VirtualJetProducer.h.

std::string VirtualJetProducer::puSubtractorName_
protected

Definition at line 196 of file VirtualJetProducer.h.

double VirtualJetProducer::puWidth_
protected

Definition at line 211 of file VirtualJetProducer.h.

bool VirtualJetProducer::restrictInputs_
protected

Definition at line 177 of file VirtualJetProducer.h.

double VirtualJetProducer::rhoEtaMax_
protected

Definition at line 189 of file VirtualJetProducer.h.

double VirtualJetProducer::rParam_
protected

Definition at line 170 of file VirtualJetProducer.h.

edm::InputTag VirtualJetProducer::src_
protected
edm::InputTag VirtualJetProducer::srcPVs_
protected

Definition at line 167 of file VirtualJetProducer.h.

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

Definition at line 217 of file VirtualJetProducer.h.

bool VirtualJetProducer::useDeterministicSeed_
protected

Definition at line 219 of file VirtualJetProducer.h.

bool VirtualJetProducer::useExplicitGhosts_
protected

Definition at line 182 of file VirtualJetProducer.h.

Referenced by FastjetJetProducer::FastjetJetProducer().

int VirtualJetProducer::verbosity_
protected

Definition at line 222 of file VirtualJetProducer.h.

Referenced by FastjetJetProducer::runAlgorithm().

reco::Particle::Point VirtualJetProducer::vertex_
protected
double VirtualJetProducer::voronoiRfact_
protected
bool VirtualJetProducer::writeCompound_
protected

Definition at line 215 of file VirtualJetProducer.h.

bool VirtualJetProducer::writeJetsWithConst_
protected

Definition at line 216 of file VirtualJetProducer.h.