CMS 3D CMS Logo

Public Member Functions

reco::HcalNoiseRBXArray Class Reference

#include <HcalNoiseRBXArray.h>

List of all members.

Public Member Functions

std::vector< HcalNoiseHPD >
::iterator 
endHPD (void)
std::vector< HcalNoiseHPD >
::const_iterator 
endHPD (void) const
HcalNoiseRBXArray::iterator endRBX (void)
HcalNoiseRBXArray::const_iterator endRBX (void) const
void findHPD (const CaloTower &, std::vector< std::vector< HcalNoiseHPD >::iterator > &)
std::vector< HcalNoiseHPD >
::const_iterator 
findHPD (int hpdindex) const
std::vector< HcalNoiseHPD >
::const_iterator 
findHPD (const HBHEDataFrame &) const
std::vector< HcalNoiseHPD >
::iterator 
findHPD (const HBHERecHit &)
std::vector< HcalNoiseHPD >
::const_iterator 
findHPD (const HBHERecHit &) const
std::vector< HcalNoiseHPD >
::iterator 
findHPD (const HcalDetId &)
std::vector< HcalNoiseHPD >
::const_iterator 
findHPD (const HcalDetId &) const
void findHPD (const CaloTower &, std::vector< std::vector< HcalNoiseHPD >::const_iterator > &) const
std::vector< HcalNoiseHPD >
::iterator 
findHPD (int hpdindex)
std::vector< HcalNoiseHPD >
::iterator 
findHPD (const HBHEDataFrame &)
HcalNoiseRBXArray::const_iterator findRBX (const HBHEDataFrame &) const
HcalNoiseRBXArray::iterator findRBX (const HBHERecHit &)
HcalNoiseRBXArray::const_iterator findRBX (int rbxindex) const
void findRBX (const CaloTower &, std::vector< HcalNoiseRBXArray::const_iterator > &) const
void findRBX (const CaloTower &, std::vector< HcalNoiseRBXArray::iterator > &)
HcalNoiseRBXArray::const_iterator findRBX (const HBHERecHit &) const
HcalNoiseRBXArray::const_iterator findRBX (const HcalDetId &) const
HcalNoiseRBXArray::iterator findRBX (const HcalDetId &)
HcalNoiseRBXArray::iterator findRBX (int rbxindex)
HcalNoiseRBXArray::iterator findRBX (const HBHEDataFrame &)
 HcalNoiseRBXArray ()
virtual ~HcalNoiseRBXArray ()

Detailed Description

Definition at line 27 of file HcalNoiseRBXArray.h.


Constructor & Destructor Documentation

HcalNoiseRBXArray::HcalNoiseRBXArray ( )

Definition at line 15 of file HcalNoiseRBXArray.cc.

References asciidump::at, reco::HcalNoiseRBX::hpds_, i, reco::HcalNoiseRBX::idnumber_, HcalHPDRBXMap::indicesHPDfromRBX(), j, HcalHPDRBXMap::NUM_HPDS_PER_RBX, and findQualityFiles::size.

{
  for(unsigned int i=0; i<size(); i++) {
    HcalNoiseRBX& rbx=at(i);
    
    // set the rbxnumber here
    rbx.idnumber_=i;

    // set the hpdnumber here
    boost::array<int, HcalHPDRBXMap::NUM_HPDS_PER_RBX> hpdindices;
    HcalHPDRBXMap::indicesHPDfromRBX(i, hpdindices);
    for(int j=0; j<HcalHPDRBXMap::NUM_HPDS_PER_RBX; j++) {
      rbx.hpds_[j].idnumber_=hpdindices[j];
    }
  }
}
HcalNoiseRBXArray::~HcalNoiseRBXArray ( ) [virtual]

Definition at line 32 of file HcalNoiseRBXArray.cc.

{
}

Member Function Documentation

std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::endHPD ( void  )

Definition at line 44 of file HcalNoiseRBXArray.cc.

References asciidump::at.

Referenced by findHPD().

{
  // the choice of which rbx to use is arbitrary,
  // as long as we're consistent
  return at(0).hpds_.end();
}
std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::endHPD ( void  ) const

Definition at line 36 of file HcalNoiseRBXArray.cc.

References asciidump::at.

{
  // the choice of which rbx to use is arbitrary,
  // as long as we're consistent
  return at(0).hpds_.end();
}
HcalNoiseRBXArray::const_iterator reco::HcalNoiseRBXArray::endRBX ( void  ) const [inline]

Definition at line 43 of file HcalNoiseRBXArray.h.

References end.

{ return end(); }
HcalNoiseRBXArray::iterator reco::HcalNoiseRBXArray::endRBX ( void  ) [inline]

Definition at line 42 of file HcalNoiseRBXArray.h.

References end.

Referenced by findRBX().

{ return end(); }
void HcalNoiseRBXArray::findHPD ( const CaloTower tower,
std::vector< std::vector< HcalNoiseHPD >::iterator > &  vec 
)

Definition at line 182 of file HcalNoiseRBXArray.cc.

References findHPD(), CaloTower::ieta(), HcalHPDRBXMap::indexHPDfromEtaPhi(), CaloTower::iphi(), and HcalHPDRBXMap::isValid().

{
  // clear the vector
  vec.clear();

  // check if the tower corresponds to a valid HPD/RBX
  if(!HcalHPDRBXMap::isValid(tower.ieta(), tower.iphi())) return;

  // find the HPD indices
  std::vector<int> hpdindices;
  HcalHPDRBXMap::indexHPDfromEtaPhi(tower.ieta(), tower.iphi(), hpdindices);
  for(std::vector<int>::const_iterator it=hpdindices.begin(); it!=hpdindices.end(); ++it)
    vec.push_back(findHPD(*it));

  return;
}
std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::findHPD ( const HBHERecHit h)

Definition at line 149 of file HcalNoiseRBXArray.cc.

References findHPD(), and HBHERecHit::id().

{ return findHPD(h.id()); }
std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::findHPD ( const HcalDetId id)
std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::findHPD ( const HBHERecHit h) const

Definition at line 153 of file HcalNoiseRBXArray.cc.

References findHPD(), and HBHERecHit::id().

{ return findHPD(h.id()); }
std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::findHPD ( int  hpdindex)

Definition at line 51 of file HcalNoiseRBXArray.cc.

References asciidump::at, endHPD(), Exception, reco::HcalNoiseRBX::hpds_, HcalHPDRBXMap::indexRBXfromHPD(), HcalHPDRBXMap::isValidHPD(), and edm::errors::LogicError.

Referenced by reco::HcalNoiseInfoProducer::fillcalotwrs(), reco::HcalNoiseInfoProducer::filldigis(), reco::HcalNoiseInfoProducer::fillrechits(), and findHPD().

{
  // if the hpdindex is invalid
  if(!HcalHPDRBXMap::isValidHPD(hpdindex)) return endHPD();
  
  int rbxindex=HcalHPDRBXMap::indexRBXfromHPD(hpdindex);
  
  // find the HPD in the RBX
  HcalNoiseRBX& rbx=at(rbxindex);
  for(std::vector<HcalNoiseHPD>::iterator it=rbx.hpds_.begin(); it!=rbx.hpds_.end(); ++it) {
    if(it->idnumber_==hpdindex) return it;
  }
  
  // if we're here, this is a bug
  throw edm::Exception(edm::errors::LogicError)
    << "Could not find hpdindex " << hpdindex << " in HcalNoiseRBXArray::findHPDfromDetID().  This is a bug.\n";
  return endHPD();
}
std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::findHPD ( const HcalDetId id) const
void HcalNoiseRBXArray::findHPD ( const CaloTower tower,
std::vector< std::vector< HcalNoiseHPD >::const_iterator > &  vec 
) const

Definition at line 165 of file HcalNoiseRBXArray.cc.

References findHPD(), CaloTower::ieta(), HcalHPDRBXMap::indexHPDfromEtaPhi(), CaloTower::iphi(), and HcalHPDRBXMap::isValid().

{
  // clear the vector
  vec.clear();

  // check if the tower corresponds to a valid HPD/RBX
  if(!HcalHPDRBXMap::isValid(tower.ieta(), tower.iphi())) return;

  // find the HPD indices
  std::vector<int> hpdindices;
  HcalHPDRBXMap::indexHPDfromEtaPhi(tower.ieta(), tower.iphi(), hpdindices);
  for(std::vector<int>::const_iterator it=hpdindices.begin(); it!=hpdindices.end(); ++it)
    vec.push_back(findHPD(*it));

  return;
}
std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::findHPD ( int  hpdindex) const

Definition at line 71 of file HcalNoiseRBXArray.cc.

References asciidump::at, endHPD(), Exception, reco::HcalNoiseRBX::hpds_, HcalHPDRBXMap::indexRBXfromHPD(), HcalHPDRBXMap::isValidHPD(), and edm::errors::LogicError.

{
  // if the hpdindex is invalid
  if(!HcalHPDRBXMap::isValidHPD(hpdindex)) return endHPD();
  
  int rbxindex=HcalHPDRBXMap::indexRBXfromHPD(hpdindex);
  
  // find the HPD in the RBX
  const HcalNoiseRBX& rbx=at(rbxindex);
  for(std::vector<HcalNoiseHPD>::const_iterator it=rbx.hpds_.begin(); it!=rbx.hpds_.end(); ++it) {
    if(it->idnumber_==hpdindex) return it;
  }
  
  // if we're here, this is a bug
  throw edm::Exception(edm::errors::LogicError)
    << "Could not find hpdindex " << hpdindex << " in HcalNoiseRBXArray::findHPDfromDetID().  This is a bug.\n";
  return endHPD();
}
std::vector< HcalNoiseHPD >::iterator HcalNoiseRBXArray::findHPD ( const HBHEDataFrame f)

Definition at line 133 of file HcalNoiseRBXArray.cc.

References findHPD(), and HBHEDataFrame::id().

{ return findHPD(f.id()); }
std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBXArray::findHPD ( const HBHEDataFrame f) const

Definition at line 137 of file HcalNoiseRBXArray.cc.

References findHPD(), and HBHEDataFrame::id().

{ return findHPD(f.id()); }
HcalNoiseRBXArray::const_iterator HcalNoiseRBXArray::findRBX ( int  rbxindex) const

Definition at line 98 of file HcalNoiseRBXArray.cc.

References begin, endRBX(), and HcalHPDRBXMap::isValidRBX().

{
  if(!HcalHPDRBXMap::isValidRBX(rbxindex)) return endRBX();
  return begin()+rbxindex;
}
void HcalNoiseRBXArray::findRBX ( const CaloTower tower,
std::vector< HcalNoiseRBXArray::iterator > &  vec 
)

Definition at line 199 of file HcalNoiseRBXArray.cc.

References findRBX(), CaloTower::ieta(), HcalHPDRBXMap::indexRBXfromEtaPhi(), CaloTower::iphi(), and HcalHPDRBXMap::isValid().

{
  // clear the vector
  vec.clear();

  // check if the tower corresponds to a valid HPD/RBX
  if(!HcalHPDRBXMap::isValid(tower.ieta(), tower.iphi())) return;

  // find the RBX indices
  std::vector<int> rbxindices;
  HcalHPDRBXMap::indexRBXfromEtaPhi(tower.ieta(), tower.iphi(), rbxindices);
  for(std::vector<int>::const_iterator it=rbxindices.begin(); it!=rbxindices.end(); ++it)
    vec.push_back(findRBX(*it));

  return;
}
HcalNoiseRBXArray::const_iterator HcalNoiseRBXArray::findRBX ( const HBHERecHit h) const

Definition at line 161 of file HcalNoiseRBXArray.cc.

References findRBX(), and HBHERecHit::id().

{ return findRBX(h.id()); }
void HcalNoiseRBXArray::findRBX ( const CaloTower tower,
std::vector< HcalNoiseRBXArray::const_iterator > &  vec 
) const

Definition at line 216 of file HcalNoiseRBXArray.cc.

References findRBX(), CaloTower::ieta(), HcalHPDRBXMap::indexRBXfromEtaPhi(), CaloTower::iphi(), and HcalHPDRBXMap::isValid().

{
  // clear the vector
  vec.clear();

  // check if the tower corresponds to a valid HPD/RBX
  if(!HcalHPDRBXMap::isValid(tower.ieta(), tower.iphi())) return;

  // find the RBX indices
  std::vector<int> rbxindices;
  HcalHPDRBXMap::indexRBXfromEtaPhi(tower.ieta(), tower.iphi(), rbxindices);
  for(std::vector<int>::const_iterator it=rbxindices.begin(); it!=rbxindices.end(); ++it)
    vec.push_back(findRBX(*it));

  return;
}
HcalNoiseRBXArray::iterator HcalNoiseRBXArray::findRBX ( const HcalDetId id)
HcalNoiseRBXArray::iterator HcalNoiseRBXArray::findRBX ( int  rbxindex)

Definition at line 91 of file HcalNoiseRBXArray.cc.

References begin, endRBX(), and HcalHPDRBXMap::isValidRBX().

Referenced by reco::HcalNoiseInfoProducer::filldigis(), and findRBX().

{
  if(!HcalHPDRBXMap::isValidRBX(rbxindex)) return endRBX();
  return begin()+rbxindex;
}
HcalNoiseRBXArray::const_iterator HcalNoiseRBXArray::findRBX ( const HBHEDataFrame f) const

Definition at line 145 of file HcalNoiseRBXArray.cc.

References findRBX(), and HBHEDataFrame::id().

{ return findRBX(f.id()); }
HcalNoiseRBXArray::iterator HcalNoiseRBXArray::findRBX ( const HBHERecHit h)

Definition at line 157 of file HcalNoiseRBXArray.cc.

References findRBX(), and HBHERecHit::id().

{ return findRBX(h.id()); }
HcalNoiseRBXArray::const_iterator HcalNoiseRBXArray::findRBX ( const HcalDetId id) const
HcalNoiseRBXArray::iterator HcalNoiseRBXArray::findRBX ( const HBHEDataFrame f)

Definition at line 141 of file HcalNoiseRBXArray.cc.

References findRBX(), and HBHEDataFrame::id().

{ return findRBX(f.id()); }