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;
164 for ( std::map< DetId, double >::const_iterator
iter =
towers_.begin();
168 double et =
iter->second;
174 if(!
useHF_ && fabs(pos.
eta()) > 3. )
continue;
180 CaloTower newTower(newTowerId,et,0,0,0,0,p4,pos,pos);
181 prod->push_back(newTower);
213 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};
261 for(
int i=1;
i<30;
i++){
267 for(
int i=30;
i<42;
i++){
285 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
288 if( hid.
depth() == 1 ) {
293 if(fabs(pos.
eta())>3.)
continue;
327 double minDeltaR = 9999;
335 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
342 if( hid.
depth() != 1 )
continue;
346 double hcalEta = pos.
eta();
347 double hcalPhi = pos.
phi();
356 double towersize = 0.087;
358 int ieta = (hid).ieta();
361 if(
abs(ieta)>29) towersize=0.175;
363 if(
abs(ieta)==22) towersize=0.1;
364 else if(
abs(ieta)==23) towersize=0.113;
365 else if(
abs(ieta)==24) towersize=0.129;
366 else if(
abs(ieta)==25) towersize=0.16;
367 else if(
abs(ieta)==26) towersize=0.168;
368 else if(
abs(ieta)==27) towersize=0.15;
369 else if(
abs(ieta)==28) towersize=0.218;
370 else if(
abs(ieta)==29) towersize=0.132;
377 if(deltaR<minDeltaR){
378 returnId =
DetId(*did);
397 double minDeltaR = 9999;
405 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
412 if( hid.
depth() != 1 )
continue;
416 double hcalEta = pos.
eta();
417 double hcalPhi = pos.
phi();
426 double towersize = 0.087;
428 int ieta = (hid).ieta();
431 if(
abs(ieta)>29) towersize=0.175;
433 if(
abs(ieta)==22) towersize=0.1;
434 else if(
abs(ieta)==23) towersize=0.113;
435 else if(
abs(ieta)==24) towersize=0.129;
436 else if(
abs(ieta)==25) towersize=0.16;
437 else if(
abs(ieta)==26) towersize=0.168;
438 else if(
abs(ieta)==27) towersize=0.15;
439 else if(
abs(ieta)==28) towersize=0.218;
440 else if(
abs(ieta)==29) towersize=0.132;
447 if(deltaR<minDeltaR){
448 returnId =
DetId(*did);
469 if(fabs(eta)>
etaedge[41])
return 41;
473 double x = fabs(eta);
480 for (iter = 0; iter <
size ; iter++) {
482 if( curr >= size || curr < 1 )
483 std::cout <<
" ParticleTowerProducer::eta2ieta - wrong current index = "
484 << curr <<
" !!!" << std::endl;
488 if(x >
etaedge[curr]) {actudir = 1;}
490 if(prevdir * actudir < 0) {
if(step > 1) step /= 2;}
491 curr += actudir *
step;
492 if(curr > size) curr =
size;
493 else {
if(curr < 1) {curr = 1;}}
514 if(phi<0) phi += 2.*
PI;
515 else if(phi> 2.*
PI) phi -= 2.*
PI;
517 int iphi = (int) TMath::Ceil(phi/2.0/
PI*72.);
520 if(
abs(ieta)<40) iphi -= (iphi+1)%2;
523 if(iphi==-1) iphi=71;
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)
virtual float phi() const
momentum azimuthal angle
Geom::Phi< T > phi() const
double deltaR(const T1 &t1, const T2 &t2)
ParticleTowerProducer(const edm::ParameterSet &)
void resetTowers(edm::Event &iEvent, const edm::EventSetup &iSetup)
int depth() const
get the tower depth
std::map< DetId, double > towers_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual float eta() const
momentum pseudorapidity
Abs< T >::type abs(const T &t)
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 &)
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
tuple size
Write out results.