64 produces<CaloTowerCollection>();
96 for (reco::PFCandidateCollection::const_iterator ci = inputsHandle->begin(); ci != inputsHandle->end(); ++ci) {
102 double eta = particle.
eta();
104 if (!
useHF_ && fabs(eta) > 3.)
118 else if (fabs(eta) < 3.)
148 auto prod = std::make_unique<CaloTowerCollection>();
150 for (std::map<DetId, double>::const_iterator iter =
towers_.begin(); iter !=
towers_.end(); ++iter) {
153 double et = iter->second;
165 CaloTower newTower(newTowerId, et, 0, 0, 0, 0, p4, pos, pos);
166 prod->push_back(newTower);
192 const double etatow[42] = {0.000, 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.870,
193 0.957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479, 1.566, 1.653, 1.740, 1.830,
194 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.853, 3.000, 3.139, 3.314, 3.489,
195 3.664, 3.839, 4.013, 4.191, 4.363, 4.538, 4.716, 4.889, 5.191};
243 for (
int i = 1;
i < 30;
i++) {
249 for (
int i = 30;
i < 42;
i++) {
262 for (std::vector<DetId>::const_iterator did = alldid.begin(); did != alldid.end(); did++) {
265 if (hid.
depth() == 1) {
269 if (fabs(pos.
eta()) > 3.)
303 for (std::vector<DetId>::const_iterator did = alldid.begin(); did != alldid.end(); did++) {
309 if (hid.
depth() != 1)
314 double hcalEta = pos.
eta();
315 double hcalPhi = pos.
phi();
324 double towersize = 0.087;
328 if (
abs(ieta) > 21) {
334 else if (
abs(ieta) == 23)
336 else if (
abs(ieta) == 24)
338 else if (
abs(ieta) == 25)
340 else if (
abs(ieta) == 26)
342 else if (
abs(ieta) == 27)
344 else if (
abs(ieta) == 28)
346 else if (
abs(ieta) == 29)
354 if (deltaR < minDeltaR) {
355 returnId =
DetId(*did);
378 for (std::vector<DetId>::const_iterator did = alldid.begin(); did != alldid.end(); did++) {
384 if (hid.
depth() != 1)
389 double hcalEta = pos.
eta();
390 double hcalPhi = pos.
phi();
399 double towersize = 0.087;
403 if (
abs(ieta) > 21) {
409 else if (
abs(ieta) == 23)
411 else if (
abs(ieta) == 24)
413 else if (
abs(ieta) == 25)
415 else if (
abs(ieta) == 26)
417 else if (
abs(ieta) == 27)
419 else if (
abs(ieta) == 28)
421 else if (
abs(ieta) == 29)
429 if (deltaR < minDeltaR) {
430 returnId =
DetId(*did);
450 if (fabs(eta) >
etaedge[size - 1])
453 double x = fabs(eta);
460 for (iter = 0; iter <
size; iter++) {
461 if (curr >= size || curr < 1)
462 std::cout <<
" ParticleTowerProducer::eta2ieta - wrong current index = " << curr <<
" !!!" << std::endl;
472 if (prevdir * actudir < 0) {
476 curr += actudir *
step;
504 else if (phi > 2. *
PI)
507 int iphi = (
int)TMath::Ceil(phi / 2.0 /
PI * 72.);
509 if (
abs(ieta) > 20) {
511 iphi -= (iphi + 1) % 2;
513 iphi -= (iphi + 1) % 4;
T getParameter(std::string const &) const
~ParticleTowerProducer() override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double eta() const final
momentum pseudorapidity
static const double etatow[]
int phi2iphi(double phi, int ieta) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
ParticleTowerProducer(const edm::ParameterSet &)
void resetTowers(edm::Event &iEvent, const edm::EventSetup &iSetup)
int depth() const
get the tower depth
double et() const final
transverse energy
void produce(edm::Event &, const edm::EventSetup &) override
Abs< T >::type abs(const T &t)
static const double etacent[]
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
int eta2ieta(double eta) const
edm::EDGetTokenT< reco::PFCandidateCollection > src_
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
std::map< DetId, double > towers_
Particle reconstructed by the particle flow algorithm.
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
CaloGeometry const * geo_
DetId getNearestTower(const reco::PFCandidate &in) const
double phi() const final
momentum azimuthal angle
T const * product() const