9 l2CaloJets_(iConfig.getParameter<edm::InputTag>(
"L2TauJetCollection")),
10 EBRecHits_(iConfig.getParameter<edm::InputTag>(
"EBRecHits")),
11 EERecHits_(iConfig.getParameter<edm::InputTag>(
"EERecHits")),
12 crystalThreshold_(iConfig.getParameter<double>(
"crystalThreshold")),
13 towerThreshold_(iConfig.getParameter<double>(
"towerThreshold"))
39 produces<L2TauInfoAssociation>();
64 if(l2CaloJets->size()>0)
66 CaloJetCollection::const_iterator jcStart = l2CaloJets->begin();
69 for(CaloJetCollection::const_iterator jc = jcStart ;jc!=l2CaloJets->end();++jc)
105 if(hitsHCAL.size()>0)
111 l2InfoAssoc->insert(jcRef, info);
117 iEvent.
put(l2InfoAssoc);
142 for(
size_t i=0;
i<towers.size();++
i)
187 for (
unsigned int iTower = 0; iTower < myTowers.size(); iTower++)
190 size_t numRecHits = theTower->constituentsSize();
192 for (
size_t j = 0;
j < numRecHits;
j++) {
193 DetId RecHitDetID=theTower->constituent(
j);
196 int EcalNum = RecHitDetID.
subdetId();
200 if(theRecHit != EBRecHits->end()){
201 DetId id = theRecHit->detid();
205 double energy = theRecHit->energy();
210 double et = energy *
sin(theta);
220 jetRecHits.push_back(p);
226 }
else if ( EcalNum == 2 ) {
229 if(theRecHit != EBRecHits->end()){
230 DetId id = theRecHit->detid();
234 double energy = theRecHit->energy();
239 double et = energy *
sin(theta);
249 jetRecHits.push_back(p);
260 if(jetRecHits.size()>0)
261 std::swap(jetRecHits[ref_id],jetRecHits[0]);
math::PtEtaPhiELorentzVectorCollection clusterize(const math::PtEtaPhiELorentzVectorCollection &)
void setSeedHcalHitEt(double et)
T getParameter(std::string const &) const
math::PtEtaPhiELorentzVectorCollection getHCALHits(const reco::CaloJet &)
Jets made from CaloTowers.
void setEcalClusterShape(const std::vector< double > &shape)
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
std::vector< EcalRecHit >::const_iterator const_iterator
Geom::Theta< T > theta() const
virtual std::vector< CaloTowerPtr > getCaloConstituents() const
get all constituents
double TowerIsolation_innerCone_
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
void setSeedEcalHitEt(double et)
void setEcalIsolEt(double et)
void setNEcalHits(int hits)
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.
double ECALIsolation_innerCone_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
void setHcalIsolEt(double et)
void hitsHCAL(std::vector< DetId > &vdets, edm::Handle< T > &hits, std::vector< typename T::const_iterator > &hitlist, bool debug=false)
edm::InputTag l2CaloJets_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
double TowerIsolation_outerCone_
~L2TauIsolationProducer()
double ECALClustering_clusterRadius_
ESHandle< TrackerGeometry > geometry
std::vector< double > clusterShape(const math::PtEtaPhiELorentzVectorCollection &, const math::XYZVector &, double innerCone, double outerCone) const
virtual void produce(edm::Event &, const edm::EventSetup &) override
double ECALIsolation_outerCone_
L2TauIsolationProducer(const edm::ParameterSet &)
Detector det() const
get the detector field from this detid
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
math::PtEtaPhiELorentzVectorCollection getECALHits(const reco::CaloJet &, const edm::Event &, const edm::EventSetup &iSetup)