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.

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 }

References triggerObjects_cff::id, and m_BPC.

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

◆ 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.

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

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

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

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

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

◆ putBackPlaneCorrection()

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

Definition at line 5 of file SiStripBackPlaneCorrection.cc.

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. Skippig this put" << std::endl;
10  return false;
11  } else
12  m_BPC[detid] = value;
13  return true;
14 }

References m_BPC, and relativeConstraints::value.

◆ putLorentsAngles()

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

Definition at line 32 of file SiStripBackPlaneCorrection.h.

32 { m_BPC = BPC; }

References 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
TrackerTopology::moduleGeometry
SiStripModuleGeometry moduleGeometry(const DetId &id) const
Definition: TrackerTopology.cc:384
SiStripBackPlaneCorrection::m_BPC
std::map< unsigned int, float > m_BPC
Definition: SiStripBackPlaneCorrection.h:44
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
DetId
Definition: DetId.h:17
SiStripBackPlaneCorrection::getBackPlaneCorrections
const std::map< unsigned int, float > & getBackPlaneCorrections() const
Definition: SiStripBackPlaneCorrection.h:33
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
value
Definition: value.py:1
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
relativeConstraints.value
value
Definition: relativeConstraints.py:53
SiStripDetSummary
Definition: SiStripDetSummary.h:28
edm::Log
Definition: MessageLogger.h:70