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(ieta==-1)
continue;
128 if(eta<0) ieta *= -1;
163 auto prod = std::make_unique<CaloTowerCollection>();
165 for ( std::map< DetId, double >::const_iterator iter =
towers_.begin();
166 iter !=
towers_.end(); ++iter ){
170 double et = iter->second;
176 if(!
useHF_ && fabs(pos.
eta()) > 3. )
continue;
182 CaloTower newTower(newTowerId,et,0,0,0,0,p4,pos,pos);
183 prod->push_back(newTower);
215 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};
263 for(
int i=1;
i<30;
i++){
269 for(
int i=30;
i<42;
i++){
287 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
290 if( hid.
depth() == 1 ) {
295 if(fabs(pos.
eta())>3.)
continue;
337 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
344 if( hid.
depth() != 1 )
continue;
348 double hcalEta = pos.
eta();
349 double hcalPhi = pos.
phi();
358 double towersize = 0.087;
360 int ieta = (hid).ieta();
363 if(
abs(ieta)>29) towersize=0.175;
365 if(
abs(ieta)==22) towersize=0.1;
366 else if(
abs(ieta)==23) towersize=0.113;
367 else if(
abs(ieta)==24) towersize=0.129;
368 else if(
abs(ieta)==25) towersize=0.16;
369 else if(
abs(ieta)==26) towersize=0.168;
370 else if(
abs(ieta)==27) towersize=0.15;
371 else if(
abs(ieta)==28) towersize=0.218;
372 else if(
abs(ieta)==29) towersize=0.132;
379 if(deltaR<minDeltaR){
380 returnId =
DetId(*did);
407 for(std::vector<DetId>::const_iterator did=alldid.begin(); did != alldid.end(); did++){
414 if( hid.
depth() != 1 )
continue;
418 double hcalEta = pos.
eta();
419 double hcalPhi = pos.
phi();
428 double towersize = 0.087;
430 int ieta = (hid).ieta();
433 if(
abs(ieta)>29) towersize=0.175;
435 if(
abs(ieta)==22) towersize=0.1;
436 else if(
abs(ieta)==23) towersize=0.113;
437 else if(
abs(ieta)==24) towersize=0.129;
438 else if(
abs(ieta)==25) towersize=0.16;
439 else if(
abs(ieta)==26) towersize=0.168;
440 else if(
abs(ieta)==27) towersize=0.15;
441 else if(
abs(ieta)==28) towersize=0.218;
442 else if(
abs(ieta)==29) towersize=0.132;
449 if(deltaR<minDeltaR){
450 returnId =
DetId(*did);
474 if(fabs(eta)>
etaedge[size-1])
return -1;
476 double x = fabs(eta);
483 for (iter = 0; iter <
size ; iter++) {
485 if( curr >= size || curr < 1 )
486 std::cout <<
" ParticleTowerProducer::eta2ieta - wrong current index = "
487 << curr <<
" !!!" << std::endl;
491 if(x >
etaedge[curr]) {actudir = 1;}
493 if(prevdir * actudir < 0) {
if(step > 1) step /= 2;}
494 curr += actudir *
step;
495 if(curr > size) curr =
size;
496 else {
if(curr < 1) {curr = 1;}}
517 if(phi<0) phi += 2.*
PI;
518 else if(phi> 2.*
PI) phi -= 2.*
PI;
520 int iphi = (int) TMath::Ceil(phi/2.0/
PI*72.);
523 if(
abs(ieta)<40) iphi -= (iphi+1)%2;
526 if(iphi==-1) iphi=71;
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static const double etatow[]
int phi2iphi(double phi, int ieta) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
virtual double phi() const final
momentum azimuthal angle
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_
Abs< T >::type abs(const T &t)
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
static const double etacent[]
double deltaR(double eta1, double eta2, double phi1, double phi2)
int eta2ieta(double eta) const
edm::EDGetTokenT< reco::PFCandidateCollection > src_
T const * product() const
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Particle reconstructed by the particle flow algorithm.
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
CaloGeometry const * geo_
virtual double et() const final
transverse energy
DetId getNearestTower(const reco::PFCandidate &in) const
virtual void produce(edm::Event &, const edm::EventSetup &)
virtual double eta() const final
momentum pseudorapidity
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
tuple size
Write out results.