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::SiStripBackPlaneCorrection ( )
inline

Definition at line 29 of file SiStripBackPlaneCorrection.h.

29 {};

◆ ~SiStripBackPlaneCorrection()

SiStripBackPlaneCorrection::~SiStripBackPlaneCorrection ( )
inline

Definition at line 30 of file SiStripBackPlaneCorrection.h.

30 {};

Member Function Documentation

◆ getBackPlaneCorrection()

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

Definition at line 15 of file SiStripBackPlaneCorrection.cc.

References l1ctLayer2EG_cff::id, and m_BPC.

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

15  {
16  std::map<unsigned int, float>::const_iterator id = m_BPC.find(detid);
17  if (id != m_BPC.end())
18  return id->second;
19  else {
20  edm::LogError("SiStripBackPlaneCorrection")
21  << "SiStripBackPlaneCorrection for DetID " << detid << " is not stored" << std::endl;
22  }
23  return 0;
24 }
std::map< unsigned int, float > m_BPC

◆ getBackPlaneCorrections()

const std::map<unsigned int, float>& SiStripBackPlaneCorrection::getBackPlaneCorrections ( ) const
inline

◆ printDebug()

void SiStripBackPlaneCorrection::printDebug ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const

Prints BackPlaneCorrections for all detIds.

Definition at line 26 of file SiStripBackPlaneCorrection.cc.

References getBackPlaneCorrections(), TrackerTopology::moduleGeometry(), and contentValuesCheck::ss.

26  {
27  std::map<unsigned int, float> detid_la = getBackPlaneCorrections();
28  std::map<unsigned int, float>::const_iterator it;
29  ss << "SiStripBackPlaneCorrectionReader:" << std::endl;
30  ss << "detid \t Geometry \t Back Plane Corrections" << std::endl;
31  for (it = detid_la.begin(); it != detid_la.end(); ++it) {
32  ss << it->first << "\t" << static_cast<int>(trackerTopo->moduleGeometry(it->first)) << "\t" << it->second
33  << std::endl;
34  }
35 }
SiStripModuleGeometry moduleGeometry(const DetId &id) const
const std::map< unsigned int, float > & getBackPlaneCorrections() const

◆ printSummary()

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 37 of file SiStripBackPlaneCorrection.cc.

References getBackPlaneCorrections(), contentValuesCheck::ss, and edmLumisInFiles::summary.

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 }
Definition: value.py:1
Definition: DetId.h:17
const std::map< unsigned int, float > & getBackPlaneCorrections() const

◆ putBackPlaneCorrection()

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

Definition at line 5 of file SiStripBackPlaneCorrection.cc.

References m_BPC, and relativeConstraints::value.

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

◆ putLorentsAngles()

void SiStripBackPlaneCorrection::putLorentsAngles ( std::map< unsigned int, float > &  BPC)
inline

Definition at line 32 of file SiStripBackPlaneCorrection.h.

References m_BPC.

32 { m_BPC = BPC; }
std::map< unsigned int, float > m_BPC

◆ serialize()

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 46 of file SiStripBackPlaneCorrection.h.

◆ cond::serialization::access

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

Definition at line 46 of file SiStripBackPlaneCorrection.h.

Member Data Documentation

◆ m_BPC

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