CMS 3D CMS Logo

Public Member Functions | Public Attributes

ShallowClustersProducer::NearDigis Struct Reference

List of all members.

Public Member Functions

float eta () const
float etaasymm () const
float etaX () const
 NearDigis (const SiStripClusterInfo &, const edm::DetSetVector< SiStripProcessedRawDigi > &)
 NearDigis (const SiStripClusterInfo &)
float outsideasymm () const

Public Attributes

float first
float last
float left
float Lleft
float max
float right
float Rright

Detailed Description

Definition at line 29 of file ShallowClustersProducer.h.


Constructor & Destructor Documentation

ShallowClustersProducer::NearDigis::NearDigis ( const SiStripClusterInfo info)

Definition at line 188 of file ShallowClustersProducer.cc.

References first, last, left, Lleft, max, SiStripClusterInfo::maxCharge(), SiStripClusterInfo::maxIndex(), right, Rright, SiStripClusterInfo::stripCharges(), and SiStripClusterInfo::width().

                                          {
  max =  info.maxCharge();
  left =           info.maxIndex()    > uint16_t(0)                ? info.stripCharges().at(info.maxIndex()-1)      : 0 ;
  Lleft =          info.maxIndex()    > uint16_t(1)                ? info.stripCharges().at(info.maxIndex()-2)      : 0 ;
  right=  unsigned(info.maxIndex()+1) < info.stripCharges().size() ? info.stripCharges().at(info.maxIndex()+1)      : 0 ;
  Rright= unsigned(info.maxIndex()+2) < info.stripCharges().size() ? info.stripCharges().at(info.maxIndex()+2)      : 0 ;
  first = info.stripCharges().at(0);
  last =  info.stripCharges().at(info.width()-1);
}
ShallowClustersProducer::NearDigis::NearDigis ( const SiStripClusterInfo info,
const edm::DetSetVector< SiStripProcessedRawDigi > &  rawProcessedDigis 
)

Definition at line 199 of file ShallowClustersProducer.cc.

References ecalMGPA::adc(), SiStripClusterInfo::detId(), edm::DetSetVector< T >::end(), edm::DetSetVector< T >::find(), first, SiStripClusterInfo::firstStrip(), prof2calltree::last, max(), SiStripClusterInfo::maxStrip(), edm::DetSetVector< T >::size(), and SiStripClusterInfo::width().

                                                                                                             {
  edm::DetSetVector<SiStripProcessedRawDigi>::const_iterator digiframe = rawProcessedDigis.find(info.detId());
  if( digiframe != rawProcessedDigis.end()) {
    max =                                                            digiframe->data.at(info.maxStrip()).adc()       ;
    left =            info.maxStrip()    > uint16_t(0)             ? digiframe->data.at(info.maxStrip()-1).adc() : 0 ;
    Lleft =           info.maxStrip()    > uint16_t(1)             ? digiframe->data.at(info.maxStrip()-2).adc() : 0 ;
    right =  unsigned(info.maxStrip()+1) < digiframe->data.size()  ? digiframe->data.at(info.maxStrip()+1).adc() : 0 ;
    Rright = unsigned(info.maxStrip()+2) < digiframe->data.size()  ? digiframe->data.at(info.maxStrip()+2).adc() : 0 ;
    first = digiframe->data.at(info.firstStrip()).adc();
    last = digiframe->data.at(info.firstStrip()+info.width() - 1).adc();
  } else {
    *this = NearDigis(info);
  }
}

Member Function Documentation

float ShallowClustersProducer::NearDigis::eta ( ) const [inline]

Definition at line 34 of file ShallowClustersProducer.h.

References left, max, and right.

Referenced by ShallowClustersProducer::produce().

{return right>left ? max/(max+right) : left/(left+max);}
float ShallowClustersProducer::NearDigis::etaasymm ( ) const [inline]

Definition at line 35 of file ShallowClustersProducer.h.

References left, max, and right.

Referenced by ShallowClustersProducer::produce().

{return right>left ? (right-max)/(right+max) : (max-left)/(max+left);}
float ShallowClustersProducer::NearDigis::etaX ( ) const [inline]

Definition at line 33 of file ShallowClustersProducer.h.

References left, max, and right.

Referenced by ShallowClustersProducer::produce().

{return (left+right)/max/2.;}
float ShallowClustersProducer::NearDigis::outsideasymm ( ) const [inline]

Definition at line 36 of file ShallowClustersProducer.h.

References first, and last.

Referenced by ShallowClustersProducer::produce().

{return (last-first)/(last+first);}

Member Data Documentation

Definition at line 32 of file ShallowClustersProducer.h.

Referenced by NearDigis(), and ShallowClustersProducer::produce().

Definition at line 32 of file ShallowClustersProducer.h.

Referenced by NearDigis(), and ShallowClustersProducer::produce().