CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes | Friends
OptoScanAnalysis Class Reference

Histogram-based analysis for opto bias/gain scan. More...

#include <OptoScanAnalysis.h>

Inheritance diagram for OptoScanAnalysis:
CommissioningAnalysis

Public Member Functions

const VFloatbaseSlope () const
 
const VIntbias () const
 
const uint16_t & gain () const
 
bool isValid () const override
 
const VFloatliftOff () const
 
const VFloatlinkNoise () const
 
const VFloatmeasGain () const
 
 OptoScanAnalysis ()
 
 OptoScanAnalysis (const uint32_t &key)
 
void print (std::stringstream &, uint32_t gain_setting=sistrip::invalid_) override
 
void reset () override
 
void summary (std::stringstream &) const override
 
const VFloatthreshold () const
 
const VFloattickHeight () const
 
const VFloatzeroLight () const
 
 ~OptoScanAnalysis () override
 
- Public Member Functions inherited from CommissioningAnalysis
virtual void addErrorCode (const std::string &error)
 
 CommissioningAnalysis (const std::string &my_name)
 
 CommissioningAnalysis (const uint32_t &key, const std::string &my_name)
 
const uint32_t & dcuId () const
 
void dcuId (const uint32_t &)
 
const uint32_t & detId () const
 
void detId (const uint32_t &)
 
const uint32_t & fecKey () const
 
void fecKey (const uint32_t &)
 
const uint32_t & fedKey () const
 
void fedKey (const uint32_t &)
 
const VStringgetErrorCodes () const
 
virtual void header (std::stringstream &) const
 
const std::string & myName () const
 
void setErrorCodes (const VString &errors)
 
virtual ~CommissioningAnalysis ()
 

Static Public Attributes

static const uint16_t defaultBiasSetting_ = sistrip::invalid_
 
static const uint16_t defaultGainSetting_ = sistrip::invalid_
 
static const float fedAdcGain_ = 1.024 / 1024.
 

Private Attributes

VFloat baseSlope_
 
VInt bias_
 
uint16_t gain_
 
VFloat liftOff_
 
VFloat linkNoise_
 
VFloat measGain_
 
VFloat threshold_
 
VFloat tickHeight_
 
VFloat zeroLight_
 

Friends

class OptoScanAlgorithm
 

Additional Inherited Members

- Public Types inherited from CommissioningAnalysis
typedef std::vector< bool > VBool
 
typedef std::vector< float > VFloat
 
typedef std::vector< uint16_t > VInt
 
typedef std::vector< std::string > VString
 
typedef std::vector< VBoolVVBool
 
typedef std::vector< VFloatVVFloat
 
typedef std::vector< VIntVVInt
 

Detailed Description

Histogram-based analysis for opto bias/gain scan.

Author
M. Wingham, R.Bainbridge

Definition at line 15 of file OptoScanAnalysis.h.

Constructor & Destructor Documentation

◆ OptoScanAnalysis() [1/2]

OptoScanAnalysis::OptoScanAnalysis ( const uint32_t &  key)

◆ OptoScanAnalysis() [2/2]

OptoScanAnalysis::OptoScanAnalysis ( )

◆ ~OptoScanAnalysis()

OptoScanAnalysis::~OptoScanAnalysis ( )
inlineoverride

Definition at line 23 of file OptoScanAnalysis.h.

23 { ; }

Member Function Documentation

◆ baseSlope()

const OptoScanAnalysis::VFloat & OptoScanAnalysis::baseSlope ( ) const
inline

Baseline slope [ADC/I2C]

Definition at line 122 of file OptoScanAnalysis.h.

122 { return baseSlope_; }

References baseSlope_.

◆ bias()

const OptoScanAnalysis::VInt & OptoScanAnalysis::bias ( ) const
inline

LLD bias value for each gain setting

Definition at line 115 of file OptoScanAnalysis.h.

115 { return bias_; }

References bias_.

◆ gain()

const uint16_t & OptoScanAnalysis::gain ( ) const
inline

Optimum LLD gain setting

Definition at line 114 of file OptoScanAnalysis.h.

114 { return gain_; }

References gain_.

Referenced by print(), and summary().

◆ isValid()

bool OptoScanAnalysis::isValid ( void  ) const
overridevirtual

◆ liftOff()

const OptoScanAnalysis::VFloat & OptoScanAnalysis::liftOff ( ) const
inline

Baseline "lift-off" values [mA]

Definition at line 119 of file OptoScanAnalysis.h.

119 { return liftOff_; }

References liftOff_.

◆ linkNoise()

const OptoScanAnalysis::VFloat & OptoScanAnalysis::linkNoise ( ) const
inline

Noise value at "zero light" levels [ADC]

Definition at line 118 of file OptoScanAnalysis.h.

118 { return linkNoise_; }

References linkNoise_.

◆ measGain()

const OptoScanAnalysis::VFloat & OptoScanAnalysis::measGain ( ) const
inline

Measured gains for each setting [V/V].

Definition at line 116 of file OptoScanAnalysis.h.

116 { return measGain_; }

References measGain_.

◆ print()

void OptoScanAnalysis::print ( std::stringstream &  ss,
uint32_t  gain_setting = sistrip::invalid_ 
)
overridevirtual

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 125 of file OptoScanAnalysis.cc.

125  {
126  if (gain >= 4) {
127  gain = gain_;
128  }
129 
130  if (gain >= bias_.size()) {
131  edm::LogWarning(mlCommissioning_) << "[" << myName() << "::" << __func__ << "]"
132  << " Unexpected gain setting: " << gain;
133  return;
134  }
135 
136  header(ss);
137  ss << std::fixed << std::setprecision(2) << " Optimum LLD gain setting : " << gain_ << std::endl
138  << " LLD gain setting : " << gain << std::endl
139  << " LLD bias setting : " << bias_[gain] << std::endl
140  << " Measured gain [V/V] : " << measGain_[gain] << std::endl
141  << " Zero light level [ADC] : " << zeroLight_[gain] << std::endl
142  << " Link noise [ADC] : " << linkNoise_[gain] << std::endl
143  << " Baseline 'lift off' [mA] : " << liftOff_[gain] << std::endl
144  << " Laser threshold [mA] : " << threshold_[gain] << std::endl
145  << " Tick mark height [ADC] : " << tickHeight_[gain] << std::endl
146  << " Baseline slope [ADC/I2C] : " << baseSlope_[gain] << std::endl
147  << std::boolalpha << " isValid : " << isValid() << std::endl
148  << std::noboolalpha << " Error codes (found " << std::setw(2) << std::setfill(' ') << getErrorCodes().size()
149  << ") : ";
150  if (getErrorCodes().empty()) {
151  ss << "(none)";
152  } else {
153  VString::const_iterator istr = getErrorCodes().begin();
154  VString::const_iterator jstr = getErrorCodes().end();
155  for (; istr != jstr; ++istr) {
156  ss << *istr << " ";
157  }
158  }
159  ss << std::endl;
160 }

References baseSlope_, bias_, relativeConstraints::empty, alignBH_cfg::fixed, gain(), gain_, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), isValid(), liftOff_, linkNoise_, measGain_, sistrip::mlCommissioning_, CommissioningAnalysis::myName(), contentValuesCheck::ss, threshold_, tickHeight_, and zeroLight_.

◆ reset()

void OptoScanAnalysis::reset ( void  )
overridevirtual

◆ summary()

void OptoScanAnalysis::summary ( std::stringstream &  ss) const
overridevirtual

Overrides base method.

Reimplemented from CommissioningAnalysis.

Definition at line 78 of file OptoScanAnalysis.cc.

78  {
79  SiStripFecKey fec_key(fecKey());
80  SiStripFedKey fed_key(fedKey());
81 
83 
84  std::stringstream extra1, extra2, extra3;
88 
90  type,
92  fed_key.key(),
94  fec_key.lldChan(),
95  extra1.str())
96  .title();
98  type,
100  fed_key.key(),
102  fec_key.lldChan(),
103  extra2.str())
104  .title();
106  type,
108  fed_key.key(),
110  fec_key.lldChan(),
111  extra3.str())
112  .title();
113 
114  ss << " Summary"
115  << ":" << (isValid() ? "Valid" : "Invalid") << ":" << sistrip::controlView_ << ":" << fec_key.fecCrate() << "/"
116  << fec_key.fecSlot() << "/" << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << ":"
117  << sistrip::dqmRoot_ << sistrip::dir_ << "Collate" << sistrip::dir_
118  << SiStripFecKey(fec_key.fecCrate(), fec_key.fecSlot(), fec_key.fecRing(), fec_key.ccuAddr(), fec_key.ccuChan())
119  .path()
120  << ":" << title1 << ";" << title2 << ";" << title3 << std::endl;
121 }

References sistrip::extrainfo::baselineRms_, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), sistrip::controlView_, sistrip::extrainfo::digital_, sistrip::dir_, sistrip::dqmRoot_, sistrip::EXPERT_HISTO, SiStripFecKey::fecCrate(), CommissioningAnalysis::fecKey(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), sistrip::FED_KEY, CommissioningAnalysis::fedKey(), gain(), sistrip::extrainfo::gain_, isValid(), SiStripKey::key(), sistrip::LLD_CHAN, SiStripFecKey::lldChan(), CommissioningAnalysis::myName(), castor_dqm_sourceclient_file_cfg::path, SiStripEnumsAndStrings::runType(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

◆ threshold()

const OptoScanAnalysis::VFloat & OptoScanAnalysis::threshold ( ) const
inline

Laser thresholds [mA]

Definition at line 120 of file OptoScanAnalysis.h.

120 { return threshold_; }

References threshold_.

◆ tickHeight()

const OptoScanAnalysis::VFloat & OptoScanAnalysis::tickHeight ( ) const
inline

Tick mark heights [ADC]

Definition at line 121 of file OptoScanAnalysis.h.

121 { return tickHeight_; }

References tickHeight_.

◆ zeroLight()

const OptoScanAnalysis::VFloat & OptoScanAnalysis::zeroLight ( ) const
inline

"Zero light" levels [ADC]

Definition at line 117 of file OptoScanAnalysis.h.

117 { return zeroLight_; }

References zeroLight_.

Friends And Related Function Documentation

◆ OptoScanAlgorithm

friend class OptoScanAlgorithm
friend

Definition at line 25 of file OptoScanAnalysis.h.

Member Data Documentation

◆ baseSlope_

VFloat OptoScanAnalysis::baseSlope_
private

Slope of baseline [ADC/I2C]

Definition at line 109 of file OptoScanAnalysis.h.

Referenced by baseSlope(), print(), and reset().

◆ bias_

VInt OptoScanAnalysis::bias_
private

LLD bias value for each gain setting

Definition at line 88 of file OptoScanAnalysis.h.

Referenced by bias(), isValid(), print(), and reset().

◆ defaultBiasSetting_

const uint16_t OptoScanAnalysis::defaultBiasSetting_ = sistrip::invalid_
static

Default LLD bias setting if analysis fails.

Definition at line 76 of file OptoScanAnalysis.h.

Referenced by OptoScanAlgorithm::analyse().

◆ defaultGainSetting_

const uint16_t OptoScanAnalysis::defaultGainSetting_ = sistrip::invalid_
static

Default LLD gain setting if analysis fails.

Definition at line 73 of file OptoScanAnalysis.h.

Referenced by OptoScanAlgorithm::analyse().

◆ fedAdcGain_

const float OptoScanAnalysis::fedAdcGain_ = 1.024 / 1024.
static

Peak-to-peak voltage for FED A/D converter [V/ADC].

Definition at line 79 of file OptoScanAnalysis.h.

Referenced by OptoScanAlgorithm::analyse().

◆ gain_

uint16_t OptoScanAnalysis::gain_
private

Optimum LLD gain setting

Definition at line 85 of file OptoScanAnalysis.h.

Referenced by gain(), isValid(), print(), and reset().

◆ liftOff_

VFloat OptoScanAnalysis::liftOff_
private

Baseline "lift-off" values [mA]

Definition at line 100 of file OptoScanAnalysis.h.

Referenced by liftOff(), print(), and reset().

◆ linkNoise_

VFloat OptoScanAnalysis::linkNoise_
private

Noise value at "zero light" levels [ADC]

Definition at line 97 of file OptoScanAnalysis.h.

Referenced by linkNoise(), print(), and reset().

◆ measGain_

VFloat OptoScanAnalysis::measGain_
private

Measured gains for each setting [V/V].

Definition at line 91 of file OptoScanAnalysis.h.

Referenced by measGain(), print(), and reset().

◆ threshold_

VFloat OptoScanAnalysis::threshold_
private

Laser thresholds [mA]

Definition at line 103 of file OptoScanAnalysis.h.

Referenced by print(), reset(), and threshold().

◆ tickHeight_

VFloat OptoScanAnalysis::tickHeight_
private

Tick mark heights [ADC]

Definition at line 106 of file OptoScanAnalysis.h.

Referenced by print(), reset(), and tickHeight().

◆ zeroLight_

VFloat OptoScanAnalysis::zeroLight_
private

"Zero light" levels [ADC]

Definition at line 94 of file OptoScanAnalysis.h.

Referenced by print(), reset(), and zeroLight().

CommissioningAnalysis::getErrorCodes
const VString & getErrorCodes() const
Definition: CommissioningAnalysis.h:131
SiStripEnumsAndStrings::runType
static std::string runType(const sistrip::RunType &)
Definition: SiStripEnumsAndStrings.cc:39
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
OptoScanAnalysis::liftOff_
VFloat liftOff_
Definition: OptoScanAnalysis.h:100
OptoScanAnalysis::baseSlope_
VFloat baseSlope_
Definition: OptoScanAnalysis.h:109
OptoScanAnalysis::tickHeight_
VFloat tickHeight_
Definition: OptoScanAnalysis.h:106
CommissioningAnalysis::fedKey
const uint32_t & fedKey() const
Definition: CommissioningAnalysis.h:134
sistrip::dir_
static const char dir_[]
Definition: ConstantsForDqm.h:17
OptoScanAnalysis::gain
const uint16_t & gain() const
Definition: OptoScanAnalysis.h:114
sistrip::extrainfo::digital_
static const char digital_[]
Definition: ConstantsForDqm.h:40
sistrip::optoScanAnalysis_
static const char optoScanAnalysis_[]
Definition: ConstantsForCommissioningAnalysis.h:51
sistrip::RunType
RunType
Definition: ConstantsForRunType.h:70
SiStripFedKey
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
sistrip::extrainfo::baselineRms_
static const char baselineRms_[]
Definition: ConstantsForDqm.h:41
CommissioningAnalysis::VFloat
std::vector< float > VFloat
Definition: CommissioningAnalysis.h:30
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
sistrip::mlCommissioning_
static const char mlCommissioning_[]
Definition: ConstantsForLogger.h:15
CommissioningAnalysis::header
virtual void header(std::stringstream &) const
Definition: CommissioningAnalysis.cc:33
OptoScanAnalysis::measGain_
VFloat measGain_
Definition: OptoScanAnalysis.h:91
sistrip::EXPERT_HISTO
Definition: ConstantsForHistoType.h:29
SiStripFecKey
Utility class that identifies a position within the strip tracker control structure,...
Definition: SiStripFecKey.h:45
CommissioningAnalysis::CommissioningAnalysis
CommissioningAnalysis()
Definition: CommissioningAnalysis.h:105
OptoScanAnalysis::zeroLight_
VFloat zeroLight_
Definition: OptoScanAnalysis.h:94
sistrip::extrainfo::gain_
static const char gain_[]
Definition: ConstantsForDqm.h:39
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
sistrip::maximum_
static const uint16_t maximum_
Definition: Constants.h:20
sistrip::controlView_
static const char controlView_[]
Definition: ConstantsForView.h:21
OptoScanAnalysis::gain_
uint16_t gain_
Definition: OptoScanAnalysis.h:85
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
sistrip::dqmRoot_
static const char dqmRoot_[]
Definition: ConstantsForDqm.h:28
OptoScanAnalysis::linkNoise_
VFloat linkNoise_
Definition: OptoScanAnalysis.h:97
CommissioningAnalysis::VInt
std::vector< uint16_t > VInt
Definition: CommissioningAnalysis.h:34
OptoScanAnalysis::isValid
bool isValid() const override
Definition: OptoScanAnalysis.cc:72
CommissioningAnalysis::fecKey
const uint32_t & fecKey() const
Definition: CommissioningAnalysis.h:133
OptoScanAnalysis::bias_
VInt bias_
Definition: OptoScanAnalysis.h:88
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
CommissioningAnalysis::myName
const std::string & myName() const
Definition: CommissioningAnalysis.h:139
SiStripHistoTitle
Utility class that holds histogram title.
Definition: SiStripHistoTitle.h:20
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
sistrip::FED_KEY
Definition: ConstantsForKeyType.h:30
OptoScanAnalysis::threshold_
VFloat threshold_
Definition: OptoScanAnalysis.h:103
crabWrapper.key
key
Definition: crabWrapper.py:19
sistrip::LLD_CHAN
Definition: ConstantsForGranularity.h:78