diff --git a/RecoHI/HiJetAlgos/interface/PuWithNtuple.h b/RecoHI/HiJetAlgos/interface/PuWithNtuple.h index e9615d9ca3949..795dcc84c3ce9 100644 --- a/RecoHI/HiJetAlgos/interface/PuWithNtuple.h +++ b/RecoHI/HiJetAlgos/interface/PuWithNtuple.h @@ -20,6 +20,7 @@ class PuWithNtuple : public PileUpSubtractor { bool sumRecHits_; bool dropZeroTowers_; + bool isOrphanInputRun_; double minimumTowersFraction_; diff --git a/RecoHI/HiJetAlgos/plugins/plugins.cc b/RecoHI/HiJetAlgos/plugins/plugins.cc index b05540f9dfc1f..ffaaf5cf17bfe 100644 --- a/RecoHI/HiJetAlgos/plugins/plugins.cc +++ b/RecoHI/HiJetAlgos/plugins/plugins.cc @@ -3,6 +3,7 @@ #include "RecoHI/HiJetAlgos/interface/ParametrizedSubtractor.h" #include "RecoHI/HiJetAlgos/interface/ReflectedIterator.h" #include "RecoHI/HiJetAlgos/interface/VoronoiSubtractor.h" +#include "RecoHI/HiJetAlgos/interface/PuWithNtuple.h" #include "FWCore/PluginManager/interface/ModuleDef.h" #include "FWCore/Framework/interface/MakerMacros.h" @@ -14,6 +15,7 @@ DEFINE_EDM_PLUGIN(PileUpSubtractorFactory,MultipleAlgoIterator,"MultipleAlgoIter DEFINE_EDM_PLUGIN(PileUpSubtractorFactory,ParametrizedSubtractor,"ParametrizedSubtractor"); DEFINE_EDM_PLUGIN(PileUpSubtractorFactory,ReflectedIterator,"ReflectedIterator"); DEFINE_EDM_PLUGIN(PileUpSubtractorFactory,VoronoiSubtractor,"VoronoiSubtractor"); +DEFINE_EDM_PLUGIN(PileUpSubtractorFactory,PuWithNtuple,"PuWithNtuple"); diff --git a/RecoHI/HiJetAlgos/src/PuWithNtuple.cc b/RecoHI/HiJetAlgos/src/PuWithNtuple.cc index cbce1ce9db45e..e3bb5bf96bb48 100644 --- a/RecoHI/HiJetAlgos/src/PuWithNtuple.cc +++ b/RecoHI/HiJetAlgos/src/PuWithNtuple.cc @@ -22,6 +22,7 @@ PuWithNtuple::PuWithNtuple(const edm::ParameterSet& iConfig, edm::ConsumesCollec Neta_ = 82; + isOrphanInputRun_ = false; tree_ = fs_->make("puTree",""); tree_->Branch("nref",&nref,"nref/I"); @@ -270,6 +271,11 @@ void PuWithNtuple::calculatePedestal( vector const & coll ) } LogDebug("PileUpSubtractor")<<" ieta : "<Fill(); + isOrphanInputRun_ = false; + } } @@ -278,6 +284,7 @@ void PuWithNtuple::calculateOrphanInput(vector & orphanInput LogDebug("PileUpSubtractor")<<"The subtractor calculating orphan input...\n"; + isOrphanInputRun_= true; (*fjInputs_) = fjOriginalInputs_; vector jettowers; // vector of towers indexed by "user_index" @@ -380,9 +387,6 @@ void PuWithNtuple::calculateOrphanInput(vector & orphanInput } // cout<<"Number of jets : "<Fill(); - }