CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
EgammaHLTMulti5x5ClusterProducer Class Reference

#include <EgammaHLTMulti5x5ClusterProducer.h>

Inheritance diagram for EgammaHLTMulti5x5ClusterProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EgammaHLTMulti5x5ClusterProducer (const edm::ParameterSet &ps)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~EgammaHLTMulti5x5ClusterProducer () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () 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)
 
 ~ProducerBase () noexcept(false) override
 
- 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Private Member Functions

void clusterizeECALPart (edm::Event &evt, const edm::EventSetup &es, edm::EDGetTokenT< EcalRecHitCollection > &hitToken, const std::string &clusterCollection, const std::vector< RectangularEtaPhiRegion > &regions, const reco::CaloID::Detectors detector)
 
bool counterExceeded () const
 
const EcalRecHitCollectiongetCollection (edm::Event &evt, edm::EDGetTokenT< EcalRecHitCollection > &hitToken)
 
void outputValidationInfo (reco::CaloClusterPtrVector &clusterPtrVector)
 

Private Attributes

std::string barrelClusterCollection_
 
edm::InputTag barrelHitCollection_
 
edm::EDGetTokenT< EcalRecHitCollectionbarrelHitToken_
 
bool doBarrel_
 
bool doEndcaps_
 
bool doIsolated_
 
std::string endcapClusterCollection_
 
edm::InputTag endcapHitCollection_
 
edm::EDGetTokenT< EcalRecHitCollectionendcapHitToken_
 
double l1LowerThr_
 
double l1LowerThrIgnoreIsolation_
 
edm::EDGetTokenT< l1extra::L1EmParticleCollectionl1TagIsolated_
 
edm::EDGetTokenT< l1extra::L1EmParticleCollectionl1TagNonIsolated_
 
double l1UpperThr_
 
Multi5x5ClusterAlgoMulti5x5_p
 
int nEvt_
 
int nMaxPrintout_
 
PositionCalc posCalculator_
 
double regionEtaMargin_
 
double regionPhiMargin_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer 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
 
- 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)
 

Detailed Description

Definition at line 27 of file EgammaHLTMulti5x5ClusterProducer.h.

Constructor & Destructor Documentation

EgammaHLTMulti5x5ClusterProducer::EgammaHLTMulti5x5ClusterProducer ( const edm::ParameterSet ps)

Definition at line 37 of file EgammaHLTMulti5x5ClusterProducer.cc.

References barrelClusterCollection_, barrelHitCollection_, barrelHitToken_, doBarrel_, doEndcaps_, doIsolated_, endcapClusterCollection_, endcapHitCollection_, endcapHitToken_, edm::ParameterSet::getParameter(), l1LowerThr_, l1LowerThrIgnoreIsolation_, l1TagIsolated_, l1TagNonIsolated_, l1UpperThr_, Multi5x5_p, nEvt_, posCalculator_, regionEtaMargin_, regionPhiMargin_, and AlCaHLTBitMon_QueryRunRegistry::string.

37  {
38 
39  doBarrel_ = ps.getParameter<bool>("doBarrel");
40  doEndcaps_ = ps.getParameter<bool>("doEndcaps");
41  doIsolated_ = ps.getParameter<bool>("doIsolated");
42 
43  // Parameters to identify the hit collections
44  barrelHitCollection_ = ps.getParameter<edm::InputTag>("barrelHitProducer");
45  endcapHitCollection_ = ps.getParameter<edm::InputTag>("endcapHitProducer");
46  barrelHitToken_ = consumes<EcalRecHitCollection>( barrelHitCollection_);
47  endcapHitToken_ = consumes<EcalRecHitCollection>( endcapHitCollection_);
48 
49  // The names of the produced cluster collections
50  barrelClusterCollection_ = ps.getParameter<std::string>("barrelClusterCollection");
51  endcapClusterCollection_ = ps.getParameter<std::string>("endcapClusterCollection");
52 
53  // Multi5x5 algorithm parameters
54  double barrelSeedThreshold = ps.getParameter<double>("Multi5x5BarrelSeedThr");
55  double endcapSeedThreshold = ps.getParameter<double>("Multi5x5EndcapSeedThr");
56 
57  // L1 matching parameters
58  l1TagIsolated_ = consumes<l1extra::L1EmParticleCollection>(ps.getParameter< edm::InputTag > ("l1TagIsolated"));
59  l1TagNonIsolated_ = consumes<l1extra::L1EmParticleCollection>(ps.getParameter< edm::InputTag > ("l1TagNonIsolated"));
60  l1LowerThr_ = ps.getParameter<double> ("l1LowerThr");
61  l1UpperThr_ = ps.getParameter<double> ("l1UpperThr");
62  l1LowerThrIgnoreIsolation_ = ps.getParameter<double> ("l1LowerThrIgnoreIsolation");
63 
64  regionEtaMargin_ = ps.getParameter<double>("regionEtaMargin");
65  regionPhiMargin_ = ps.getParameter<double>("regionPhiMargin");
66 
67  // Parameters for the position calculation:
68  posCalculator_ = PositionCalc( ps.getParameter<edm::ParameterSet>("posCalcParameters") );
69 
70  const std::vector<std::string> flagnames =
71  ps.getParameter<std::vector<std::string> >("RecHitFlagToBeExcluded");
72 
73  // exclude recHit flags from seeding
74  std::vector<int> v_chstatus = StringToEnumValue<EcalRecHit::Flags>(flagnames);
75 
76  // Produces a collection of barrel and a collection of endcap clusters
77  produces< reco::BasicClusterCollection >(endcapClusterCollection_);
78  produces< reco::BasicClusterCollection >(barrelClusterCollection_);
79 
80  Multi5x5_p = new Multi5x5ClusterAlgo(barrelSeedThreshold, endcapSeedThreshold, v_chstatus, posCalculator_);
81  nEvt_ = 0;
82 }
T getParameter(std::string const &) const
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagNonIsolated_
edm::EDGetTokenT< EcalRecHitCollection > barrelHitToken_
edm::EDGetTokenT< EcalRecHitCollection > endcapHitToken_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagIsolated_
EgammaHLTMulti5x5ClusterProducer::~EgammaHLTMulti5x5ClusterProducer ( )
override

Definition at line 84 of file EgammaHLTMulti5x5ClusterProducer.cc.

References Multi5x5_p.

84  {
85  delete Multi5x5_p;
86 }

Member Function Documentation

void EgammaHLTMulti5x5ClusterProducer::clusterizeECALPart ( edm::Event evt,
const edm::EventSetup es,
edm::EDGetTokenT< EcalRecHitCollection > &  hitToken,
const std::string &  clusterCollection,
const std::vector< RectangularEtaPhiRegion > &  regions,
const reco::CaloID::Detectors  detector 
)
private

Definition at line 268 of file EgammaHLTMulti5x5ClusterProducer.cc.

References barrelClusterCollection_, fastPrimaryVertexProducer_cfi::clusters, reco::CaloID::DET_ECAL_BARREL, DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, endcapClusterCollection_, edm::EventSetup::get(), getCollection(), CaloGeometry::getSubdetectorGeometry(), Multi5x5ClusterAlgo::makeClusters(), eostools::move(), Multi5x5_p, and edm::Event::put().

Referenced by produce().

272  {
273 
274  // get the hit collection from the event:
275  const EcalRecHitCollection *hitCollection_p = getCollection(evt, hitToken);
276 
277  // get the geometry and topology from the event setup:
278  edm::ESHandle<CaloGeometry> geoHandle;
279  es.get<CaloGeometryRecord>().get(geoHandle);
280 
281  const CaloSubdetectorGeometry *geometry_p;
282  CaloSubdetectorTopology *topology_p;
283 
285  {
286  geometry_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
287  topology_p = new EcalBarrelTopology(geoHandle);
288  }
289  else
290  {
291  geometry_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
292  topology_p = new EcalEndcapTopology(geoHandle);
293  }
294 
295 
296  const CaloSubdetectorGeometry *geometryES_p;
297  geometryES_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalPreshower);
298 
299  // Run the clusterization algorithm:
301  clusters = Multi5x5_p->makeClusters(hitCollection_p, geometry_p, topology_p, geometryES_p, detector, true, regions);
302 
303  // create an unique_ptr to a BasicClusterCollection, copy the barrel clusters into it and put in the Event:
304  auto clusters_p = std::make_unique<reco::BasicClusterCollection>();
305  clusters_p->assign(clusters.begin(), clusters.end());
308  bccHandle = evt.put(std::move(clusters_p), barrelClusterCollection_);
309  else
310  bccHandle = evt.put(std::move(clusters_p), endcapClusterCollection_);
311 
312  delete topology_p;
313 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
const EcalRecHitCollection * getCollection(edm::Event &evt, edm::EDGetTokenT< EcalRecHitCollection > &hitToken)
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, reco::CaloID::Detectors detector, bool regional=false, const std::vector< RectangularEtaPhiRegion > &regions=std::vector< RectangularEtaPhiRegion >())
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
T get() const
Definition: EventSetup.h:63
def move(src, dest)
Definition: eostools.py:510
bool EgammaHLTMulti5x5ClusterProducer::counterExceeded ( ) const
inlineprivate
void EgammaHLTMulti5x5ClusterProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 88 of file EgammaHLTMulti5x5ClusterProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and AlCaHLTBitMon_QueryRunRegistry::string.

88  {
89 
91  desc.add<bool>(("doBarrel"), false);
92  desc.add<bool>(("doEndcaps"), true);
93  desc.add<bool>(("doIsolated"), true);
94  desc.add<std::string>("VerbosityLevel" ,"ERROR");
95 
96  edm::ParameterSetDescription posCalcPSET;
97  posCalcPSET.add<double>("T0_barl", 7.4);
98  posCalcPSET.add<double>("T0_endc", 3.1);
99  posCalcPSET.add<double>("T0_endcPresh", 1.2);
100  posCalcPSET.add<double>("W0", 4.2);
101  posCalcPSET.add<double>("X0", 0.89);
102  posCalcPSET.add<bool>("LogWeighted", true);
103  desc.add<edm::ParameterSetDescription>("posCalcParameters", posCalcPSET);
104 
105  desc.add<edm::InputTag>(("barrelHitProducer"), edm::InputTag("hltEcalRegionalEgammaRecHit", "EcalRecHitsEB"));
106  desc.add<edm::InputTag>(("endcapHitProducer"), edm::InputTag("hltEcalRegionalEgammaRecHit", "EcalRecHitsEE"));
107  desc.add<std::string>(("barrelClusterCollection"), "notused");
108  desc.add<std::string>(("endcapClusterCollection"), "multi5x5EndcapBasicClusters");
109  desc.add<double>(("Multi5x5BarrelSeedThr"), 0.5);
110  desc.add<double>(("Multi5x5EndcapSeedThr"), 0.5);
111  desc.add<edm::InputTag>(("l1TagIsolated"), edm::InputTag("hltL1extraParticles","Isolated"));
112  desc.add<edm::InputTag>(("l1TagNonIsolated"), edm::InputTag("hltL1extraParticles","NonIsolated"));
113  desc.add<double>(("l1LowerThr"), 5.0);
114  desc.add<double>(("l1UpperThr"), 9999.);
115  desc.add<double>(("l1LowerThrIgnoreIsolation"), 999.0);
116  desc.add<double>(("regionEtaMargin"), 0.3);
117  desc.add<double>(("regionPhiMargin"), 0.4);
118 
119  desc.add<std::vector<std::string> >(("RecHitFlagToBeExcluded"), std::vector<std::string>());
120  descriptions.add(("hltEgammaHLTMulti5x5ClusterProducer"), desc);
121 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const EcalRecHitCollection * EgammaHLTMulti5x5ClusterProducer::getCollection ( edm::Event evt,
edm::EDGetTokenT< EcalRecHitCollection > &  hitToken 
)
private

Definition at line 252 of file EgammaHLTMulti5x5ClusterProducer.cc.

References gather_cfg::cout, edm::Event::getByToken(), edm::HandleBase::isValid(), and edm::Handle< T >::product().

Referenced by clusterizeECALPart().

253  {
254 
256  evt.getByToken(hitToken, rhcHandle);
257 
258  if (!(rhcHandle.isValid()))
259  {
260  std::cout << "could not get a handle on the EcalRecHitCollection!" << std::endl;
261  edm::LogError("EgammaHLTMulti5x5ClusterProducerError") << "Error! can't get the product ";
262  return nullptr;
263  }
264  return rhcHandle.product();
265 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
bool isValid() const
Definition: HandleBase.h:74
T const * product() const
Definition: Handle.h:81
void EgammaHLTMulti5x5ClusterProducer::outputValidationInfo ( reco::CaloClusterPtrVector clusterPtrVector)
private
void EgammaHLTMulti5x5ClusterProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 123 of file EgammaHLTMulti5x5ClusterProducer.cc.

References barrelClusterCollection_, barrelHitToken_, clusterizeECALPart(), reco::CaloID::DET_ECAL_BARREL, reco::CaloID::DET_ECAL_ENDCAP, doBarrel_, doEndcaps_, doIsolated_, L1CaloGeometry::emJetPhiBinHighEdge(), L1CaloGeometry::emJetPhiBinLowEdge(), endcapClusterCollection_, endcapHitToken_, L1CaloGeometry::etaBinHighEdge(), L1CaloGeometry::etaBinLowEdge(), edm::EventSetup::get(), edm::Event::getByToken(), l1LowerThr_, l1LowerThrIgnoreIsolation_, l1TagIsolated_, l1TagNonIsolated_, l1UpperThr_, nEvt_, regionEtaMargin_, and regionPhiMargin_.

123  {
124 
125  //Get the L1 EM Particle Collection
127  if(doIsolated_)
128  evt.getByToken(l1TagIsolated_, emIsolColl);
129 
130  //Get the L1 EM Particle Collection
132  evt.getByToken(l1TagNonIsolated_, emNonIsolColl);
133 
134  // Get the CaloGeometry
135  edm::ESHandle<L1CaloGeometry> l1CaloGeom ;
136  es.get<L1CaloGeometryRecord>().get(l1CaloGeom) ;
137 
138  std::vector<RectangularEtaPhiRegion> barrelRegions;
139  std::vector<RectangularEtaPhiRegion> endcapRegions;
140 
141  if(doIsolated_) {
142  for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
143 
144  if (emItr->et() > l1LowerThr_ && emItr->et() < l1UpperThr_) {
145 
146  // Access the GCT hardware object corresponding to the L1Extra EM object.
147  int etaIndex = emItr->gctEmCand()->etaIndex() ;
148 
149 
150  int phiIndex = emItr->gctEmCand()->phiIndex() ;
151  // Use the L1CaloGeometry to find the eta, phi bin boundaries.
152  double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
153  double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
154  double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
155  double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
156 
157  //Attention isForward does not work
158  int isforw=0;
159  int isbarl=0;
160  if((float)(etaHigh)>1.479 || (float)(etaLow)<-1.479) isforw=1;
161  if(((float)(etaLow)>-1.479 && (float)(etaLow)<1.479) ||
162  ((float)(etaHigh)>-1.479 && (float)(etaHigh)<1.479)) isbarl=1;
163 
164  //std::cout<<"Multi5x5 etaindex "<<etaIndex<<" low hig : "<<etaLow<<" "<<etaHigh<<" phi low hig" <<phiLow<<" " << phiHigh<<" isforw "<<emItr->gctEmCand()->regionId().isForward()<<" isforwnew" <<isforw<< std::endl;
165 
166  etaLow -= regionEtaMargin_;
167  etaHigh += regionEtaMargin_;
168  phiLow -= regionPhiMargin_;
169  phiHigh += regionPhiMargin_;
170 
171  //if (emItr->gctEmCand()->regionId().isForward()) {
172  if (isforw) {
173  if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
174  if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
175  RectangularEtaPhiRegion region(etaLow,etaHigh,phiLow,phiHigh);
176  endcapRegions.push_back(region);
177  }
178  if (isbarl) {
179  if (etaHigh>1.479) etaHigh=1.479;
180  if (etaLow<-1.479) etaLow=-1.479;
181  RectangularEtaPhiRegion region(etaLow,etaHigh,phiLow,phiHigh);
182  barrelRegions.push_back(region);
183  }
184  RectangularEtaPhiRegion region(etaLow,etaHigh,phiLow,phiHigh);
185 
186  }
187  }
188  }
189 
190 
192  for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
193 
194  if(doIsolated_&&emItr->et()<l1LowerThrIgnoreIsolation_) continue;
195 
196  if (emItr->et() > l1LowerThr_ && emItr->et() < l1UpperThr_) {
197 
198  // Access the GCT hardware object corresponding to the L1Extra EM object.
199  int etaIndex = emItr->gctEmCand()->etaIndex() ;
200 
201 
202  int phiIndex = emItr->gctEmCand()->phiIndex() ;
203  // Use the L1CaloGeometry to find the eta, phi bin boundaries.
204  double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
205  double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
206  double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
207  double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
208 
209 
210  int isforw=0;
211  int isbarl=0;
212  if((float)(etaHigh)>1.479 || (float)(etaLow)<-1.479) isforw=1;
213  if(((float)(etaLow)>-1.479 && (float)(etaLow)<1.479) ||
214  ((float)(etaHigh)>-1.479 && (float)(etaHigh)<1.479)) isbarl=1;
215 
216  //std::cout<<"Multi5x5 etaindex "<<etaIndex<<" low hig : "<<etaLow<<" "<<etaHigh<<" phi low hig" <<phiLow<<" " << phiHigh<<" isforw "<<emItr->gctEmCand()->regionId().isForward()<<" isforwnew" <<isforw<< std::endl;
217 
218  etaLow -= regionEtaMargin_;
219  etaHigh += regionEtaMargin_;
220  phiLow -= regionPhiMargin_;
221  phiHigh += regionPhiMargin_;
222 
223  //if (emItr->gctEmCand()->regionId().isForward()) {
224  if (isforw) {
225  if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
226  if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
227  RectangularEtaPhiRegion region(etaLow,etaHigh,phiLow,phiHigh);
228  endcapRegions.push_back(region);
229  }
230  if (isbarl) {
231  if (etaHigh>1.479) etaHigh=1.479;
232  if (etaLow<-1.479) etaLow=-1.479;
233  RectangularEtaPhiRegion region(etaLow,etaHigh,phiLow,phiHigh);
234  barrelRegions.push_back(region);
235  }
236 
237  }
238  }
239  }
240 
241 
242  if (doEndcaps_) {
244  }
245  if (doBarrel_) {
247  }
248  nEvt_++;
249 }
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagNonIsolated_
void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, edm::EDGetTokenT< EcalRecHitCollection > &hitToken, const std::string &clusterCollection, const std::vector< RectangularEtaPhiRegion > &regions, const reco::CaloID::Detectors detector)
edm::EDGetTokenT< EcalRecHitCollection > barrelHitToken_
edm::EDGetTokenT< EcalRecHitCollection > endcapHitToken_
T get() const
Definition: EventSetup.h:63
double emJetPhiBinLowEdge(unsigned int phiIndex) const
double emJetPhiBinHighEdge(unsigned int phiIndex) const
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagIsolated_

Member Data Documentation

std::string EgammaHLTMulti5x5ClusterProducer::barrelClusterCollection_
private
edm::InputTag EgammaHLTMulti5x5ClusterProducer::barrelHitCollection_
private

Definition at line 44 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer().

edm::EDGetTokenT<EcalRecHitCollection> EgammaHLTMulti5x5ClusterProducer::barrelHitToken_
private

Definition at line 46 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

bool EgammaHLTMulti5x5ClusterProducer::doBarrel_
private

Definition at line 38 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

bool EgammaHLTMulti5x5ClusterProducer::doEndcaps_
private

Definition at line 39 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

bool EgammaHLTMulti5x5ClusterProducer::doIsolated_
private

Definition at line 40 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

std::string EgammaHLTMulti5x5ClusterProducer::endcapClusterCollection_
private
edm::InputTag EgammaHLTMulti5x5ClusterProducer::endcapHitCollection_
private

Definition at line 45 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer().

edm::EDGetTokenT<EcalRecHitCollection> EgammaHLTMulti5x5ClusterProducer::endcapHitToken_
private

Definition at line 47 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

double EgammaHLTMulti5x5ClusterProducer::l1LowerThr_
private

Definition at line 52 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

double EgammaHLTMulti5x5ClusterProducer::l1LowerThrIgnoreIsolation_
private

Definition at line 54 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

edm::EDGetTokenT<l1extra::L1EmParticleCollection> EgammaHLTMulti5x5ClusterProducer::l1TagIsolated_
private

Definition at line 42 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

edm::EDGetTokenT<l1extra::L1EmParticleCollection> EgammaHLTMulti5x5ClusterProducer::l1TagNonIsolated_
private

Definition at line 43 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

double EgammaHLTMulti5x5ClusterProducer::l1UpperThr_
private

Definition at line 53 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

Multi5x5ClusterAlgo* EgammaHLTMulti5x5ClusterProducer::Multi5x5_p
private
int EgammaHLTMulti5x5ClusterProducer::nEvt_
private

Definition at line 36 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

int EgammaHLTMulti5x5ClusterProducer::nMaxPrintout_
private

Definition at line 35 of file EgammaHLTMulti5x5ClusterProducer.h.

PositionCalc EgammaHLTMulti5x5ClusterProducer::posCalculator_
private

Definition at line 59 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer().

double EgammaHLTMulti5x5ClusterProducer::regionEtaMargin_
private

Definition at line 56 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().

double EgammaHLTMulti5x5ClusterProducer::regionPhiMargin_
private

Definition at line 57 of file EgammaHLTMulti5x5ClusterProducer.h.

Referenced by EgammaHLTMulti5x5ClusterProducer(), and produce().