CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
L2TauModularIsolationProducer Class Reference

#include <L2TauModularIsolationProducer.h>

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

Classes

struct  RecHitPtComparator
 

Public Member Functions

 L2TauModularIsolationProducer (const edm::ParameterSet &)
 
 ~L2TauModularIsolationProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
math::PtEtaPhiELorentzVectorCollection getECALHits (const reco::CaloJet &, const edm::Event &, const edm::EventSetup &iSetup)
 
math::PtEtaPhiELorentzVectorCollection getHCALHits (const reco::CaloJet &, const edm::Event &)
 
math::PtEtaPhiELorentzVectorCollection getPFClusters (const reco::CaloJet &, const edm::Event &, const edm::EDGetTokenT< reco::PFClusterCollection > &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

double associationRadius_
 
edm::EDGetTokenT
< CaloTowerCollection
caloTowers_
 
RecHitPtComparator comparePt
 
double crystalThresholdB_
 
double crystalThresholdE_
 
edm::EDGetTokenT
< EBRecHitCollection
EBRecHits_
 
std::string ecalClusteringAlg_
 
std::string ecalIsolationAlg_
 
edm::EDGetTokenT
< EERecHitCollection
EERecHits_
 
std::string hcalClusteringAlg_
 
std::string hcalIsolationAlg_
 
double innerConeECAL_
 
double innerConeHCAL_
 
edm::EDGetTokenT
< reco::CaloJetCollection
l2CaloJets_
 
double outerConeECAL_
 
double outerConeHCAL_
 
edm::EDGetTokenT
< reco::PFClusterCollection
pfClustersECAL_
 
edm::EDGetTokenT
< reco::PFClusterCollection
pfClustersHCAL_
 
double simpleClusterRadiusECAL_
 
double simpleClusterRadiusHCAL_
 
double towerThreshold_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 53 of file L2TauModularIsolationProducer.h.

Constructor & Destructor Documentation

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

Definition at line 10 of file L2TauModularIsolationProducer.cc.

10  :
11  l2CaloJets_(consumes<CaloJetCollection>(iConfig.getParameter<edm::InputTag>("L2TauJetCollection"))),
12  EBRecHits_(consumes<EBRecHitCollection>(iConfig.getParameter<edm::InputTag>("EBRecHits"))),
13  EERecHits_(consumes<EERecHitCollection>(iConfig.getParameter<edm::InputTag>("EERecHits"))),
14  caloTowers_(consumes<CaloTowerCollection>(iConfig.getParameter<edm::InputTag>("CaloTowers"))),
15  pfClustersECAL_(consumes<PFClusterCollection>(iConfig.getParameter<edm::InputTag>("pfClustersECAL"))),
16  pfClustersHCAL_(consumes<PFClusterCollection>(iConfig.getParameter<edm::InputTag>("pfClustersHCAL"))),
17  ecalIsolationAlg_(iConfig.getParameter<std::string>("ecalIsolationAlgorithm")),
18  hcalIsolationAlg_(iConfig.getParameter<std::string>("hcalIsolationAlgorithm")),
19  ecalClusteringAlg_(iConfig.getParameter<std::string>("ecalClusteringAlgorithm")),
20  hcalClusteringAlg_(iConfig.getParameter<std::string>("hcalClusteringAlgorithm")),
21  associationRadius_(iConfig.getParameter<double>("associationRadius")),
22  simpleClusterRadiusECAL_(iConfig.getParameter<double>("simpleClusterRadiusEcal")),
23  simpleClusterRadiusHCAL_(iConfig.getParameter<double>("simpleClusterRadiusHcal")),
24  innerConeECAL_(iConfig.getParameter<double>("innerConeECAL")),
25  outerConeECAL_(iConfig.getParameter<double>("outerConeECAL")),
26  innerConeHCAL_(iConfig.getParameter<double>("innerConeHCAL")),
27  outerConeHCAL_(iConfig.getParameter<double>("outerConeHCAL")),
28  crystalThresholdE_(iConfig.getParameter<double>("crystalThresholdEE")),
29  crystalThresholdB_(iConfig.getParameter<double>("crystalThresholdEB")),
30  towerThreshold_(iConfig.getParameter<double>("towerThreshold"))
31 
32  {
33 
34  //Add the products
35  produces<L2TauInfoAssociation>();
36 
37 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::PFClusterCollection > pfClustersECAL_
edm::EDGetTokenT< reco::CaloJetCollection > l2CaloJets_
edm::EDGetTokenT< CaloTowerCollection > caloTowers_
edm::EDGetTokenT< EERecHitCollection > EERecHits_
edm::EDGetTokenT< EBRecHitCollection > EBRecHits_
edm::EDGetTokenT< reco::PFClusterCollection > pfClustersHCAL_
L2TauModularIsolationProducer::~L2TauModularIsolationProducer ( )

Definition at line 40 of file L2TauModularIsolationProducer.cc.

41 {
42  //Destruction
43 
44 }

Member Function Documentation

void L2TauModularIsolationProducer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 206 of file L2TauModularIsolationProducer.cc.

207 {
208 }
void L2TauModularIsolationProducer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 212 of file L2TauModularIsolationProducer.cc.

212  {
213 }
math::PtEtaPhiELorentzVectorCollection L2TauModularIsolationProducer::getECALHits ( const reco::CaloJet jet,
const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 244 of file L2TauModularIsolationProducer.cc.

References associationRadius_, comparePt, crystalThresholdB_, crystalThresholdE_, egHLT::errCodes::EBRecHits, EBRecHits_, DetId::Ecal, EcalBarrel, EcalEndcap, HWWFunctions::EE, egHLT::errCodes::EERecHits, EERecHits_, relval_parameters_module::energy, PV3DBase< T, PVType, FrameType >::eta(), eta(), geometry, edm::EventSetup::get(), edm::Event::getByToken(), CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), M_PI, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::p4(), phi, PV3DBase< T, PVType, FrameType >::phi(), funct::sin(), python.multivaluedict::sort(), PV3DBase< T, PVType, FrameType >::theta(), and theta().

Referenced by produce().

245 {
246  //Init Geometry
248  iSetup.get<CaloGeometryRecord>().get(geometry);
249 
250  //Create ECAL Geometry
251  const CaloSubdetectorGeometry* EB = geometry->getSubdetectorGeometry(DetId::Ecal,EcalBarrel);
252  const CaloSubdetectorGeometry* EE = geometry->getSubdetectorGeometry(DetId::Ecal,EcalEndcap);
253 
254  //Handle To the ECAL
257 
258  //Create a container for the hits
260 
261  //Loop on the barrel hits
262  if(iEvent.getByToken(EBRecHits_, EBRecHits))
263  for(EBRecHitCollection::const_iterator hit = EBRecHits->begin();hit!=EBRecHits->end();++hit)
264  {
265  //get Detector Geometry
266  const CaloCellGeometry* this_cell = EB->getGeometry(hit->detid());
267  GlobalPoint posi = this_cell->getPosition();
268  double energy = hit->energy();
269  double eta = posi.eta();
270  double phi = posi.phi();
271  double theta = posi.theta();
272  if(theta > M_PI) theta = 2 * M_PI- theta;
273  double et = energy * sin(theta);
274  math::PtEtaPhiELorentzVector p(et, eta, phi, energy);
275  if(ROOT::Math::VectorUtil::DeltaR(p,jet.p4()) <associationRadius_)
276  if(p.pt()>crystalThresholdB_)
277  jetRecHits.push_back(p);
278  }
279 
280  if(iEvent.getByToken(EERecHits_, EERecHits))
281  for(EERecHitCollection::const_iterator hit = EERecHits->begin();hit!=EERecHits->end();++hit)
282  {
283  //get Detector Geometry
284  const CaloCellGeometry* this_cell = EE->getGeometry(hit->detid());
285  GlobalPoint posi = this_cell->getPosition();
286  double energy = hit->energy();
287  double eta = posi.eta();
288  double phi = posi.phi();
289  double theta = posi.theta();
290  if(theta > M_PI) theta = 2 * M_PI- theta;
291  double et = energy * sin(theta);
292  math::PtEtaPhiELorentzVector p(et, eta, phi, energy);
293  if(ROOT::Math::VectorUtil::DeltaR(p,jet.p4()) < associationRadius_)
294  if(p.pt()>crystalThresholdE_)
295  jetRecHits.push_back(p);
296  }
297 
298  if(jetRecHits.size()>0)
299  std::sort(jetRecHits.begin(),jetRecHits.end(),comparePt);
300 
301  return jetRecHits;
302 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
std::vector< EcalRecHit >::const_iterator const_iterator
Geom::Theta< T > theta() const
T eta() const
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
std::vector< PtEtaPhiELorentzVector > PtEtaPhiELorentzVectorCollection
#define M_PI
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:27
const T & get() const
Definition: EventSetup.h:55
T eta() const
Definition: PV3DBase.h:76
ESHandle< TrackerGeometry > geometry
edm::EDGetTokenT< EERecHitCollection > EERecHits_
edm::EDGetTokenT< EBRecHitCollection > EBRecHits_
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: DDAxes.h:10
math::PtEtaPhiELorentzVectorCollection L2TauModularIsolationProducer::getHCALHits ( const reco::CaloJet jet,
const edm::Event iEvent 
)
private

Definition at line 219 of file L2TauModularIsolationProducer.cc.

References associationRadius_, caloTowers_, comparePt, relval_parameters_module::energy, eta(), edm::Event::getByToken(), i, reco::LeafCandidate::p4(), phi, python.multivaluedict::sort(), and towerThreshold_.

Referenced by produce().

220 {
222 
224 
225  if(iEvent.getByToken(caloTowers_,towers))
226  if(towers->size()>0)
227  for(size_t i=0;i<towers->size();++i)
228  {
229  math::PtEtaPhiELorentzVector tower((*towers)[i].et(),(*towers)[i].eta(),(*towers)[i].phi(),(*towers)[i].energy());
230  if(ROOT::Math::VectorUtil::DeltaR(tower,jet.p4()) <associationRadius_)
231  {
232  if(tower.pt()>towerThreshold_)
233  towers2.push_back(tower);
234  }
235  }
236 
237  if(towers2.size()>0)
238  std::sort(towers2.begin(),towers2.end(),comparePt);
239  return towers2;
240 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
T eta() const
edm::EDGetTokenT< CaloTowerCollection > caloTowers_
std::vector< PtEtaPhiELorentzVector > PtEtaPhiELorentzVectorCollection
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:27
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: DDAxes.h:10
math::PtEtaPhiELorentzVectorCollection L2TauModularIsolationProducer::getPFClusters ( const reco::CaloJet jet,
const edm::Event iEvent,
const edm::EDGetTokenT< reco::PFClusterCollection > &  input 
)
private

Definition at line 307 of file L2TauModularIsolationProducer.cc.

References associationRadius_, EnergyCorrector::c, comparePt, relval_parameters_module::energy, eta(), edm::Event::getByToken(), M_PI, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::p4(), phi, funct::sin(), python.multivaluedict::sort(), and theta().

Referenced by produce().

308 {
311 
312  //get Clusters near the jet
313  if(iEvent.getByToken(input,clusters))
314  if(clusters->size()>0)
315  for(PFClusterCollection::const_iterator c = clusters->begin();c!=clusters->end();++c)
316  {
317  double energy = c->energy();
318  double eta = c->eta();
319  double phi = c->phi();
320  double theta = c->position().theta();
321  if(theta > M_PI) theta = 2 * M_PI- theta;
322  double et = energy * sin(theta);
323  math::PtEtaPhiELorentzVector p(et, eta, phi, energy);
324 
325  if(ROOT::Math::VectorUtil::DeltaR(p,jet.p4()) < associationRadius_)
326  clusters2.push_back(p);
327  }
328 
329  if(clusters2.size()>0)
330  std::sort(clusters2.begin(),clusters2.end(),comparePt);
331  return clusters2;
332 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
T eta() const
std::vector< PtEtaPhiELorentzVector > PtEtaPhiELorentzVectorCollection
#define M_PI
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:27
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: DDAxes.h:10
void L2TauModularIsolationProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 49 of file L2TauModularIsolationProducer.cc.

References L2TauSimpleClustering::clusterize(), L2TauIsolationAlgs::clusterShape(), ecalClusteringAlg_, ecalIsolationAlg_, edm::Event::getByToken(), getECALHits(), getHCALHits(), getPFClusters(), hcalClusteringAlg_, hcalIsolationAlg_, spr::hitsHCAL(), info(), innerConeECAL_, innerConeHCAL_, L2TauIsolationAlgs::isolatedEt(), l2CaloJets_, L2TauIsolationAlgs::nClustersAnnulus(), outerConeECAL_, outerConeHCAL_, pfClustersECAL_, pfClustersHCAL_, edm::Event::put(), reco::L2TauIsolationInfo::setEcalClusterShape(), reco::L2TauIsolationInfo::setEcalIsolEt(), reco::L2TauIsolationInfo::setHcalClusterShape(), reco::L2TauIsolationInfo::setHcalIsolEt(), reco::L2TauIsolationInfo::setNEcalHits(), reco::L2TauIsolationInfo::setNHcalHits(), reco::L2TauIsolationInfo::setSeedEcalHitEt(), reco::L2TauIsolationInfo::setSeedHcalHitEt(), simpleClusterRadiusECAL_, and simpleClusterRadiusHCAL_.

50 {
51  edm::Handle<CaloJetCollection> l2CaloJets; //Handle to the input (L2TauCaloJets);
52  iEvent.getByToken(l2CaloJets_ ,l2CaloJets);//get the handle
53 
54  //Create the Association
55  std::auto_ptr<L2TauInfoAssociation> l2InfoAssoc( new L2TauInfoAssociation);
56 
57  //If the JetCrystalsAssociation exists -> RUN The Producer
58  if(l2CaloJets->size()>0)
59  {
60  CaloJetCollection::const_iterator jcStart = l2CaloJets->begin();
61  //Loop on Jets
62  for(CaloJetCollection::const_iterator jc = jcStart ;jc!=l2CaloJets->end();++jc)
63  {
64  //Create Algorithm Object
66  //Create Info Object
68 
69  //Define objects to be loaded from file:
74 
75  if(ecalIsolationAlg_=="recHits" || ecalClusteringAlg_=="recHits" || ecalIsolationAlg_ =="simpleClusters" ||ecalClusteringAlg_ =="simpleClusters")
76  hitsECAL =getECALHits(*jc,iEvent,iSetup);
77 
78  if(hcalIsolationAlg_=="recHits" || hcalClusteringAlg_=="recHits" || hcalIsolationAlg_ =="simpleClusters" ||hcalClusteringAlg_ =="simpleClusters")
79  hitsHCAL =getHCALHits(*jc,iEvent);
80 
81  if(ecalIsolationAlg_=="particleFlow" || ecalClusteringAlg_=="particleFlow")
82  pfClustersECAL =getPFClusters(*jc,iEvent,pfClustersECAL_);
83 
84  if(hcalIsolationAlg_=="particleFlow" || hcalClusteringAlg_=="particleFlow")
85  pfClustersHCAL =getPFClusters(*jc,iEvent,pfClustersHCAL_);
86 
87 
88 
89  //Do ECAL Isolation
90 
91  if(ecalIsolationAlg_ == "recHits")
92  {
93  //Use Rechits
94  info.setEcalIsolEt( alg.isolatedEt(hitsECAL , jc->p4().Vect(), innerConeECAL_,outerConeECAL_) );
95  }
96  else if(ecalIsolationAlg_ == "simpleClusters")
97  {
98  //create the simple clusters
100  math::PtEtaPhiELorentzVectorCollection clusters = clustering.clusterize(hitsECAL);
101  info.setEcalIsolEt( alg.isolatedEt(clusters , jc->p4().Vect(), innerConeECAL_,outerConeECAL_) );
102 
103  }
104  else if(ecalIsolationAlg_ == "particleFlow")
105  {
106  //Use ParticleFlow
107  info.setEcalIsolEt( alg.isolatedEt(pfClustersECAL , jc->p4().Vect(), innerConeECAL_,outerConeECAL_) );
108  }
109 
110  //Do ECAL Clustering
111 
112  if(ecalClusteringAlg_ == "recHits")
113  {
114  //Use Rechits
115  info.setEcalClusterShape(alg.clusterShape(hitsECAL,jc->p4().Vect(),0.,outerConeECAL_) );
116  info.setNEcalHits( alg.nClustersAnnulus(hitsECAL , jc->p4().Vect(), innerConeECAL_,outerConeECAL_));
117  if(hitsECAL.size()>0)
118  info.setSeedEcalHitEt(hitsECAL[0].pt());
119 
120  }
121  else if(ecalClusteringAlg_ == "simpleClusters")
122  {
123  //create the simple clusters
125  math::PtEtaPhiELorentzVectorCollection clusters = clustering.clusterize(hitsECAL);
126  info.setEcalClusterShape(alg.clusterShape(clusters,jc->p4().Vect(),0.,outerConeECAL_) );
127  info.setNEcalHits( alg.nClustersAnnulus(clusters, jc->p4().Vect(), innerConeECAL_,outerConeECAL_));
128 
129  if(clusters.size()>0)
130  info.setSeedEcalHitEt(clusters[0].pt());
131  }
132  else if(ecalClusteringAlg_ == "particleFlow")
133  {
134  //Use ParticleFlow
135  info.setEcalClusterShape(alg.clusterShape(pfClustersECAL,jc->p4().Vect(),0.,outerConeECAL_) );
136  info.setNEcalHits( alg.nClustersAnnulus(pfClustersECAL, jc->p4().Vect(), innerConeECAL_,outerConeECAL_));
137  if(pfClustersECAL.size()>0)
138  info.setSeedEcalHitEt(pfClustersECAL[0].pt());
139  }
140 
141 
142  //Do HCAL Isolation
143 
144  if(hcalIsolationAlg_ == "recHits")
145  {
146  //Use Rechits
147  info.setHcalIsolEt( alg.isolatedEt(hitsHCAL , jc->p4().Vect(), innerConeHCAL_,outerConeHCAL_) );
148  }
149  else if(hcalIsolationAlg_ == "simpleClusters")
150  {
151  //create the simple clusters
153  math::PtEtaPhiELorentzVectorCollection clusters = clustering.clusterize(hitsHCAL);
154  info.setHcalIsolEt( alg.isolatedEt(clusters , jc->p4().Vect(), innerConeHCAL_,outerConeHCAL_) );
155 
156  }
157  else if(hcalIsolationAlg_ == "particleFlow")
158  {
159  //Use ParticleFlow
160  info.setHcalIsolEt( alg.isolatedEt(pfClustersHCAL , jc->p4().Vect(), innerConeHCAL_,outerConeHCAL_) );
161  }
162 
163 
164 
165  //Do HCAL Clustering
166 
167  if(hcalClusteringAlg_ == "recHits")
168  {
169  //Use Rechits
170  info.setHcalClusterShape(alg.clusterShape(hitsHCAL,jc->p4().Vect(),0.,outerConeHCAL_) );
171  info.setNHcalHits( alg.nClustersAnnulus(hitsHCAL, jc->p4().Vect(), innerConeHCAL_,outerConeHCAL_));
172  if(hitsHCAL.size()>0)
173  info.setSeedHcalHitEt(hitsHCAL[0].pt());
174  }
175  else if(hcalClusteringAlg_ == "simpleClusters")
176  {
177  //create the simple clusters
179  math::PtEtaPhiELorentzVectorCollection clusters = clustering.clusterize(hitsHCAL);
180  info.setHcalClusterShape(alg.clusterShape(clusters,jc->p4().Vect(),0.,outerConeHCAL_) );
181  info.setNHcalHits( alg.nClustersAnnulus(clusters, jc->p4().Vect(), innerConeHCAL_,outerConeHCAL_));
182  if(clusters.size()>0)
183  info.setSeedHcalHitEt(clusters[0].pt());
184  }
185  else if(hcalClusteringAlg_ == "particleFlow")
186  {
187  //Use ParticleFlow
188  info.setHcalClusterShape(alg.clusterShape(pfClustersHCAL,jc->p4().Vect(),0.,outerConeHCAL_) );
189  info.setNHcalHits( alg.nClustersAnnulus(pfClustersHCAL, jc->p4().Vect(), innerConeHCAL_,outerConeHCAL_));
190  if(pfClustersHCAL.size()>0)
191  info.setSeedHcalHitEt(pfClustersHCAL[0].pt());
192  }
193 
194  //Store the info Class
195  edm::Ref<CaloJetCollection> jcRef(l2CaloJets,jc-jcStart);
196  l2InfoAssoc->insert(jcRef, info);
197  }
198 
199  } //end of if(*jetCrystalsObj)
200 
201  iEvent.put(l2InfoAssoc);
202 }
void setSeedHcalHitEt(double et)
static const TGPicture * info(bool iBackgroundIsBlack)
void setEcalClusterShape(const std::vector< double > &shape)
edm::EDGetTokenT< reco::PFClusterCollection > pfClustersECAL_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
math::PtEtaPhiELorentzVectorCollection getPFClusters(const reco::CaloJet &, const edm::Event &, const edm::EDGetTokenT< reco::PFClusterCollection > &)
void setHcalClusterShape(const std::vector< double > &shape)
edm::EDGetTokenT< reco::CaloJetCollection > l2CaloJets_
math::PtEtaPhiELorentzVectorCollection getECALHits(const reco::CaloJet &, const edm::Event &, const edm::EventSetup &iSetup)
void setSeedEcalHitEt(double et)
double isolatedEt(const math::PtEtaPhiELorentzVectorCollection &, const math::XYZVector &, double innerCone, double outerCone) const
std::vector< PtEtaPhiELorentzVector > PtEtaPhiELorentzVectorCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
math::PtEtaPhiELorentzVectorCollection getHCALHits(const reco::CaloJet &, const edm::Event &)
void hitsHCAL(std::vector< DetId > &vdets, edm::Handle< T > &hits, std::vector< typename T::const_iterator > &hitlist, bool debug=false)
int nClustersAnnulus(const math::PtEtaPhiELorentzVectorCollection &, const math::XYZVector &, double innerCone, double outerCone) const
std::vector< double > clusterShape(const math::PtEtaPhiELorentzVectorCollection &, const math::XYZVector &, double innerCone, double outerCone) const
edm::EDGetTokenT< reco::PFClusterCollection > pfClustersHCAL_

Member Data Documentation

double L2TauModularIsolationProducer::associationRadius_
private

Definition at line 81 of file L2TauModularIsolationProducer.h.

Referenced by getECALHits(), getHCALHits(), and getPFClusters().

edm::EDGetTokenT<CaloTowerCollection> L2TauModularIsolationProducer::caloTowers_
private

Definition at line 71 of file L2TauModularIsolationProducer.h.

Referenced by getHCALHits().

RecHitPtComparator L2TauModularIsolationProducer::comparePt
private

Definition at line 104 of file L2TauModularIsolationProducer.h.

Referenced by getECALHits(), getHCALHits(), and getPFClusters().

double L2TauModularIsolationProducer::crystalThresholdB_
private

Definition at line 92 of file L2TauModularIsolationProducer.h.

Referenced by getECALHits().

double L2TauModularIsolationProducer::crystalThresholdE_
private

Definition at line 91 of file L2TauModularIsolationProducer.h.

Referenced by getECALHits().

edm::EDGetTokenT<EBRecHitCollection> L2TauModularIsolationProducer::EBRecHits_
private

Definition at line 69 of file L2TauModularIsolationProducer.h.

Referenced by getECALHits().

std::string L2TauModularIsolationProducer::ecalClusteringAlg_
private

Definition at line 78 of file L2TauModularIsolationProducer.h.

Referenced by produce().

std::string L2TauModularIsolationProducer::ecalIsolationAlg_
private

Definition at line 76 of file L2TauModularIsolationProducer.h.

Referenced by produce().

edm::EDGetTokenT<EERecHitCollection> L2TauModularIsolationProducer::EERecHits_
private

Definition at line 70 of file L2TauModularIsolationProducer.h.

Referenced by getECALHits().

std::string L2TauModularIsolationProducer::hcalClusteringAlg_
private

Definition at line 79 of file L2TauModularIsolationProducer.h.

Referenced by produce().

std::string L2TauModularIsolationProducer::hcalIsolationAlg_
private

Definition at line 77 of file L2TauModularIsolationProducer.h.

Referenced by produce().

double L2TauModularIsolationProducer::innerConeECAL_
private

Definition at line 85 of file L2TauModularIsolationProducer.h.

Referenced by produce().

double L2TauModularIsolationProducer::innerConeHCAL_
private

Definition at line 87 of file L2TauModularIsolationProducer.h.

Referenced by produce().

edm::EDGetTokenT<reco::CaloJetCollection> L2TauModularIsolationProducer::l2CaloJets_
private

Definition at line 68 of file L2TauModularIsolationProducer.h.

Referenced by produce().

double L2TauModularIsolationProducer::outerConeECAL_
private

Definition at line 86 of file L2TauModularIsolationProducer.h.

Referenced by produce().

double L2TauModularIsolationProducer::outerConeHCAL_
private

Definition at line 88 of file L2TauModularIsolationProducer.h.

Referenced by produce().

edm::EDGetTokenT<reco::PFClusterCollection> L2TauModularIsolationProducer::pfClustersECAL_
private

Definition at line 72 of file L2TauModularIsolationProducer.h.

Referenced by produce().

edm::EDGetTokenT<reco::PFClusterCollection> L2TauModularIsolationProducer::pfClustersHCAL_
private

Definition at line 73 of file L2TauModularIsolationProducer.h.

Referenced by produce().

double L2TauModularIsolationProducer::simpleClusterRadiusECAL_
private

Definition at line 83 of file L2TauModularIsolationProducer.h.

Referenced by produce().

double L2TauModularIsolationProducer::simpleClusterRadiusHCAL_
private

Definition at line 84 of file L2TauModularIsolationProducer.h.

Referenced by produce().

double L2TauModularIsolationProducer::towerThreshold_
private

Definition at line 93 of file L2TauModularIsolationProducer.h.

Referenced by getHCALHits().