CMS 3D CMS Logo

Public Member Functions | Private Attributes

SiStripBackPlaneCorrection Class Reference

#include <SiStripBackPlaneCorrection.h>

List of all members.

Public Member Functions

float getBackPlaneCorrection (const uint32_t &) const
const std::map< unsigned int,
float > & 
getBackPlaneCorrections () const
void printDebug (std::stringstream &ss) const
 Prints BackPlaneCorrections for all detIds.
void printSummary (std::stringstream &ss) const
 Prints the mean value of the BackPlaneCorrection divided by subdetector, layer and mono/stereo.
bool putBackPlaneCorrection (const uint32_t &, float)
void putLorentsAngles (std::map< unsigned int, float > &BPC)
 SiStripBackPlaneCorrection ()
 ~SiStripBackPlaneCorrection ()

Private Attributes

std::map< unsigned int, float > m_BPC

Detailed Description

Author: Loic Quertenmont. THis class is adapted from SiStripLorentzAngle Stores the lorentz angle value for all DetIds.
The values are saved internally in a std::map<detid, float backPlaneCorrection>.
It can be filled either by the complete map (putBackPlaneCorrections) or passing a single detIds and lorentzAngles (putBackPlaneCorrection).
In the same way getBackPlaneCorrections returns the complete map, while getBackPlaneCorrection the value corresponding to a given DetId.
The printDebug method prints BackPlaneCorrections for all detIds.
The printSummary mehtod uses the SiStripDetSummary class to produce a summary of BackPlaneCorrection values divided by subdetector and layer/disk.

Definition at line 25 of file SiStripBackPlaneCorrection.h.


Constructor & Destructor Documentation

SiStripBackPlaneCorrection::SiStripBackPlaneCorrection ( ) [inline]

Definition at line 28 of file SiStripBackPlaneCorrection.h.

{};
SiStripBackPlaneCorrection::~SiStripBackPlaneCorrection ( ) [inline]

Definition at line 29 of file SiStripBackPlaneCorrection.h.

{};

Member Function Documentation

float SiStripBackPlaneCorrection::getBackPlaneCorrection ( const uint32_t &  detid) const

Definition at line 14 of file SiStripBackPlaneCorrection.cc.

References m_BPC.

Referenced by StripCPE::fillParams().

                                                                                     {
  std::map<unsigned int,float>::const_iterator id=m_BPC.find(detid);
  if(id!=m_BPC.end()) return id->second;
  else {
    edm::LogError("SiStripBackPlaneCorrection") << "SiStripBackPlaneCorrection for DetID " << detid << " is not stored" << std::endl; 
  }
  return 0;
}
const std::map<unsigned int,float>& SiStripBackPlaneCorrection::getBackPlaneCorrections ( ) const [inline]
void SiStripBackPlaneCorrection::printDebug ( std::stringstream &  ss) const

Prints BackPlaneCorrections for all detIds.

Definition at line 23 of file SiStripBackPlaneCorrection.cc.

References prof2calltree::count, getBackPlaneCorrections(), and SiStripDetId::moduleGeometry().

{
  std::map<unsigned int,float> detid_la = getBackPlaneCorrections();
  std::map<unsigned int,float>::const_iterator it;
  size_t count=0;
  ss << "SiStripBackPlaneCorrectionReader:" << std::endl;
  ss << "detid \t Geometry \t Back Plane Corrections" << std::endl;
  for( it=detid_la.begin(); it!=detid_la.end(); ++it ) {
    SiStripDetId SSdetId(it->first);
    unsigned int moduleGeometry = SSdetId.moduleGeometry();
    ss << it->first << "\t" << moduleGeometry << "\t" << it->second << std::endl;
    ++count;
  }
}
void SiStripBackPlaneCorrection::printSummary ( std::stringstream &  ss) const

Prints the mean value of the BackPlaneCorrection divided by subdetector, layer and mono/stereo.

Definition at line 38 of file SiStripBackPlaneCorrection.cc.

References SiStripDetSummary::add(), cond::rpcobgas::detid, getBackPlaneCorrections(), SiStripDetSummary::print(), edmLumisInFiles::summary, and relativeConstraints::value.

{
  std::map<unsigned int,float> detid_la = getBackPlaneCorrections();
  std::map<unsigned int,float>::const_iterator it;

  SiStripDetSummary summary;

  for( it=detid_la.begin(); it!=detid_la.end(); ++it ) {
    DetId detid(it->first);
    float value = it->second;
    summary.add(detid, value);
  }
  ss << "Summary of BackPlane corrections:" << std::endl;
  summary.print(ss);

}
bool SiStripBackPlaneCorrection::putBackPlaneCorrection ( const uint32_t &  detid,
float  value 
)

Definition at line 5 of file SiStripBackPlaneCorrection.cc.

References cond::rpcobgas::detid, m_BPC, and relativeConstraints::value.

Referenced by SiStripBackplaneCalibration::createFromTree(), SiStripBackPlaneCorrectionGenerator::createObject(), and SiStripBackplaneCalibration::endOfJob().

                                                                                         {
  std::map<unsigned int,float>::const_iterator id=m_BPC.find(detid);
  if(id!=m_BPC.end()){
    edm::LogError("SiStripBackPlaneCorrection") << "SiStripBackPlaneCorrection for DetID " << detid << " is already stored. Skippig this put" << std::endl;
    return false;
  }
  else m_BPC[detid]=value;
  return true;
}
void SiStripBackPlaneCorrection::putLorentsAngles ( std::map< unsigned int, float > &  BPC) [inline]

Definition at line 31 of file SiStripBackPlaneCorrection.h.

References m_BPC.

{m_BPC=BPC;}   

Member Data Documentation

std::map<unsigned int,float> SiStripBackPlaneCorrection::m_BPC [private]