Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:42

0001 #include "Geometry/CaloTopology/interface/EcalEndcapTopology.h"
0002 
0003 EEDetId EcalEndcapTopology::incrementIy(const EEDetId& id) const {
0004   if (!(theGeom_->present(id))) {
0005     return EEDetId(0);
0006   }
0007   EEDetId nextPoint;
0008   if (EEDetId::validDetId(id.ix(), id.iy() + 1, id.zside()))
0009     nextPoint = EEDetId(id.ix(), id.iy() + 1, id.zside());
0010   else
0011     return EEDetId(0);
0012 
0013   if (theGeom_->present(nextPoint))
0014     return nextPoint;
0015   else
0016     return EEDetId(0);
0017 }
0018 
0019 EEDetId EcalEndcapTopology::decrementIy(const EEDetId& id) const {
0020   if (!(theGeom_->present(id))) {
0021     return EEDetId(0);
0022   }
0023   EEDetId nextPoint;
0024   if (EEDetId::validDetId(id.ix(), id.iy() - 1, id.zside()))
0025     nextPoint = EEDetId(id.ix(), id.iy() - 1, id.zside());
0026   else
0027     return EEDetId(0);
0028 
0029   if (theGeom_->present(nextPoint))
0030     return nextPoint;
0031   else
0032     return EEDetId(0);
0033 }
0034 
0035 EEDetId EcalEndcapTopology::incrementIx(const EEDetId& id) const {
0036   if (!(theGeom_->present(id))) {
0037     return EEDetId(0);
0038   }
0039 
0040   EEDetId nextPoint;
0041   if (EEDetId::validDetId(id.ix() + 1, id.iy(), id.zside()))
0042     nextPoint = EEDetId(id.ix() + 1, id.iy(), id.zside());
0043   else
0044     return EEDetId(0);
0045 
0046   if (theGeom_->present(nextPoint))
0047     return nextPoint;
0048   else
0049     return EEDetId(0);
0050 }
0051 
0052 EEDetId EcalEndcapTopology::decrementIx(const EEDetId& id) const {
0053   if (!(theGeom_->present(id))) {
0054     return EEDetId(0);
0055   }
0056 
0057   EEDetId nextPoint;
0058 
0059   if (EEDetId::validDetId(id.ix() - 1, id.iy(), id.zside()))
0060     nextPoint = EEDetId(id.ix() - 1, id.iy(), id.zside());
0061   else
0062     return EEDetId(0);
0063 
0064   if (theGeom_->present(nextPoint))
0065     return nextPoint;
0066   else
0067     return EEDetId(0);
0068 }