CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
ShallowClustersProducer::NearDigis Struct Reference

Public Member Functions

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

Public Attributes

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

Detailed Description

Definition at line 32 of file ShallowClustersProducer.h.

Constructor & Destructor Documentation

◆ NearDigis() [1/2]

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

Definition at line 195 of file ShallowClustersProducer.cc.

195  {
196  max = info.maxCharge();
197  left = info.maxIndex() > uint16_t(0) ? info.stripCharges()[info.maxIndex() - 1] : 0;
198  Lleft = info.maxIndex() > uint16_t(1) ? info.stripCharges()[info.maxIndex() - 2] : 0;
199  right = unsigned(info.maxIndex() + 1) < info.stripCharges().size() ? info.stripCharges()[info.maxIndex() + 1] : 0;
200  Rright = unsigned(info.maxIndex() + 2) < info.stripCharges().size() ? info.stripCharges()[info.maxIndex() + 2] : 0;
201  first = info.stripCharges()[0];
202  last = info.stripCharges()[info.width() - 1];
203 }

References first, info(), last, left, Lleft, max, right, and Rright.

◆ NearDigis() [2/2]

ShallowClustersProducer::NearDigis::NearDigis ( const SiStripClusterInfo info,
const edm::DetSetVector< SiStripProcessedRawDigi > &  rawProcessedDigis 
)

Definition at line 205 of file ShallowClustersProducer.cc.

206  {
207  edm::DetSetVector<SiStripProcessedRawDigi>::const_iterator digiframe = rawProcessedDigis.find(info.detId());
208  if (digiframe != rawProcessedDigis.end()) {
209  max = digiframe->data.at(info.maxStrip()).adc();
210  left = info.maxStrip() > uint16_t(0) ? digiframe->data.at(info.maxStrip() - 1).adc() : 0;
211  Lleft = info.maxStrip() > uint16_t(1) ? digiframe->data.at(info.maxStrip() - 2).adc() : 0;
212  right = unsigned(info.maxStrip() + 1) < digiframe->data.size() ? digiframe->data.at(info.maxStrip() + 1).adc() : 0;
213  Rright = unsigned(info.maxStrip() + 2) < digiframe->data.size() ? digiframe->data.at(info.maxStrip() + 2).adc() : 0;
214  first = digiframe->data.at(info.firstStrip()).adc();
215  last = digiframe->data.at(info.firstStrip() + info.width() - 1).adc();
216  } else {
217  *this = NearDigis(info);
218  }
219 }

References ecalMGPA::adc(), edm::DetSetVector< T >::end(), edm::DetSetVector< T >::find(), dqmdumpme::first, info(), dqmdumpme::last, SiStripPI::max, and edm::DetSetVector< T >::size().

Member Function Documentation

◆ eta()

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

Definition at line 37 of file ShallowClustersProducer.h.

37 { return right > left ? max / (max + right) : left / (left + max); }

References left, max, and right.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), ShallowClustersProducer::produce(), and Jet.Jet::puJetId().

◆ etaasymm()

float ShallowClustersProducer::NearDigis::etaasymm ( ) const
inline

Definition at line 38 of file ShallowClustersProducer.h.

38 { return right > left ? (right - max) / (right + max) : (max - left) / (max + left); }

References left, max, and right.

Referenced by ShallowClustersProducer::produce().

◆ etaX()

float ShallowClustersProducer::NearDigis::etaX ( ) const
inline

Definition at line 36 of file ShallowClustersProducer.h.

36 { return ((left + right) / max) / 2.; }

References left, max, and right.

Referenced by ShallowClustersProducer::produce().

◆ outsideasymm()

float ShallowClustersProducer::NearDigis::outsideasymm ( ) const
inline

Definition at line 39 of file ShallowClustersProducer.h.

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

References first, and last.

Referenced by ShallowClustersProducer::produce().

Member Data Documentation

◆ first

float ShallowClustersProducer::NearDigis::first

◆ last

float ShallowClustersProducer::NearDigis::last

◆ left

float ShallowClustersProducer::NearDigis::left

◆ Lleft

float ShallowClustersProducer::NearDigis::Lleft

Definition at line 35 of file ShallowClustersProducer.h.

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

◆ max

float ShallowClustersProducer::NearDigis::max

◆ right

float ShallowClustersProducer::NearDigis::right

◆ Rright

float ShallowClustersProducer::NearDigis::Rright

Definition at line 35 of file ShallowClustersProducer.h.

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

ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
ShallowClustersProducer::NearDigis::max
float max
Definition: ShallowClustersProducer.h:35
edm::DetSetVector::end
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
ShallowClustersProducer::NearDigis::left
float left
Definition: ShallowClustersProducer.h:35
ShallowClustersProducer::NearDigis::last
float last
Definition: ShallowClustersProducer.h:35
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
ShallowClustersProducer::NearDigis::Rright
float Rright
Definition: ShallowClustersProducer.h:35
edm::DetSetVector::size
size_type size() const
Return the number of contained DetSets.
Definition: DetSetVector.h:259
ShallowClustersProducer::NearDigis::Lleft
float Lleft
Definition: ShallowClustersProducer.h:35
ShallowClustersProducer::NearDigis::first
float first
Definition: ShallowClustersProducer.h:35
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
edm::DetSetVector::find
iterator find(det_id_type id)
Definition: DetSetVector.h:264
ShallowClustersProducer::NearDigis::right
float right
Definition: ShallowClustersProducer.h:35
ShallowClustersProducer::NearDigis::NearDigis
NearDigis(const SiStripClusterInfo &)
Definition: ShallowClustersProducer.cc:195