73 produces<CaloTowerCollection>();
116 for(reco::PFCandidateCollection::const_iterator ci = inputsHandle->begin(); ci!=inputsHandle->end(); ++ci) {
123 double eta = particle.
eta();
125 if(!
useHF_ && fabs(eta) > 3. )
continue;
128 if(eta<0) ieta *= -1;
165 for ( std::map< DetId, double >::const_iterator iter =
towers_.begin();
166 iter !=
towers_.end(); ++iter ){
169 double et = iter->second;
175 if(!
useHF_ && fabs(pos.
eta()) > 3. )
continue;
181 CaloTower newTower(newTowerId,et,0,0,0,0,p4,pos,pos);
182 prod->push_back(newTower);
214 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, 0.957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479, 1.566, 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.853, 3.000, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013, 4.191, 4.363, 4.538, 4.716, 4.889, 5.191};
262 for(
int i=1;
i<30;
i++){
268 for(
int i=30;
i<42;
i++){
286 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
289 if( hid.
depth() == 1 ) {
294 if(fabs(pos.
eta())>3.)
continue;
328 double minDeltaR = 9999;
336 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
343 if( hid.
depth() != 1 )
continue;
347 double hcalEta = pos.
eta();
348 double hcalPhi = pos.
phi();
357 double towersize = 0.087;
359 int ieta = (hid).ieta();
362 if(
abs(ieta)>29) towersize=0.175;
364 if(
abs(ieta)==22) towersize=0.1;
365 else if(
abs(ieta)==23) towersize=0.113;
366 else if(
abs(ieta)==24) towersize=0.129;
367 else if(
abs(ieta)==25) towersize=0.16;
368 else if(
abs(ieta)==26) towersize=0.168;
369 else if(
abs(ieta)==27) towersize=0.15;
370 else if(
abs(ieta)==28) towersize=0.218;
371 else if(
abs(ieta)==29) towersize=0.132;
378 if(deltaR<minDeltaR){
379 returnId =
DetId(*did);
398 double minDeltaR = 9999;
406 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
413 if( hid.
depth() != 1 )
continue;
417 double hcalEta = pos.
eta();
418 double hcalPhi = pos.
phi();
427 double towersize = 0.087;
429 int ieta = (hid).ieta();
432 if(
abs(ieta)>29) towersize=0.175;
434 if(
abs(ieta)==22) towersize=0.1;
435 else if(
abs(ieta)==23) towersize=0.113;
436 else if(
abs(ieta)==24) towersize=0.129;
437 else if(
abs(ieta)==25) towersize=0.16;
438 else if(
abs(ieta)==26) towersize=0.168;
439 else if(
abs(ieta)==27) towersize=0.15;
440 else if(
abs(ieta)==28) towersize=0.218;
441 else if(
abs(ieta)==29) towersize=0.132;
448 if(deltaR<minDeltaR){
449 returnId =
DetId(*did);
470 if(fabs(eta)>
etaedge[41])
return 41;
474 double x = fabs(eta);
481 for (iter = 0; iter <
size ; iter++) {
483 if( curr >= size || curr < 1 )
484 std::cout <<
" ParticleTowerProducer::eta2ieta - wrong current index = "
485 << curr <<
" !!!" << std::endl;
489 if(x >
etaedge[curr]) {actudir = 1;}
491 if(prevdir * actudir < 0) {
if(step > 1) step /= 2;}
492 curr += actudir *
step;
493 if(curr > size) curr =
size;
494 else {
if(curr < 1) {curr = 1;}}
515 if(phi<0) phi += 2.*
PI;
516 else if(phi> 2.*
PI) phi -= 2.*
PI;
518 int iphi = (int) TMath::Ceil(phi/2.0/
PI*72.);
521 if(
abs(ieta)<40) iphi -= (iphi+1)%2;
524 if(iphi==-1) iphi=71;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual double et() const GCC11_FINAL
transverse energy
static const double etatow[]
int phi2iphi(double phi, int ieta) const
#define DEFINE_FWK_MODULE(type)
Geom::Phi< T > phi() const
ParticleTowerProducer(const edm::ParameterSet &)
void resetTowers(edm::Event &iEvent, const edm::EventSetup &iSetup)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
int depth() const
get the tower depth
std::map< DetId, double > towers_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static const double etacent[]
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
double deltaR(double eta1, double eta2, double phi1, double phi2)
int eta2ieta(double eta) const
T const * product() const
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Particle reconstructed by the particle flow algorithm.
edm::SortedCollection< CaloTower > CaloTowerCollection
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
CaloGeometry const * geo_
DetId getNearestTower(const reco::PFCandidate &in) const
virtual void produce(edm::Event &, const edm::EventSetup &)
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
tuple size
Write out results.