CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes

EBDetId Class Reference

#include <EBDetId.h>

Inheritance diagram for EBDetId:
DetId

List of all members.

Public Types

enum  { Subdet = EcalBarrel }
enum  { kSizeForDenseIndexing = MAX_HASH + 1 }

Public Member Functions

float approxEta () const
uint32_t denseIndex () const
 EBDetId ()
 EBDetId (const DetId &id)
 EBDetId (uint32_t rawid)
 EBDetId (int index1, int index2, int mode=ETAPHIMODE)
int hashedIndex () const
 get a compact index for arrays
int ic () const
 get ECAL/crystal number inside SM
int ieta () const
 get the crystal ieta
int ietaAbs () const
 get the absolute value of the crystal ieta
int ietaSM () const
 get the crystal ieta in the SM convention (1-85)
int im () const
 get the number of module inside the SM (1-4)
int iphi () const
 get the crystal iphi
int iphiSM () const
 get the crystal iphi (1-20)
int ism () const
 get the ECAL/SM id
int numberByEtaPhi () const
int numberBySM () const
EBDetId offsetBy (int nrStepsEta, int nrStepsPhi) const
EBDetIdoperator= (const DetId &id)
bool positiveZ () const
EBDetId switchZSide () const
EcalTrigTowerDetId tower () const
 get the HCAL/trigger iphi of this crystal
int tower_ieta () const
 get the HCAL/trigger ieta of this crystal
int tower_iphi () const
 get the HCAL/trigger iphi of this crystal
int zside () const
 get the z-side of the crystal (1/-1)

Static Public Member Functions

static float approxEta (const DetId id)
static EBDetId detIdFromDenseIndex (uint32_t di)
static int distanceEta (const EBDetId &a, const EBDetId &b)
static int distancePhi (const EBDetId &a, const EBDetId &b)
static bool isNextToBoundary (EBDetId id)
static bool isNextToEtaBoundary (EBDetId id)
static bool isNextToPhiBoundary (EBDetId id)
static DetId offsetBy (const DetId startId, int nrStepsEta, int nrStepsPhi)
static EcalSubdetector subdet ()
 get the subdetector .i.e EcalBarrel (what else?)
static DetId switchZSide (const DetId startId)
static EBDetId unhashIndex (int hi)
 get a DetId from a compact index for arrays
static bool validDenseIndex (uint32_t din)
static bool validDetId (int i, int j)
 check if a valid index combination
static bool validHashIndex (int i)

Static Public Attributes

static const float crystalUnitToEta = 0.017453292519943295
static const int ETAPHIMODE = 0
static const int kChannelsPerCard = 5
static const int kCrystalsInEta = 85
static const int kCrystalsInPhi = 20
static const int kCrystalsPerSM = 1700
static const int kModuleBoundaries [4] = { 25, 45, 65, 85 }
static const int kModulesPerSM = 4
static const int kTowersInPhi = 4
static const int MAX_C = kCrystalsPerSM
static const int MAX_HASH = 2*MAX_IPHI*MAX_IETA-1
static const int MAX_IETA = 85
static const int MAX_IPHI = 360
static const int MAX_SM = 36
static const int MIN_C = 1
static const int MIN_HASH = 0
static const int MIN_IETA = 1
 range constants
static const int MIN_IPHI = 1
static const int MIN_SM = 1
static const int SMCRYSTALMODE = 1

Detailed Description

Crystal identifier class for the ECAL barrel

Id:
EBDetId.h,v 1.27 2010/03/10 00:26:45 ferriff Exp

Definition at line 20 of file EBDetId.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
Subdet 

Definition at line 22 of file EBDetId.h.

anonymous enum
Enumerator:
kSizeForDenseIndexing 

Definition at line 141 of file EBDetId.h.


Constructor & Destructor Documentation

EBDetId::EBDetId ( ) [inline]

Constructor of a null id

Definition at line 24 of file EBDetId.h.

Referenced by offsetBy(), switchZSide(), and unhashIndex().

{}
EBDetId::EBDetId ( uint32_t  rawid) [inline]

Constructor from a raw value

Definition at line 26 of file EBDetId.h.

: DetId(rawid) {}
EBDetId::EBDetId ( int  index1,
int  index2,
int  mode = ETAPHIMODE 
)

Constructor from crystal ieta and iphi or from SM# and crystal#

Definition at line 20 of file EBDetId.cc.

References ETAPHIMODE, Exception, i, DetId::id_, j, kCrystalsInPhi, SMCRYSTALMODE, and validDetId().

  : DetId(Ecal,EcalBarrel)
{
  int crystal_ieta;
  int crystal_iphi;
  if (mode == ETAPHIMODE) {
    crystal_ieta = index1;
    crystal_iphi = index2;  
  } else if (mode == SMCRYSTALMODE) {
    int SM = index1;
    int crystal = index2;
    int i = (int)  floor((crystal-1) / kCrystalsInPhi);
    int j = ((crystal-1) - (kCrystalsInPhi*i));
    if (SM <= 18) {
      crystal_ieta = i + 1;
      crystal_iphi = ((SM-1) * kCrystalsInPhi) + (kCrystalsInPhi-j);
    } else {
      crystal_ieta = -(i+1);
      crystal_iphi = ((SM-19) * kCrystalsInPhi) + j+1;
    }
  } else {
    throw cms::Exception("InvalidDetId") << "EBDetId:  Cannot create object.  Unknown mode for (int, int) constructor."; 
  }

  if ( !validDetId(crystal_ieta, crystal_iphi) ) {
    //    std::cout << "crystal_eta " << crystal_ieta << "crystal_phi " << crystal_iphi << std::endl;
    throw cms::Exception("InvalidDetId") << "EBDetId:  Cannot create object.  Indexes out of bounds \n" 
                                         << "eta = " << crystal_ieta << " phi = " << crystal_iphi;
  }
  id_|=((crystal_ieta>0)?(0x10000|(crystal_ieta<<9)):((-crystal_ieta)<<9))|(crystal_iphi&0x1FF);
}
EBDetId::EBDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 52 of file EBDetId.cc.

References DetId::det(), DetId::Ecal, EcalBarrel, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

                                 {
  if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalBarrel )) {
    throw cms::Exception("InvalidDetId");
  }
  id_=gen.rawId();
}

Member Function Documentation

float EBDetId::approxEta ( ) const [inline]

return an approximate values of eta (~0.15% precise)

Definition at line 93 of file EBDetId.h.

References crystalUnitToEta, and ieta().

Referenced by approxEta(), and EcalTools::recHitApproxEt().

{ return ieta() * crystalUnitToEta; }
float EBDetId::approxEta ( const DetId  id) [static]

Definition at line 201 of file EBDetId.cc.

References approxEta(), EcalBarrel, and DetId::subdetId().

                                         {
        if( id.subdetId() == EcalBarrel ) {
                EBDetId ebId( id );
                return ebId.approxEta();
        } else {
                return 0;
        }
}
uint32_t EBDetId::denseIndex ( ) const [inline]

Definition at line 75 of file EBDetId.h.

References hashedIndex().

Referenced by EcalDQMBinningService::findBinsCrystal_().

{ return hashedIndex() ; }
static EBDetId EBDetId::detIdFromDenseIndex ( uint32_t  di) [inline, static]
int EBDetId::distanceEta ( const EBDetId a,
const EBDetId b 
) [static]

Definition at line 185 of file EBDetId.cc.

References abs, and ieta().

Referenced by EcalClusterSeverityLevelAlgo::closestProblematic(), EcalClusterSeverityLevelAlgo::etaphiDistanceClosestProblematic(), and PFPhotonClusters::FillClusterShape().

{
  if (a.ieta() * b.ieta() > 0)
    return abs(a.ieta()-b.ieta());
  else
    return abs(a.ieta()-b.ieta())-1;
}
int EBDetId::distancePhi ( const EBDetId a,
const EBDetId b 
) [static]

Definition at line 193 of file EBDetId.cc.

References abs, and iphi().

Referenced by EcalClusterSeverityLevelAlgo::closestProblematic(), EcalClusterSeverityLevelAlgo::etaphiDistanceClosestProblematic(), and PFPhotonClusters::FillClusterShape().

{
  if (abs(a.iphi() -b.iphi()) > 180)
    return abs(a.iphi() - b.iphi()) - 180;
  else
    return abs(a.iphi()-b.iphi());
}
int EBDetId::hashedIndex ( ) const [inline]
int EBDetId::ic ( ) const
int EBDetId::ieta ( ) const [inline]

get the crystal ieta

Definition at line 44 of file EBDetId.h.

References ietaAbs(), and zside().

Referenced by PhiSymmetryCalibration::analyze(), HLTAlCaMonPi0::analyze(), TreeProducerCalibSimul::analyze(), EBClusterTaskExtras::analyze(), EcalRecHitsValidation::analyze(), EcalSimpleTBAnalyzer::analyze(), EcalDigisValidation::analyze(), EcalCosmicsHists::analyze(), EBRecoSummary::analyze(), JetToDigiDump::analyze(), EcalBarrelRecHitsValidation::analyze(), HLTAlCa::analyze(), EBOccupancyTask::analyze(), EcalBarrelDigisValidation::analyze(), DQMSourceEleCalib::analyze(), EcalTBValidation::analyze(), EBClusterTask::analyze(), EcalMixingModuleValidation::analyze(), DQMSourcePi0::analyze(), EcalSelectiveReadoutValidation::analyzeEB(), approxEta(), HLTEcalResonanceFilter::calcShowerShape(), EcalHaloAlgo::Calculate(), ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction(), EcalDQMBinningService::channelName(), EcalDeadChannelRecoveryAlgos::correct(), EcalGlobalShowerContainmentCorrectionsVsEta::correction(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), EBSelectiveReadoutTask::dccNum(), distanceEta(), popcon::EcalLaserHandler::dumpBarrelPayload(), InvRingCalib::duringLoop(), Pi0FixedMassWindowCalibration::duringLoop(), ZeeCalibration::duringLoop(), ElectronCalibrationUniv::endJob(), PhiSymmetryCalibration_step2_SM::endJob(), PhiSymmetryCalibration_step2::endJob(), Pi0FixedMassWindowCalibration::endOfJob(), EcalEleCalibLooper::endOfLoop(), Pi0FixedMassWindowCalibration::endOfLoop(), ZeeCalibration::endOfLoop(), AlCaElectronsTest::fillAroundBarrel(), DQMSourceEleCalib::fillAroundBarrel(), PFPhotonClusters::FillClusterShape(), MatrixFillMap::fillEBMap(), FastL1Region::FillEMCrystals(), ECALRecHitAnalyzer::FillGeometry(), EcalRecHitsFilter::filter(), EcalDQMBinningService::findBinsProjEta_(), TrackDetMatchInfo::findMaxDeposition(), EcalTBReadout::findTTlist(), CalibrationCluster::get3x3Id(), CalibrationCluster::get5x5Id(), EcalBarrelGeometry::getClosestCell(), EcalClusterTools::getIEta(), PhotonMIPHaloTagger::GetMipTrailFit(), EcalRingCalibrationTools::getRingIndex(), PhotonMIPHaloTagger::GetSeedHighestE(), EcalClusterTools::getSeedPosition(), EcalClusterCrackCorrection::getValue(), EcalClusterLocalContCorrection::getValue(), EcalBasicClusterLocalContCorrection::getValue(), ecalpyutils::hashedIndexToEtaPhi(), fireworks::info(), DetIdInfo::info(), isNextToEtaBoundary(), EcalClusterLocal::localCoordsEB(), EcalDisplaysByEvent::makeHistos(), EcalDeadChannelRecoveryAlgos::MakeNxNMatrice(), PiZeroAnalyzer::makePizero(), TrackDetMatchInfo::nXnEnergy(), offsetBy(), EBDetIdSorter::operator()(), PFPhotonClusters::PFCrystalCoor(), EcalShowerProperties::processEcalRecHits(), AlCaIsoTracksProducer::produce(), AlCaECALRecHitReducer::produce(), ecaldqm::LaserTask::runOnUncalibRecHits(), EcalGeomPhiSymHelper::setup(), EcalTools::swissCross(), switchZSide(), CaloGenericDetId::validDetId(), xuti::writeCell(), ECALRecHitAnalyzer::WriteECALRecHits(), Pi0CalibXMLwriter::writeLine(), calibXMLwriter::writeLine(), and ZeeCalibration::xtalIsOnModuleBorder().

{ return zside()*ietaAbs(); }
int EBDetId::ietaAbs ( ) const [inline]
int EBDetId::ietaSM ( ) const [inline]

get the crystal ieta in the SM convention (1-85)

Definition at line 60 of file EBDetId.h.

References ietaAbs().

Referenced by EcalCosmicsHists::analyze(), and EcalElectronicsMapping::getLMNumber().

{ return ietaAbs(); }
int EBDetId::im ( ) const

get the number of module inside the SM (1-4)

Definition at line 85 of file EBDetId.cc.

References i, ietaAbs(), and kModuleBoundaries.

Referenced by CaloGeometryHelper::borderCrossing(), EcalClusterTools::energyBasketFractionEta(), and EcalRingCalibrationTools::getModuleIndex().

                      {
  for (int i=0; i < 4 ; i++)
    if ( ietaAbs() <= kModuleBoundaries[i] )
      return i+1;
  //Shold never be reached!
  return -1;
}
int EBDetId::iphi ( ) const [inline]

get the crystal iphi

Definition at line 46 of file EBDetId.h.

References DetId::id_.

Referenced by PhiSymmetryCalibration::analyze(), HLTAlCaMonPi0::analyze(), TreeProducerCalibSimul::analyze(), EBClusterTaskExtras::analyze(), EcalRecHitsValidation::analyze(), EcalSimpleTBAnalyzer::analyze(), EcalDigisValidation::analyze(), EcalCosmicsHists::analyze(), JetToDigiDump::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalBarrelSimHitsValidation::analyze(), HLTAlCa::analyze(), EcalBarrelDigisValidation::analyze(), DQMSourceEleCalib::analyze(), EcalTBValidation::analyze(), EBClusterTask::analyze(), EcalMixingModuleValidation::analyze(), DQMSourcePi0::analyze(), HLTEcalResonanceFilter::calcShowerShape(), EcalHaloAlgo::Calculate(), ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction(), EcalDQMBinningService::channelName(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), EBSelectiveReadoutTask::dccNum(), distancePhi(), popcon::EcalLaserHandler::dumpBarrelPayload(), Pi0FixedMassWindowCalibration::duringLoop(), InvRingCalib::duringLoop(), ZeeCalibration::duringLoop(), ElectronCalibrationUniv::endJob(), PhiSymmetryCalibration_step2_SM::endJob(), PhiSymmetryCalibration_step2::endJob(), Pi0FixedMassWindowCalibration::endOfJob(), EcalEleCalibLooper::endOfLoop(), Pi0FixedMassWindowCalibration::endOfLoop(), ZeeCalibration::endOfLoop(), EcalClusterTools::energyBasketFractionPhi(), AlCaElectronsTest::fillAroundBarrel(), DQMSourceEleCalib::fillAroundBarrel(), PFPhotonClusters::FillClusterShape(), MatrixFillMap::fillEBMap(), FastL1Region::FillEMCrystals(), EcalRecHitsFilter::filter(), EcalDQMBinningService::findBinsProjPhi_(), TrackDetMatchInfo::findMaxDeposition(), EcalTBReadout::findTTlist(), CalibrationCluster::get3x3Id(), CalibrationCluster::get5x5Id(), EcalBarrelGeometry::getClosestCell(), EcalElectronicsMapping::getElectronicsId(), EcalClusterTools::getIPhi(), PhotonMIPHaloTagger::GetMipTrailFit(), PhotonMIPHaloTagger::GetSeedHighestE(), EcalClusterCrackCorrection::getValue(), EcalClusterLocalContCorrection::getValue(), EcalBasicClusterLocalContCorrection::getValue(), ecalpyutils::hashedIndexToEtaPhi(), ic(), fireworks::info(), DetIdInfo::info(), ism(), isNextToPhiBoundary(), EcalClusterLocal::localCoordsEB(), EcalDisplaysByEvent::makeHistos(), EcalDeadChannelRecoveryAlgos::MakeNxNMatrice(), PiZeroAnalyzer::makePizero(), numberByEtaPhi(), TrackDetMatchInfo::nXnEnergy(), offsetBy(), EBDetIdSorter::operator()(), PFPhotonClusters::PFCrystalCoor(), EcalShowerProperties::processEcalRecHits(), AlCaIsoTracksProducer::produce(), AlCaECALRecHitReducer::produce(), ecaldqm::LaserTask::runOnUncalibRecHits(), EcalGeomPhiSymHelper::setup(), switchZSide(), tower_iphi(), EcalSimHitsValidProducer::update(), CaloGenericDetId::validDetId(), xuti::writeCell(), ECALRecHitAnalyzer::WriteECALRecHits(), Pi0CalibXMLwriter::writeLine(), calibXMLwriter::writeLine(), and ZeeCalibration::xtalIsOnModuleBorder().

{ return id_&0x1FF; }
int EBDetId::iphiSM ( ) const [inline]

get the crystal iphi (1-20)

Definition at line 62 of file EBDetId.h.

References ic(), and kCrystalsInPhi.

Referenced by EcalCosmicsHists::analyze(), and EcalElectronicsMapping::getLMNumber().

{ return (( ic() -1 ) % kCrystalsInPhi ) + 1; }
int EBDetId::ism ( ) const
bool EBDetId::isNextToBoundary ( EBDetId  id) [static]

Definition at line 171 of file EBDetId.cc.

References isNextToEtaBoundary(), and isNextToPhiBoundary().

Referenced by isNextToBoundary().

                                         {
        return isNextToEtaBoundary( id ) || isNextToPhiBoundary( id );
}
bool EBDetId::isNextToEtaBoundary ( EBDetId  id) [static]

Definition at line 175 of file EBDetId.cc.

References ieta(), and kModuleBoundaries.

Referenced by PhotonIsolationCalculator::classify(), GsfElectronAlgo::createElectron(), and isNextToBoundary().

                                            {
        int ieta = id.ietaSM();
        return ieta == 1 || std::binary_search( kModuleBoundaries, kModuleBoundaries + 4, ieta ) || ieta == 85;
}
bool EBDetId::isNextToPhiBoundary ( EBDetId  id) [static]

Definition at line 180 of file EBDetId.cc.

References iphi().

Referenced by PhotonIsolationCalculator::classify(), GsfElectronAlgo::createElectron(), and isNextToBoundary().

                                            {
        int iphi = id.iphiSM();
        return iphi == 1 || iphi == 20;
}
int EBDetId::numberByEtaPhi ( ) const [inline]

Definition at line 67 of file EBDetId.h.

References ietaAbs(), iphi(), MAX_IETA, MAX_IPHI, and positiveZ().

Referenced by hashedIndex().

                             { 
    return (MAX_IETA + (positiveZ() ? ietaAbs()-1 : -ietaAbs()) )*MAX_IPHI+ iphi()-1;
  }
int EBDetId::numberBySM ( ) const

Definition at line 107 of file EBDetId.cc.

References ic(), ism(), and kCrystalsPerSM.

                              {
  return (ism()-1) * kCrystalsPerSM + ic() -1;
}
EBDetId EBDetId::offsetBy ( int  nrStepsEta,
int  nrStepsPhi 
) const

returns a new EBDetId offset by nrStepsEta and nrStepsPhi (can be negative), returns EBDetId(0) if invalid

Definition at line 111 of file EBDetId.cc.

References EBDetId(), ieta(), iphi(), and validDetId().

Referenced by EcalTools::deadNeighbour(), EcalCleaningAlgo::neighbours(), offsetBy(), and EcalTools::recHitE().

{
        int newEta = ieta()+nrStepsEta;
        if( newEta*ieta() <= 0 ) {
                if( ieta() < 0 ) {
                        newEta++;
                } else if ( ieta() > 0 ) {
                        newEta--;
                }
        }
        int newPhi = iphi() + nrStepsPhi;
        while ( newPhi>360 ) newPhi -= 360;
        while ( newPhi<=0  ) newPhi += 360;

        if( validDetId( newEta, newPhi ) ) {
                return EBDetId( newEta, newPhi);
        } else {
                return EBDetId(0);
        }
}
DetId EBDetId::offsetBy ( const DetId  startId,
int  nrStepsEta,
int  nrStepsPhi 
) [static]

following are static member functions of the above two functions which take and return a DetId, returns DetId(0) if invalid

Definition at line 143 of file EBDetId.cc.

References DetId::det(), DetId::DetId(), DetId::Ecal, EcalBarrel, offsetBy(), DetId::rawId(), and DetId::subdetId().

{
        if( startId.det() == DetId::Ecal && startId.subdetId() == EcalBarrel ) {
                EBDetId ebStartId(startId);
                return ebStartId.offsetBy( nrStepsEta, nrStepsPhi ).rawId();
        } else {
                return DetId(0);
        }
}
EBDetId & EBDetId::operator= ( const DetId id)

Assignment operator from cell id

Definition at line 70 of file EBDetId.cc.

References DetId::det(), DetId::Ecal, EcalBarrel, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

                                            {
  if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalBarrel )) {
    throw cms::Exception("InvalidDetId");
  }
  id_=gen.rawId();
  return *this;
}
bool EBDetId::positiveZ ( ) const [inline]

Definition at line 65 of file EBDetId.h.

References DetId::id_.

Referenced by EcalClusterTools::energyBasketFractionEta(), EcalClusterTools::energyBasketFractionPhi(), and numberByEtaPhi().

{ return id_&0x10000;}
static EcalSubdetector EBDetId::subdet ( ) [inline, static]

get the subdetector .i.e EcalBarrel (what else?)

Definition at line 37 of file EBDetId.h.

References EcalBarrel.

{ return EcalBarrel;}
EBDetId EBDetId::switchZSide ( ) const

returns a new EBDetId on the other zside of barrel (ie iEta*-1), returns EBDetId(0) if invalid (shouldnt happen)

Definition at line 132 of file EBDetId.cc.

References EBDetId(), ieta(), iphi(), and validDetId().

Referenced by ecaldqm::TimingClient::producePlots(), and switchZSide().

{
        int newEta = ieta()*-1;
        if( validDetId( newEta, iphi() ) ) {
                return EBDetId( newEta, iphi() );
        } else {
                return EBDetId(0);
        }
}
DetId EBDetId::switchZSide ( const DetId  startId) [static]

Definition at line 153 of file EBDetId.cc.

References DetId::det(), DetId::DetId(), DetId::Ecal, EcalBarrel, DetId::rawId(), DetId::subdetId(), and switchZSide().

{
        if( startId.det() == DetId::Ecal && startId.subdetId() == EcalBarrel ) {
                EBDetId ebStartId(startId);
                return ebStartId.switchZSide().rawId();
        } else {
                return DetId(0);
        }
}
EcalTrigTowerDetId EBDetId::tower ( ) const [inline]
int EBDetId::tower_ieta ( ) const [inline]

get the HCAL/trigger ieta of this crystal

Definition at line 48 of file EBDetId.h.

References ietaAbs(), and zside().

Referenced by FastL1Region::FillEMCrystals(), fireworks::info(), DetIdInfo::info(), tower(), and CaloTowerConstituentsMap::towerOf().

{ return ((ietaAbs()-1)/5+1)*zside(); }
int EBDetId::tower_iphi ( ) const

get the HCAL/trigger iphi of this crystal

Definition at line 164 of file EBDetId.cc.

References iphi().

Referenced by FastL1Region::FillEMCrystals(), fireworks::info(), DetIdInfo::info(), tower(), and CaloTowerConstituentsMap::towerOf().

                              { 
  int iphi_simple=((iphi()-1)/5)+1; 
  iphi_simple-=2;
  return ((iphi_simple<=0)?(iphi_simple+72):(iphi_simple));
}
EBDetId EBDetId::unhashIndex ( int  hi) [static]
static bool EBDetId::validDenseIndex ( uint32_t  din) [inline, static]

Definition at line 96 of file EBDetId.h.

References kSizeForDenseIndexing.

Referenced by EcalTPSkimmer::produce().

{ return ( din < kSizeForDenseIndexing ) ; }
bool EBDetId::validDetId ( int  i,
int  j 
) [static]

check if a valid index combination

Definition at line 59 of file EBDetId.cc.

References MAX_IETA, MAX_IPHI, and TrackValidation_HighPurity_cff::valid.

Referenced by EBCosmicTask::analyze(), EcalTBValidation::analyze(), EcalBarrelTopology::decrementIeta(), EcalBarrelTopology::decrementIphi(), EBDetId(), ZeeCalibration::endOfJob(), spr::extraIds(), MatrixFillMap::fillEBMap(), EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), EcalBarrelTopology::incrementIeta(), EcalBarrelTopology::incrementIphi(), offsetBy(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalDQMChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), EcalTrivialConditionRetriever::produceEcalTimeCalibErrors(), popcon::EcalTPGBadXTHandler::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), and switchZSide().

                                     {

  bool valid = true;
  if (i < -MAX_IETA || i == 0 || i > MAX_IETA ||
      j < MIN_IPHI || j > MAX_IPHI) {
    valid = false;
  }  
  return valid;

}
static bool EBDetId::validHashIndex ( int  i) [inline, static]

Definition at line 103 of file EBDetId.h.

References MAX_HASH.

Referenced by unhashIndex().

{ return !(i<MIN_HASH || i>MAX_HASH); }
int EBDetId::zside ( ) const [inline]

Member Data Documentation

const float EBDetId::crystalUnitToEta = 0.017453292519943295 [static]

Definition at line 139 of file EBDetId.h.

Referenced by approxEta().

const int EBDetId::ETAPHIMODE = 0 [static]
const int EBDetId::kChannelsPerCard = 5 [static]

Definition at line 124 of file EBDetId.h.

const int EBDetId::kCrystalsInEta = 85 [static]

Definition at line 129 of file EBDetId.h.

const int EBDetId::kCrystalsInPhi = 20 [static]

Definition at line 128 of file EBDetId.h.

Referenced by EBDetId(), EcalClusterTools::energyBasketFractionPhi(), ic(), iphiSM(), and ism().

const int EBDetId::kCrystalsPerSM = 1700 [static]

Definition at line 130 of file EBDetId.h.

Referenced by Numbers::indexEB(), and numberBySM().

const int EBDetId::kModuleBoundaries = { 25, 45, 65, 85 } [static]

Definition at line 127 of file EBDetId.h.

Referenced by im(), and isNextToEtaBoundary().

const int EBDetId::kModulesPerSM = 4 [static]
const int EBDetId::kTowersInPhi = 4 [static]

Definition at line 125 of file EBDetId.h.

Referenced by EcalClusterTools::energyBasketFractionPhi().

const int EBDetId::MAX_C = kCrystalsPerSM [static]

Definition at line 134 of file EBDetId.h.

const int EBDetId::MAX_HASH = 2*MAX_IPHI*MAX_IETA-1 [static]
const int EBDetId::MAX_IETA = 85 [static]

Definition at line 122 of file EBDetId.h.

Referenced by EcalGetLaserData::analyze(), CaloTowerConstituentsMap::constituentsOf(), EcalBarrelHardcodedTopology::decrementIeta(), EcalTPGCrystalStatusXMLTranslator::dumpXML(), ZeeCalibration::endOfJob(), EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), EcalTestDevDB::generateEcalGainRatios(), EcalTestDevDB::generateEcalIntercalibConstants(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTestDevDB::generateEcalPedestals(), EcalTestDevDB::generateEcalTBWeights(), EcalTestDevDB::generateEcalWeightXtalGroups(), EcalBarrelGeometry::getCells(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalRingCalibrationTools::getDetIdsInECAL(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), EcalBarrelHardcodedTopology::incrementIeta(), numberByEtaPhi(), cond::PayLoadInspector< DataT >::plot(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalDQMChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), EcalTrivialConditionRetriever::produceEcalTimeCalibErrors(), popcon::EcalTPGBadXTHandler::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), spr::simpleMove(), PFRecHitProducerECAL::stdsimplemove(), cond::PayLoadInspector< DataT >::summary(), unhashIndex(), and validDetId().

const int EBDetId::MAX_IPHI = 360 [static]

Definition at line 123 of file EBDetId.h.

Referenced by EcalGetLaserData::analyze(), ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction(), EcalBarrelTopology::decrementIphi(), EcalBarrelHardcodedTopology::decrementIphi(), EcalTPGCrystalStatusXMLTranslator::dumpXML(), ZeeCalibration::endOfJob(), EcalClusterTools::energyBasketFractionPhi(), EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), EcalTestDevDB::generateEcalGainRatios(), EcalTestDevDB::generateEcalIntercalibConstants(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTestDevDB::generateEcalPedestals(), EcalTestDevDB::generateEcalWeightXtalGroups(), EcalBarrelGeometry::getCells(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalBarrelGeometry::getClosestCell(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), EcalBarrelHardcodedTopology::incrementIphi(), EcalBarrelTopology::incrementIphi(), numberByEtaPhi(), cond::PayLoadInspector< DataT >::plot(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalDQMChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), EcalTrivialConditionRetriever::produceEcalTimeCalibErrors(), popcon::EcalTPGBadXTHandler::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), cond::PayLoadInspector< DataT >::summary(), unhashIndex(), and validDetId().

const int EBDetId::MAX_SM = 36 [static]
const int EBDetId::MIN_C = 1 [static]

Definition at line 133 of file EBDetId.h.

const int EBDetId::MIN_HASH = 0 [static]
const int EBDetId::MIN_IETA = 1 [static]

range constants

Definition at line 120 of file EBDetId.h.

const int EBDetId::MIN_IPHI = 1 [static]

Definition at line 121 of file EBDetId.h.

Referenced by EcalGetLaserData::analyze(), ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction(), EcalBarrelTopology::decrementIphi(), EcalBarrelHardcodedTopology::decrementIphi(), ZeeCalibration::endOfJob(), EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback(), EcalTestDevDB::generateEcalGainRatios(), EcalTestDevDB::generateEcalIntercalibConstants(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTestDevDB::generateEcalPedestals(), EcalTestDevDB::generateEcalWeightXtalGroups(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalBarrelGeometry::getClosestCell(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), EcalBarrelHardcodedTopology::incrementIphi(), EcalBarrelTopology::incrementIphi(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalDQMChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), EcalTrivialConditionRetriever::produceEcalTimeCalibErrors(), popcon::EcalTPGBadXTHandler::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), and StoreEcalCondition::readEcalChannelStatusFromFile().

const int EBDetId::MIN_SM = 1 [static]
const int EBDetId::SMCRYSTALMODE = 1 [static]

Definition at line 146 of file EBDetId.h.

Referenced by TreeProducerCalibSimul::analyze(), EcalTPGParamBuilder::analyze(), EcalSimpleTBAnalyzer::analyze(), EcalSimple2007H4TBAnalyzer::analyze(), EcalTBValidation::analyze(), EcalDQMStatusReader::beginRun(), TBPositionCalc::CalculateCMSPos(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), popcon::EcalChannelStatusHandler::daqOut(), EcalBarrelGeometry::detIdFromLocalAlignmentIndex(), EBDetId(), EcalShowerContainmentCorrections::fillCorrectionCoefficients(), EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), EcalTrivialConditionRetriever::getIntercalibErrorsFromConfiguration(), popcon::EcalTPGFineGrainEBGroupHandler::getNewObjects(), popcon::EcalTPGBadXTHandler::getNewObjects(), popcon::EcalTPGSpikeThresholdHandler::getNewObjects(), popcon::EcalTPGBadTTHandler::getNewObjects(), popcon::EcalTPGPedestalsHandler::getNewObjects(), popcon::EcalTPGLinConstHandler::getNewObjects(), popcon::EcalTPGLutGroupHandler::getNewObjects(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTimeCalibConstantsFromConfiguration(), EcalTrivialConditionRetriever::getTimeCalibErrorsFromConfiguration(), TableDataFormatter::interpretRawData(), popcon::EcalChannelStatusHandler::laserAnalysis(), popcon::EcalChannelStatusHandler::laserMasking(), Masks::maskChannel(), popcon::EcalChannelStatusHandler::nBadLaserModules(), popcon::EcalChannelStatusHandler::pedAnalysis(), popcon::EcalChannelStatusHandler::pedMasking(), popcon::EcalChannelStatusHandler::pedOnlineMasking(), popcon::EcalChannelStatusHandler::physicsMasking(), FakeTBEventHeaderProducer::produce(), EcalShowerContainmentCorrectionsESProducer::produce(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), StoreEcalCondition::readEcalChannelStatusFromFile(), EcalDQMStatusWriter::readEcalDQMChannelStatusFromFile(), StoreEcalCondition::readEcalGainRatiosFromFile(), StoreEcalCondition::readEcalIntercalibConstantsFromFile(), StoreEcalCondition::readEcalIntercalibConstantsMCFromFile(), and StoreEcalCondition::readEcalWeightXtalGroupsFromFile().