CMS 3D CMS Logo

Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends

reco::HcalNoiseRBX Class Reference

#include <HcalNoiseRBX.h>

List of all members.

Classes

struct  twrcomp

Public Member Functions

const std::vector< float > allCharge (void) const
float allChargeHighest2TS (unsigned int firstts=4) const
float allChargeHighest3TS (unsigned int firstts=4) const
float allChargeTotal (void) const
double caloTowerEmE (void) const
double caloTowerEmFraction (void) const
double caloTowerHadE (void) const
double caloTowerTotalE (void) const
 HcalNoiseRBX ()
const std::vector< HcalNoiseHPDHPDs (void) const
std::vector< HcalNoiseHPD >
::const_iterator 
HPDsBegin (void) const
std::vector< HcalNoiseHPD >
::const_iterator 
HPDsEnd (void) const
int idnumber (void) const
std::vector< HcalNoiseHPD >
::const_iterator 
maxHPD (double threshold=1.5) const
double maxRecHitTime (double threshold=20.0) const
int maxZeros (void) const
double minRecHitTime (double threshold=20.0) const
int numRecHits (double threshold=1.5) const
double recHitEnergy (double theshold=1.5) const
int totalZeros (void) const
virtual ~HcalNoiseRBX ()

Private Types

typedef std::set< CaloTower,
twrcomp
towerset_t

Private Member Functions

void uniqueTowers (towerset_t &twrs_) const

Private Attributes

std::vector< float > allCharge_
std::vector< HcalNoiseHPDhpds_
int idnumber_

Friends

class HcalNoiseInfoProducer
class HcalNoiseRBXArray

Detailed Description

Definition at line 35 of file HcalNoiseRBX.h.


Member Typedef Documentation

typedef std::set<CaloTower, twrcomp> reco::HcalNoiseRBX::towerset_t [private]

Definition at line 113 of file HcalNoiseRBX.h.


Constructor & Destructor Documentation

HcalNoiseRBX::HcalNoiseRBX ( )

Definition at line 16 of file HcalNoiseRBX.cc.

HcalNoiseRBX::~HcalNoiseRBX ( ) [virtual]

Definition at line 23 of file HcalNoiseRBX.cc.

{
}

Member Function Documentation

const std::vector< float > HcalNoiseRBX::allCharge ( void  ) const

Definition at line 52 of file HcalNoiseRBX.cc.

References allCharge_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{
  return allCharge_;
}
float HcalNoiseRBX::allChargeHighest2TS ( unsigned int  firstts = 4) const

Definition at line 65 of file HcalNoiseRBX.cc.

References allCharge_, i, and pileupDistInMC::total.

Referenced by HcalNoiseMonitor::analyze(), and CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{
  float total=0;
  for(unsigned int i=firstts; i<firstts+2 && allCharge_.size(); i++)
    total += allCharge_[i];
  return total;
}
float HcalNoiseRBX::allChargeHighest3TS ( unsigned int  firstts = 4) const

Definition at line 73 of file HcalNoiseRBX.cc.

References allCharge_, i, and pileupDistInMC::total.

{
  float total=0;
  for(unsigned int i=firstts; i<firstts+3 && allCharge_.size(); i++)
    total += allCharge_[i];
  return total;
}
float HcalNoiseRBX::allChargeTotal ( void  ) const

Definition at line 57 of file HcalNoiseRBX.cc.

References allCharge_, i, and pileupDistInMC::total.

Referenced by HcalNoiseMonitor::analyze(), and CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{
  float total=0;
  for(unsigned int i=0; i<allCharge_.size(); i++)
    total += allCharge_[i];
  return total;
}
double HcalNoiseRBX::caloTowerEmE ( void  ) const

Definition at line 146 of file HcalNoiseRBX.cc.

References alignCSCRings::e, and uniqueTowers().

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{
  double e=0;
  towerset_t twrs;
  uniqueTowers(twrs);
  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
    e += it->emEnergy();
  }
  return e;
}
double HcalNoiseRBX::caloTowerEmFraction ( void  ) const

Definition at line 168 of file HcalNoiseRBX.cc.

References alignCSCRings::e, h, and uniqueTowers().

{
  double e=0, h=0;
  towerset_t twrs;
  uniqueTowers(twrs);
  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
    h += it->hadEnergy();
    e += it->emEnergy();
  }
  return (e+h)==0 ? 999 : e/(e+h);
}
double HcalNoiseRBX::caloTowerHadE ( void  ) const

Definition at line 135 of file HcalNoiseRBX.cc.

References h, and uniqueTowers().

{
  double h=0;
  towerset_t twrs;
  uniqueTowers(twrs);
  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
    h += it->hadEnergy();
  }
  return h;
}
double HcalNoiseRBX::caloTowerTotalE ( void  ) const

Definition at line 157 of file HcalNoiseRBX.cc.

References alignCSCRings::e, and uniqueTowers().

{
  double e=0;
  towerset_t twrs;
  uniqueTowers(twrs);
  for(towerset_t::const_iterator it=twrs.begin(); it!=twrs.end(); ++it) {
    e += it->hadEnergy() + it->emEnergy();
  }
  return e;
}
const std::vector< HcalNoiseHPD > HcalNoiseRBX::HPDs ( void  ) const

Definition at line 33 of file HcalNoiseRBX.cc.

References hpds_.

Referenced by HcalNoiseMonitor::analyze().

{
  return hpds_;
}
std::vector<HcalNoiseHPD>::const_iterator reco::HcalNoiseRBX::HPDsBegin ( void  ) const [inline]

Definition at line 61 of file HcalNoiseRBX.h.

References hpds_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{ return hpds_.begin(); }
std::vector<HcalNoiseHPD>::const_iterator reco::HcalNoiseRBX::HPDsEnd ( void  ) const [inline]

Definition at line 62 of file HcalNoiseRBX.h.

References hpds_.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{ return hpds_.end(); }
int HcalNoiseRBX::idnumber ( void  ) const

Definition at line 28 of file HcalNoiseRBX.cc.

References idnumber_.

Referenced by HcalNoiseMonitor::analyze().

{
  return idnumber_;
}
std::vector< HcalNoiseHPD >::const_iterator HcalNoiseRBX::maxHPD ( double  threshold = 1.5) const

Definition at line 38 of file HcalNoiseRBX.cc.

References hpds_.

{
  std::vector<HcalNoiseHPD>::const_iterator maxit=hpds_.end();
  double maxenergy=-99999999.;
  for(std::vector<HcalNoiseHPD>::const_iterator it=hpds_.begin(); it!=hpds_.end(); ++it) {
    double tempenergy=it->recHitEnergy();
    if(tempenergy>maxenergy) {
      maxenergy=tempenergy;
      maxit=it;
    }
  }
  return maxit;
}
double HcalNoiseRBX::maxRecHitTime ( double  threshold = 20.0) const

Definition at line 117 of file HcalNoiseRBX.cc.

References hpds_, and i.

{
  double maxtime=-9999999.;
  for(unsigned int i=0; i<hpds_.size(); i++) {
    double temptime=hpds_[i].maxRecHitTime(threshold);
    if(temptime>maxtime) maxtime=temptime;
  }
  return maxtime;
}
int HcalNoiseRBX::maxZeros ( void  ) const

Definition at line 90 of file HcalNoiseRBX.cc.

References hpds_, i, and max().

Referenced by HcalNoiseMonitor::analyze().

{
  int max=0;
  for(unsigned int i=0; i<hpds_.size(); i++)
    if(hpds_[i].maxZeros()>max)
      max=hpds_[i].maxZeros();
  return max;
}
double HcalNoiseRBX::minRecHitTime ( double  threshold = 20.0) const

Definition at line 107 of file HcalNoiseRBX.cc.

References hpds_, and i.

{
  double mintime=9999999.;
  for(unsigned int i=0; i<hpds_.size(); i++) {
    double temptime=hpds_[i].minRecHitTime(threshold);
    if(temptime<mintime) mintime=temptime;
  }
  return mintime;
}
int HcalNoiseRBX::numRecHits ( double  threshold = 1.5) const

Definition at line 127 of file HcalNoiseRBX.cc.

References hpds_, i, and pileupDistInMC::total.

Referenced by HcalNoiseRates::analyze(), HcalNoiseMonitor::analyze(), NoiseRates::analyze(), and CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{
  int total=0;
  for(unsigned int i=0; i<hpds_.size(); i++)
    total += hpds_[i].numRecHits(threshold);
  return total;
}
double HcalNoiseRBX::recHitEnergy ( double  theshold = 1.5) const

Definition at line 99 of file HcalNoiseRBX.cc.

References hpds_, i, and pileupDistInMC::total.

Referenced by HcalNoiseRates::analyze(), HcalNoiseMonitor::analyze(), NoiseRates::analyze(), and CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{
  double total=0;
  for(unsigned int i=0; i<hpds_.size(); i++)
    total += hpds_[i].recHitEnergy(threshold);
  return total;
}
int HcalNoiseRBX::totalZeros ( void  ) const

Definition at line 82 of file HcalNoiseRBX.cc.

References hpds_, and i.

Referenced by HcalNoiseMonitor::analyze(), and CommonHcalNoiseRBXData::CommonHcalNoiseRBXData().

{
  int tot=0;
  for(unsigned int i=0; i<hpds_.size(); i++)
    tot += hpds_[i].totalZeros();
  return tot;
}
void HcalNoiseRBX::uniqueTowers ( towerset_t twrs_) const [private]

Definition at line 180 of file HcalNoiseRBX.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), and hpds_.

Referenced by caloTowerEmE(), caloTowerEmFraction(), caloTowerHadE(), and caloTowerTotalE().

{
  twrs_.clear();
  for(std::vector<HcalNoiseHPD>::const_iterator it1=hpds_.begin(); it1!=hpds_.end(); ++it1) {
    edm::RefVector<CaloTowerCollection> twrsref=it1->caloTowers();
    for(edm::RefVector<CaloTowerCollection>::const_iterator it2=twrsref.begin(); it2!=twrsref.end(); ++it2) {
      CaloTower twr=**it2;
      twrs_.insert(twr);
    }
  }
  return;
}

Friends And Related Function Documentation

friend class HcalNoiseInfoProducer [friend]

Definition at line 37 of file HcalNoiseRBX.h.

friend class HcalNoiseRBXArray [friend]

Definition at line 38 of file HcalNoiseRBX.h.


Member Data Documentation

std::vector<float> reco::HcalNoiseRBX::allCharge_ [private]
std::vector<HcalNoiseHPD> reco::HcalNoiseRBX::hpds_ [private]

Definition at line 99 of file HcalNoiseRBX.h.

Referenced by reco::HcalNoiseRBXArray::HcalNoiseRBXArray(), and idnumber().