CMS 3D CMS Logo

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

#include <SiStripLorentzAngle.h>

Public Member Functions

float getLorentzAngle (const uint32_t &) const
 
const std::map< unsigned int, float > & getLorentzAngles () const
 
void printDebug (std::stringstream &ss, const TrackerTopology *trackerTopo) const
 Prints LorentzAngles for all detIds. More...
 
void printSummary (std::stringstream &ss, const TrackerTopology *trackerTopo) const
 Prints the mean value of the LorentzAngle divided by subdetector, layer and mono/stereo. More...
 
void putLorentsAngles (std::map< unsigned int, float > &LA)
 
bool putLorentzAngle (const uint32_t &, float)
 
 SiStripLorentzAngle ()
 
 ~SiStripLorentzAngle ()
 

Private Member Functions

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

Private Attributes

std::map< unsigned int, float > m_LA
 

Friends

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

Detailed Description

Stores the lorentz angle value for all DetIds.
The values are saved internally in a std::map<detid, lorentzAngle>.
It can be filled either by the complete map (putLorentzAngles) or passing a single detIds and lorentzAngles (putLorentzAngle).
In the same way getLorentzAngles returns the complete map, while getLorentzAngle the value corresponding to a given DetId.
The printDebug method prints LorentzAngles for all detIds.
The printSummary mehtod uses the SiStripDetSummary class to produce a summary of LorentzAngle values divided by subdetector and layer/disk.

Definition at line 26 of file SiStripLorentzAngle.h.

Constructor & Destructor Documentation

◆ SiStripLorentzAngle()

SiStripLorentzAngle::SiStripLorentzAngle ( )
inline

Definition at line 28 of file SiStripLorentzAngle.h.

28 {};

◆ ~SiStripLorentzAngle()

SiStripLorentzAngle::~SiStripLorentzAngle ( )
inline

Definition at line 29 of file SiStripLorentzAngle.h.

29 {};

Member Function Documentation

◆ getLorentzAngle()

float SiStripLorentzAngle::getLorentzAngle ( const uint32_t &  detid) const

Definition at line 15 of file SiStripLorentzAngle.cc.

References l1ctLayer2EG_cff::id, and m_LA.

Referenced by SiStripDigitizerAlgorithm::accumulateSimHits(), SiStripLorentzAnglePCLHarvester::beginRun(), SiStripBackplaneCalibration::derivatives(), shallow::drift(), StripCPE::driftDirection(), ApeEstimator::fillHitVariables(), SiStripLorentzAngleDQM::fillMEsForLayer(), and ClusterShapeHitFilter::getDrift().

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

◆ getLorentzAngles()

const std::map<unsigned int, float>& SiStripLorentzAngle::getLorentzAngles ( ) const
inline

◆ printDebug()

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

Prints LorentzAngles for all detIds.

Definition at line 25 of file SiStripLorentzAngle.cc.

References getLorentzAngles(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and contentValuesCheck::ss.

25  {
26  std::map<unsigned int, float> detid_la = getLorentzAngles();
27  std::map<unsigned int, float>::const_iterator it;
28  ss << "SiStripLorentzAngleReader:" << std::endl;
29  ss << "detid \t Lorentz angle" << std::endl;
30  for (it = detid_la.begin(); it != detid_la.end(); ++it) {
31  ss << it->first << "\t" << it->second << std::endl;
32  }
33 }
const std::map< unsigned int, float > & getLorentzAngles() const

◆ printSummary()

void SiStripLorentzAngle::printSummary ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const

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

Definition at line 35 of file SiStripLorentzAngle.cc.

References getLorentzAngles(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, contentValuesCheck::ss, and edmLumisInFiles::summary.

35  {
36  std::map<unsigned int, float> detid_la = getLorentzAngles();
37  std::map<unsigned int, float>::const_iterator it;
38 
39  SiStripDetSummary summary{trackerTopo};
40 
41  for (it = detid_la.begin(); it != detid_la.end(); ++it) {
42  DetId detid(it->first);
43  float value = it->second;
44  summary.add(detid, value);
45  }
46  ss << "Summary of lorentz angles:" << std::endl;
47  summary.print(ss);
48 }
Definition: value.py:1
Definition: DetId.h:17
const std::map< unsigned int, float > & getLorentzAngles() const

◆ putLorentsAngles()

void SiStripLorentzAngle::putLorentsAngles ( std::map< unsigned int, float > &  LA)
inline

Definition at line 31 of file SiStripLorentzAngle.h.

References m_LA.

31 { m_LA = LA; }
std::map< unsigned int, float > m_LA

◆ putLorentzAngle()

bool SiStripLorentzAngle::putLorentzAngle ( const uint32_t &  detid,
float  value 
)

Definition at line 5 of file SiStripLorentzAngle.cc.

References m_LA, and relativeConstraints::value.

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

◆ serialize()

template<class Archive >
void SiStripLorentzAngle::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 45 of file SiStripLorentzAngle.h.

◆ cond::serialization::access

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

Definition at line 45 of file SiStripLorentzAngle.h.

Member Data Documentation

◆ m_LA

std::map<unsigned int, float> SiStripLorentzAngle::m_LA
private