72 produces<CaloTowerCollection>();
115 for(reco::PFCandidateCollection::const_iterator ci = inputsHandle->begin(); ci!=inputsHandle->end(); ++ci) {
122 double eta = particle.
eta();
124 if(!
useHF_ && fabs(eta) > 3. )
continue;
127 if(eta<0) ieta *= -1;
160 for ( std::map< DetId, double >::const_iterator iter =
towers_.begin();
161 iter !=
towers_.end(); ++iter ){
164 double et = iter->second;
170 if(!
useHF_ && fabs(pos.
eta()) > 3. )
continue;
176 CaloTower newTower(newTowerId,et,0,0,0,0,p4,pos,pos);
177 prod->push_back(newTower);
209 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};
257 for(
int i=1;
i<30;
i++){
263 for(
int i=30;
i<42;
i++){
281 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
284 if( hid.
depth() == 1 ) {
289 if(fabs(pos.
eta())>3.)
continue;
323 double minDeltaR = 9999;
331 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
338 if( hid.
depth() != 1 )
continue;
342 double hcalEta = pos.
eta();
343 double hcalPhi = pos.
phi();
352 double towersize = 0.087;
354 int ieta = (hid).ieta();
357 if(
abs(ieta)>29) towersize=0.175;
359 if(
abs(ieta)==22) towersize=0.1;
360 else if(
abs(ieta)==23) towersize=0.113;
361 else if(
abs(ieta)==24) towersize=0.129;
362 else if(
abs(ieta)==25) towersize=0.16;
363 else if(
abs(ieta)==26) towersize=0.168;
364 else if(
abs(ieta)==27) towersize=0.15;
365 else if(
abs(ieta)==28) towersize=0.218;
366 else if(
abs(ieta)==29) towersize=0.132;
373 if(deltaR<minDeltaR){
374 returnId =
DetId(*did);
393 double minDeltaR = 9999;
401 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
408 if( hid.
depth() != 1 )
continue;
412 double hcalEta = pos.
eta();
413 double hcalPhi = pos.
phi();
422 double towersize = 0.087;
424 int ieta = (hid).ieta();
427 if(
abs(ieta)>29) towersize=0.175;
429 if(
abs(ieta)==22) towersize=0.1;
430 else if(
abs(ieta)==23) towersize=0.113;
431 else if(
abs(ieta)==24) towersize=0.129;
432 else if(
abs(ieta)==25) towersize=0.16;
433 else if(
abs(ieta)==26) towersize=0.168;
434 else if(
abs(ieta)==27) towersize=0.15;
435 else if(
abs(ieta)==28) towersize=0.218;
436 else if(
abs(ieta)==29) towersize=0.132;
443 if(deltaR<minDeltaR){
444 returnId =
DetId(*did);
467 double x = fabs(eta);
474 for (iter = 0; iter <
size ; iter++) {
476 if( curr >= size || curr < 1 )
477 std::cout <<
" ParticleTowerProducer::eta2ieta - wrong current index = "
478 << curr <<
" !!!" << std::endl;
482 if(x >
etaedge[curr]) {actudir = 1;}
484 if(prevdir * actudir < 0) {
if(step > 1) step /= 2;}
485 curr += actudir *
step;
486 if(curr > size) curr =
size;
487 else {
if(curr < 1) {curr = 1;}}
508 if(phi<0) phi += 2.*
PI;
509 else if(phi> 2.*
PI) phi -= 2.*
PI;
511 int iphi = (int) TMath::Ceil(phi/2.0/
PI*72.);
514 if(
abs(ieta)<40) iphi -= (iphi+1)%2;
517 if(iphi==-1) iphi=71;
528 const uint32_t ie (
abs(ieta) ) ;
530 const uint32_t ip ( iphi ) ;
532 const int zn ( eta < 0 ? 1 : 0 );
552 ( ip - 1 )*18 + dp - 1 + ie - ( ie<16 ? 1 : 0 ) + zn*1296 :
554 2*1296 + ( ip - 1 )*8 + ( ip/2 )*20 +
555 ( ( ie==16 || ie==17 ) ? ie - 16 :
556 ( ( ie>=18 && ie<=20 ) ? 2 + 2*( ie - 18 ) + dp - 1 :
557 ( ( ie>=21 && ie<=26 ) ? 8 + 2*( ie - 21 ) + dp - 1 :
558 ( ( ie>=27 && ie<=28 ) ? 20 + 3*( ie - 27 ) + dp - 1 :
559 26 + 2*( ie - 29 ) + dp - 1 ) ) ) ) + zn*1296 :
561 2*1296 + 2*1296 + ( ip - 1 )*15 + ( ie - 1 ) + zn*1080 :
563 2*1296 + 2*1296 + 2*1080 +
564 ( ( ip - 1 )/4 )*4 + ( ( ip - 1 )/2 )*22 +
565 2*( ie - 29 ) + ( dp - 1 ) + zn*864 : -1 ) ) ) ) ;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static const double etatow[]
int phi2iphi(double phi, int ieta) const
virtual double et() const
transverse energy
#define DEFINE_FWK_MODULE(type)
Geom::Phi< T > phi() const
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
virtual double eta() const
momentum pseudorapidity
uint32_t denseIndex(int ieta, int iphi, double eta) const
ParticleTowerProducer(const edm::ParameterSet &)
double deltaR(double eta1, double phi1, double eta2, double phi2)
void resetTowers(edm::Event &iEvent, const edm::EventSetup &iSetup)
int depth() const
get the tower depth
std::map< DetId, double > towers_
static HcalDetId detIdFromDenseIndex(uint32_t di)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static const double etacent[]
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 &)
virtual double phi() const
momentum azimuthal angle
tuple size
Write out results.