CMS 3D CMS Logo

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

#include <SiStripBackPlaneCorrection.h>

Public Member Functions

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

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::map< unsigned int, float > m_BPC
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

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 27 of file SiStripBackPlaneCorrection.h.

Constructor & Destructor Documentation

SiStripBackPlaneCorrection::SiStripBackPlaneCorrection ( )
inline

Definition at line 30 of file SiStripBackPlaneCorrection.h.

30 {};
SiStripBackPlaneCorrection::~SiStripBackPlaneCorrection ( )
inline

Definition at line 31 of file SiStripBackPlaneCorrection.h.

31 {};

Member Function Documentation

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

Definition at line 14 of file SiStripBackPlaneCorrection.cc.

References m_BPC.

Referenced by SiStripBackPlaneCorrectionDQM::fillMEsForLayer(), StripCPE::fillParams(), and getBackPlaneCorrections().

14  {
15  std::map<unsigned int,float>::const_iterator id=m_BPC.find(detid);
16  if(id!=m_BPC.end()) return id->second;
17  else {
18  edm::LogError("SiStripBackPlaneCorrection") << "SiStripBackPlaneCorrection for DetID " << detid << " is not stored" << std::endl;
19  }
20  return 0;
21 }
std::map< unsigned int, float > m_BPC
const std::map<unsigned int,float>& SiStripBackPlaneCorrection::getBackPlaneCorrections ( ) const
inline
void SiStripBackPlaneCorrection::printDebug ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const

Prints BackPlaneCorrections for all detIds.

Definition at line 23 of file SiStripBackPlaneCorrection.cc.

References KineDebug3::count(), getBackPlaneCorrections(), and TrackerTopology::moduleGeometry().

Referenced by getBackPlaneCorrections().

24 {
25  std::map<unsigned int,float> detid_la = getBackPlaneCorrections();
26  std::map<unsigned int,float>::const_iterator it;
27  size_t count=0;
28  ss << "SiStripBackPlaneCorrectionReader:" << std::endl;
29  ss << "detid \t Geometry \t Back Plane Corrections" << std::endl;
30  for( it=detid_la.begin(); it!=detid_la.end(); ++it ) {
31  ss << it->first << "\t" << trackerTopo->moduleGeometry(it->first) << "\t" << it->second << std::endl;
32  ++count;
33  }
34 }
SiStripDetId::ModuleGeometry moduleGeometry(const DetId &id) const
const std::map< unsigned int, float > & getBackPlaneCorrections() const
void SiStripBackPlaneCorrection::printSummary ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const

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

Definition at line 36 of file SiStripBackPlaneCorrection.cc.

References getBackPlaneCorrections(), and heppy_report::summary.

Referenced by getBackPlaneCorrections().

37 {
38  std::map<unsigned int,float> detid_la = getBackPlaneCorrections();
39  std::map<unsigned int,float>::const_iterator it;
40 
41  SiStripDetSummary summary{trackerTopo};
42 
43  for( it=detid_la.begin(); it!=detid_la.end(); ++it ) {
44  DetId detid(it->first);
45  float value = it->second;
46  summary.add(detid, value);
47  }
48  ss << "Summary of BackPlane corrections:" << std::endl;
49  summary.print(ss);
50 
51 }
const std::map< unsigned int, float > & getBackPlaneCorrections() const
Definition: value.py:1
Definition: DetId.h:18
bool SiStripBackPlaneCorrection::putBackPlaneCorrection ( const uint32_t &  detid,
float  value 
)

Definition at line 5 of file SiStripBackPlaneCorrection.cc.

References m_BPC, and relativeConstraints::value.

Referenced by SiStripBackplaneCalibration::createFromTree(), SiStripBackplaneCalibration::endOfJob(), and getBackPlaneCorrections().

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

Definition at line 33 of file SiStripBackPlaneCorrection.h.

References m_BPC.

33 {m_BPC=BPC;}
std::map< unsigned int, float > m_BPC
template<class Archive >
void SiStripBackPlaneCorrection::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 47 of file SiStripBackPlaneCorrection.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 47 of file SiStripBackPlaneCorrection.h.

Member Data Documentation

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