CMS 3D CMS Logo

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

Analysis for calibration scans. More...

#include <CalibrationScanAnalysis.h>

Inheritance diagram for CalibrationScanAnalysis:
CommissioningAnalysis

Public Member Functions

void addOneCalibrationPoint (const std::string &key)
 
const VFloatamplitude (const std::string &key)
 
const VFloatbaseline (const std::string &key)
 
const VIntbestISHA ()
 
const VIntbestVFS ()
 
 CalibrationScanAnalysis (const uint32_t &key, const bool &deconv)
 
 CalibrationScanAnalysis (const bool &deconv)
 
const VFloatchi2 (const std::string &key)
 
const VFloatdecayTime (const std::string &key)
 
const std::vector< TGraph2D * > & decayTimeVsISHAVsVFS ()
 
const std::vector< TGraph * > & decayTimeVsVFS ()
 
bool deconvMode ()
 
const VBool isValid (const std::string &key)
 
bool isValid () const override
 
const VFloatpeakTime (const std::string &key)
 
void print (std::stringstream &, uint32_t not_used=0) override
 
void reset () override
 
const VFloatriseTime (const std::string &key)
 
const std::vector< TGraph * > & riseTimeVsISHA ()
 
const std::vector< TGraph2D * > & riseTimeVsISHAVsVFS ()
 
const VFloatsmearing (const std::string &key)
 
const VFloattail (const std::string &key)
 
const VFloattunedAmplitude ()
 
const VFloattunedBaseline ()
 
const VFloattunedChi2 ()
 
const VFloattunedDecayTime ()
 
const VInttunedISHA ()
 
const VFloattunedPeakTime ()
 
const VFloattunedRiseTime ()
 
const VFloattunedSmearing ()
 
const VFloattunedTail ()
 
const VFloattunedTurnOn ()
 
const VFloattunedUndershoot ()
 
const VInttunedVFS ()
 
const VFloatturnOn (const std::string &key)
 
const VFloatundershoot (const std::string &key)
 
 ~CalibrationScanAnalysis () override
 
- Public Member Functions inherited from CommissioningAnalysis
virtual void addErrorCode (const std::string &error)
 
 CommissioningAnalysis (const uint32_t &key, const std::string &my_name)
 
 CommissioningAnalysis (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 void summary (std::stringstream &) const
 
virtual ~CommissioningAnalysis ()
 

Static Public Attributes

static const float maxBaselineThreshold_ = 50
 
static const float maxChi2Threshold_ = 3
 
static const float maxDecayTimeThreshold_ = 250
 
static const float maxISHAforVFSTune_ = 110
 
static const float maxPeakTimeThreshold_ = 130
 
static const float maxRiseTimeThreshold_ = 100
 
static const float maxTurnOnThreshold_ = 40
 
static const float minAmplitudeThreshold_ = 50
 
static const float minBaselineThreshold_ = -50
 
static const float minDecayTimeThreshold_ = 30
 
static const float minISHAforVFSTune_ = 30
 
static const float minPeakTimeThreshold_ = 40
 
static const float minRiseTimeThreshold_ = 10
 
static const float minTurnOnThreshold_ = 5
 
static const float VFSrange_ = 20
 

Private Attributes

std::map< std::string, VFloatamplitude_
 
std::map< std::string, VFloatbaseline_
 
std::map< std::string, VFloatchi2_
 
std::map< std::string, VFloatdecayTime_
 
std::vector< TGraph2D * > decayTime_vs_isha_vfs_
 
std::vector< TGraph * > decayTime_vs_vfs_
 
bool deconv_
 
VInt isha_
 
std::map< std::string, VBoolisvalid_
 
std::map< std::string, VFloatpeakTime_
 
std::map< std::string, VFloatriseTime_
 
std::vector< TGraph * > riseTime_vs_isha_
 
std::vector< TGraph2D * > riseTime_vs_isha_vfs_
 
std::map< std::string, VFloatsmearing_
 
std::map< std::string, VFloattail_
 
VFloat tunedAmplitude_
 
VFloat tunedBaseline_
 
VFloat tunedChi2_
 
VFloat tunedDecayTime_
 
VInt tunedISHA_
 
VFloat tunedPeakTime_
 
VFloat tunedRiseTime_
 
VFloat tunedSmearing_
 
VFloat tunedTail_
 
VFloat tunedTurnOn_
 
VFloat tunedUndershoot_
 
VInt tunedVFS_
 
std::map< std::string, VFloatturnOn_
 
std::map< std::string, VFloatundershoot_
 
VInt vfs_
 

Friends

class CalibrationScanAlgorithm
 

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

Analysis for calibration scans.

Author
R. Gerosa

Definition at line 19 of file CalibrationScanAnalysis.h.

Constructor & Destructor Documentation

CalibrationScanAnalysis::CalibrationScanAnalysis ( const uint32_t &  key,
const bool &  deconv 
)

Definition at line 28 of file CalibrationScanAnalysis.cc.

References sistrip::invalid_, isha_, tunedAmplitude_, tunedBaseline_, tunedChi2_, tunedDecayTime_, tunedISHA_, tunedPeakTime_, tunedRiseTime_, tunedSmearing_, tunedTail_, tunedTurnOn_, tunedUndershoot_, tunedVFS_, and vfs_.

29  : CommissioningAnalysis(key,"CalibrationScanAnalysis"),
30  deconv_(deconv){
31 
46 }
std::vector< float > VFloat
std::vector< uint16_t > VInt
static const uint16_t invalid_
Definition: Constants.h:16
CalibrationScanAnalysis::CalibrationScanAnalysis ( const bool &  deconv)

Definition at line 50 of file CalibrationScanAnalysis.cc.

References sistrip::invalid_, isha_, tunedAmplitude_, tunedBaseline_, tunedChi2_, tunedDecayTime_, tunedISHA_, tunedPeakTime_, tunedRiseTime_, tunedSmearing_, tunedTail_, tunedTurnOn_, tunedUndershoot_, tunedVFS_, and vfs_.

51  : CommissioningAnalysis("CalibrationScanAnalysis"),
52  deconv_(deconv){
53 
56 
69 }
std::vector< float > VFloat
std::vector< uint16_t > VInt
static const uint16_t invalid_
Definition: Constants.h:16
CalibrationScanAnalysis::~CalibrationScanAnalysis ( )
inlineoverride

Member Function Documentation

void CalibrationScanAnalysis::addOneCalibrationPoint ( const std::string &  key)

Definition at line 72 of file CalibrationScanAnalysis.cc.

References amplitude_, baseline_, chi2_, decayTime_, sistrip::invalid_, isvalid_, crabWrapper::key, peakTime_, riseTime_, smearing_, tail_, turnOn_, and undershoot_.

Referenced by CalibrationScanAlgorithm::analyse(), and ~CalibrationScanAnalysis().

73 {
74 
86 }
std::map< std::string, VFloat > smearing_
std::map< std::string, VFloat > undershoot_
std::map< std::string, VFloat > decayTime_
std::map< std::string, VFloat > tail_
std::map< std::string, VFloat > peakTime_
std::map< std::string, VFloat > chi2_
std::vector< float > VFloat
std::vector< bool > VBool
std::map< std::string, VFloat > amplitude_
std::map< std::string, VFloat > riseTime_
static const uint16_t invalid_
Definition: Constants.h:16
std::map< std::string, VFloat > turnOn_
std::map< std::string, VBool > isvalid_
std::map< std::string, VFloat > baseline_
const VFloat& CalibrationScanAnalysis::amplitude ( const std::string &  key)
inline

Definition at line 35 of file CalibrationScanAnalysis.h.

References amplitude_, and crabWrapper::key.

Referenced by CalibrationScanAlgorithm::fillTunedObservables().

35 { return amplitude_[key]; } // key stands for isha_%d_vfs_%d values
std::map< std::string, VFloat > amplitude_
const VFloat& CalibrationScanAnalysis::baseline ( const std::string &  key)
inline

Definition at line 42 of file CalibrationScanAnalysis.h.

References baseline_, and crabWrapper::key.

Referenced by CalibrationScanAlgorithm::fillTunedObservables().

42 { return baseline_[key]; }
std::map< std::string, VFloat > baseline_
const VInt& CalibrationScanAnalysis::bestISHA ( )
inline
const VInt& CalibrationScanAnalysis::bestVFS ( )
inline
const VFloat& CalibrationScanAnalysis::chi2 ( const std::string &  key)
inline

Definition at line 44 of file CalibrationScanAnalysis.h.

References chi2_, and crabWrapper::key.

Referenced by CalibrationScanAlgorithm::fillTunedObservables().

44 { return chi2_[key]; }
std::map< std::string, VFloat > chi2_
const VFloat& CalibrationScanAnalysis::decayTime ( const std::string &  key)
inline
const std::vector<TGraph2D*>& CalibrationScanAnalysis::decayTimeVsISHAVsVFS ( )
inline

Definition at line 62 of file CalibrationScanAnalysis.h.

References decayTime_vs_isha_vfs_.

Referenced by CalibrationHistograms::save().

62 {return decayTime_vs_isha_vfs_;}
std::vector< TGraph2D * > decayTime_vs_isha_vfs_
const std::vector<TGraph*>& CalibrationScanAnalysis::decayTimeVsVFS ( )
inline

Definition at line 60 of file CalibrationScanAnalysis.h.

References decayTime_vs_vfs_.

Referenced by CalibrationHistograms::save().

60 {return decayTime_vs_vfs_;}
std::vector< TGraph * > decayTime_vs_vfs_
bool CalibrationScanAnalysis::deconvMode ( )
inline

Definition at line 68 of file CalibrationScanAnalysis.h.

References deconv_, print(), and reset().

Referenced by CalibrationHistosUsingDb::create(), and print().

const VBool CalibrationScanAnalysis::isValid ( const std::string &  key)
inline
bool CalibrationScanAnalysis::isValid ( void  ) const
overridevirtual

Identifies if analysis is valid or not.

Reimplemented from CommissioningAnalysis.

Definition at line 148 of file CalibrationScanAnalysis.cc.

Referenced by ntupleDataFormat._Object::_checkIsValid(), isValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

148 { return true;}
const VFloat& CalibrationScanAnalysis::peakTime ( const std::string &  key)
inline

Definition at line 40 of file CalibrationScanAnalysis.h.

References crabWrapper::key, and peakTime_.

Referenced by CalibrationScanAlgorithm::fillTunedObservables().

40 { return peakTime_[key]; }
std::map< std::string, VFloat > peakTime_
void CalibrationScanAnalysis::print ( std::stringstream &  ,
uint32_t  not_used = 0 
)
overridevirtual

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 124 of file CalibrationScanAnalysis.cc.

References amplitude_, baseline_, chi2_, decayTime_, deconvMode(), CommissioningAnalysis::header(), peakTime_, riseTime_, smearing_, turnOn_, and undershoot_.

Referenced by deconvMode().

124  {
125  header( ss );
126  ss << " Monitorables for APV number : " << iapv ;
127  if ( iapv == 0 ) { ss << " (first of pair)"; }
128  else if ( iapv == 1 ) { ss << " (second of pair)"; }
129  ss << std::endl;
130  ss << " Looking at key "<<amplitude_.begin()->first<< std::endl;
131  ss << " Amplitude of the pulse : " << amplitude_[amplitude_.begin()->first][iapv] << std::endl
132  << " Baseline : " << baseline_[amplitude_.begin()->first][iapv] << std::endl
133  << " Rise time : " << riseTime_[amplitude_.begin()->first][iapv] << std::endl
134  << " Turn-on time : " << turnOn_[amplitude_.begin()->first][iapv] << std::endl
135  << " Peak time : " << peakTime_[amplitude_.begin()->first][iapv] << std::endl
136  << " Undershoot : " << undershoot_[amplitude_.begin()->first][iapv] << std::endl
137  << " Time constant : " << decayTime_[amplitude_.begin()->first][iapv] << std::endl
138  << " Smearing : " << smearing_[amplitude_.begin()->first][iapv] << std::endl
139  << " Chi2 : " << chi2_[amplitude_.begin()->first][iapv] << std::endl;
140  if(deconvMode()) {
141  ss << "Data obtained in deconvolution mode." << std::endl;
142  } else {
143  ss << "Data obtained in peak mode." << std::endl;
144  }
145 
146 }
std::map< std::string, VFloat > smearing_
std::map< std::string, VFloat > undershoot_
std::map< std::string, VFloat > decayTime_
std::map< std::string, VFloat > peakTime_
std::map< std::string, VFloat > chi2_
virtual void header(std::stringstream &) const
std::map< std::string, VFloat > amplitude_
std::map< std::string, VFloat > riseTime_
std::map< std::string, VFloat > turnOn_
std::map< std::string, VFloat > baseline_
void CalibrationScanAnalysis::reset ( )
overridevirtual

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 91 of file CalibrationScanAnalysis.cc.

References amplitude_, baseline_, chi2_, decayTime_, sistrip::invalid_, isha_, crabWrapper::key, peakTime_, riseTime_, smearing_, tail_, tunedAmplitude_, tunedBaseline_, tunedChi2_, tunedDecayTime_, tunedISHA_, tunedPeakTime_, tunedRiseTime_, tunedSmearing_, tunedTail_, tunedTurnOn_, tunedUndershoot_, tunedVFS_, turnOn_, undershoot_, and vfs_.

Referenced by MatrixReader.MatrixReader::__init__(), deconvMode(), and MatrixReader.MatrixReader::showRaw().

91  {
92 
107 
108  for(auto key: amplitude_){
109  amplitude_[key.first] = VFloat(2,sistrip::invalid_);
110  tail_[key.first] = VFloat(2,sistrip::invalid_);
112  turnOn_[key.first] = VFloat(2,sistrip::invalid_);
117  chi2_[key.first] = VFloat(2,sistrip::invalid_);
119  }
120 }
std::map< std::string, VFloat > smearing_
std::map< std::string, VFloat > undershoot_
std::map< std::string, VFloat > decayTime_
std::map< std::string, VFloat > tail_
std::map< std::string, VFloat > peakTime_
std::map< std::string, VFloat > chi2_
std::vector< float > VFloat
std::vector< uint16_t > VInt
std::map< std::string, VFloat > amplitude_
std::map< std::string, VFloat > riseTime_
static const uint16_t invalid_
Definition: Constants.h:16
std::map< std::string, VFloat > turnOn_
std::map< std::string, VFloat > baseline_
const VFloat& CalibrationScanAnalysis::riseTime ( const std::string &  key)
inline
const std::vector<TGraph*>& CalibrationScanAnalysis::riseTimeVsISHA ( )
inline

Definition at line 61 of file CalibrationScanAnalysis.h.

References riseTime_vs_isha_.

Referenced by CalibrationHistograms::save().

61 {return riseTime_vs_isha_;}
std::vector< TGraph * > riseTime_vs_isha_
const std::vector<TGraph2D*>& CalibrationScanAnalysis::riseTimeVsISHAVsVFS ( )
inline

Definition at line 63 of file CalibrationScanAnalysis.h.

References riseTime_vs_isha_vfs_.

Referenced by CalibrationHistograms::save().

63 {return riseTime_vs_isha_vfs_;}
std::vector< TGraph2D * > riseTime_vs_isha_vfs_
const VFloat& CalibrationScanAnalysis::smearing ( const std::string &  key)
inline

Definition at line 43 of file CalibrationScanAnalysis.h.

References crabWrapper::key, and smearing_.

Referenced by CalibrationScanAlgorithm::fillTunedObservables().

43 { return smearing_[key]; }
std::map< std::string, VFloat > smearing_
const VFloat& CalibrationScanAnalysis::tail ( const std::string &  key)
inline

Definition at line 36 of file CalibrationScanAnalysis.h.

References crabWrapper::key, and tail_.

Referenced by CalibrationScanAlgorithm::fillTunedObservables().

36 { return tail_[key]; }
std::map< std::string, VFloat > tail_
const VFloat& CalibrationScanAnalysis::tunedAmplitude ( )
inline
const VFloat& CalibrationScanAnalysis::tunedBaseline ( )
inline
const VFloat& CalibrationScanAnalysis::tunedChi2 ( )
inline
const VFloat& CalibrationScanAnalysis::tunedDecayTime ( )
inline
const VInt& CalibrationScanAnalysis::tunedISHA ( )
inline
const VFloat& CalibrationScanAnalysis::tunedPeakTime ( )
inline
const VFloat& CalibrationScanAnalysis::tunedRiseTime ( )
inline
const VFloat& CalibrationScanAnalysis::tunedSmearing ( )
inline
const VFloat& CalibrationScanAnalysis::tunedTail ( )
inline
const VFloat& CalibrationScanAnalysis::tunedTurnOn ( )
inline

Definition at line 50 of file CalibrationScanAnalysis.h.

References tunedTurnOn_.

Referenced by CalibrationScanSummaryFactory::extract().

const VFloat& CalibrationScanAnalysis::tunedUndershoot ( )
inline
const VInt& CalibrationScanAnalysis::tunedVFS ( )
inline
const VFloat& CalibrationScanAnalysis::turnOn ( const std::string &  key)
inline

Definition at line 39 of file CalibrationScanAnalysis.h.

References crabWrapper::key, and turnOn_.

Referenced by CalibrationScanAlgorithm::fillTunedObservables().

39 { return turnOn_[key]; }
std::map< std::string, VFloat > turnOn_
const VFloat& CalibrationScanAnalysis::undershoot ( const std::string &  key)
inline

Definition at line 41 of file CalibrationScanAnalysis.h.

References crabWrapper::key, and undershoot_.

Referenced by CalibrationScanAlgorithm::fillTunedObservables().

41 { return undershoot_[key]; }
std::map< std::string, VFloat > undershoot_

Friends And Related Function Documentation

friend class CalibrationScanAlgorithm
friend

Definition at line 30 of file CalibrationScanAnalysis.h.

Member Data Documentation

std::map<std::string,VFloat> CalibrationScanAnalysis::amplitude_
private

Parameters extracted from the fit of pulse shape

Definition at line 93 of file CalibrationScanAnalysis.h.

Referenced by addOneCalibrationPoint(), amplitude(), CalibrationScanAlgorithm::analyse(), print(), and reset().

std::map<std::string,VFloat> CalibrationScanAnalysis::baseline_
private
std::map<std::string,VFloat> CalibrationScanAnalysis::chi2_
private
std::map<std::string,VFloat> CalibrationScanAnalysis::decayTime_
private
std::vector<TGraph2D*> CalibrationScanAnalysis::decayTime_vs_isha_vfs_
private
std::vector<TGraph*> CalibrationScanAnalysis::decayTime_vs_vfs_
private

Best isha and vfs values –> one per APV –> interpolate linearly allows a better evaluation compared to the point scanned

Definition at line 108 of file CalibrationScanAnalysis.h.

Referenced by decayTimeVsVFS(), and CalibrationScanAlgorithm::tuneIndependently().

bool CalibrationScanAnalysis::deconv_
private

Definition at line 105 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse(), and deconvMode().

VInt CalibrationScanAnalysis::isha_
private
std::map<std::string,VBool> CalibrationScanAnalysis::isvalid_
private
const float CalibrationScanAnalysis::maxBaselineThreshold_ = 50
static

Definition at line 76 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::maxChi2Threshold_ = 3
static

Definition at line 77 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::maxDecayTimeThreshold_ = 250
static

Definition at line 79 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::maxISHAforVFSTune_ = 110
static
const float CalibrationScanAnalysis::maxPeakTimeThreshold_ = 130
static

Definition at line 81 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::maxRiseTimeThreshold_ = 100
static

Definition at line 83 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::maxTurnOnThreshold_ = 40
static

Definition at line 85 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::minAmplitudeThreshold_ = 50
static

Values for quality cuts

Definition at line 74 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::minBaselineThreshold_ = -50
static

Definition at line 75 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::minDecayTimeThreshold_ = 30
static

Definition at line 78 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::minISHAforVFSTune_ = 30
static
const float CalibrationScanAnalysis::minPeakTimeThreshold_ = 40
static

Definition at line 80 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::minRiseTimeThreshold_ = 10
static

Definition at line 82 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

const float CalibrationScanAnalysis::minTurnOnThreshold_ = 5
static

Definition at line 84 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAlgorithm::analyse().

std::map<std::string,VFloat> CalibrationScanAnalysis::peakTime_
private
std::map<std::string,VFloat> CalibrationScanAnalysis::riseTime_
private
std::vector<TGraph*> CalibrationScanAnalysis::riseTime_vs_isha_
private
std::vector<TGraph2D*> CalibrationScanAnalysis::riseTime_vs_isha_vfs_
private
std::map<std::string,VFloat> CalibrationScanAnalysis::smearing_
private
std::map<std::string,VFloat> CalibrationScanAnalysis::tail_
private
VFloat CalibrationScanAnalysis::tunedAmplitude_
private

properties of pulse shapes closes to the optimal ISHA and VFS values

Definition at line 117 of file CalibrationScanAnalysis.h.

Referenced by CalibrationScanAnalysis(), CalibrationScanAlgorithm::fillTunedObservables(), reset(), and tunedAmplitude().

VFloat CalibrationScanAnalysis::tunedBaseline_
private
VFloat CalibrationScanAnalysis::tunedChi2_
private
VFloat CalibrationScanAnalysis::tunedDecayTime_
private
VInt CalibrationScanAnalysis::tunedISHA_
private
VFloat CalibrationScanAnalysis::tunedPeakTime_
private
VFloat CalibrationScanAnalysis::tunedRiseTime_
private
VFloat CalibrationScanAnalysis::tunedSmearing_
private
VFloat CalibrationScanAnalysis::tunedTail_
private
VFloat CalibrationScanAnalysis::tunedTurnOn_
private
VFloat CalibrationScanAnalysis::tunedUndershoot_
private
VInt CalibrationScanAnalysis::tunedVFS_
private
std::map<std::string,VFloat> CalibrationScanAnalysis::turnOn_
private
std::map<std::string,VFloat> CalibrationScanAnalysis::undershoot_
private
VInt CalibrationScanAnalysis::vfs_
private
const float CalibrationScanAnalysis::VFSrange_ = 20
static