119 using namespace reco;
143 auto jetRecHits = std::make_unique<EMLorentzVectorCollection>();
145 for (
size_t t = 0;
t < jets->size();
t++)
147 const std::vector<CaloTowerPtr> myTowers=(*jets)[
t].getCaloConstituents();
150 for (
unsigned int iTower = 0; iTower < myTowers.size(); iTower++)
155 for (
size_t j = 0; j < numRecHits; j++) {
159 int EcalNum = RecHitDetID.
subdetId();
163 if(theRecHit != EBRecHits->
end()){
164 DetId id = theRecHit->detid();
167 const GlobalPoint& posi = this_cell->getPosition();
168 double energy = theRecHit->energy();
173 double et = energy *
sin(theta);
176 jetRecHits->push_back(
p);
179 }
else if ( EcalNum == 2 ) {
182 if(theRecHit != EBRecHits->
end()){
183 DetId id = theRecHit->detid();
186 const GlobalPoint& posi = this_cell->getPosition();
187 double energy = theRecHit->energy();
188 double eta = posi.
eta();
189 double phi = posi.
phi();
190 double theta = posi.
theta();
192 double et = energy *
sin(theta);
195 jetRecHits->push_back(
p);
edm::InputTag m_EBRecHits
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
size_t constituentsSize() const
std::unique_ptr< JetCrystalsAssociationCollection > associate(const edm::Handle< CaloJetCollection > &jets, const edm::OrphanHandle< EMLorentzVectorCollection > &myLorentzRecHits) const
DetId constituent(size_t i) const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
std::vector< EcalRecHit >::const_iterator const_iterator
Geom::Theta< T > theta() const
Geom::Theta< T > theta() const
edm::InputTag m_EERecHits
constexpr 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
const_iterator end() const
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
math::PtEtaPhiELorentzVector EMLorentzVector
et
define resolution functions of each parameter
ESHandle< TrackerGeometry > geometry
iterator find(key_type k)
constexpr Detector det() const
get the detector field from this detid