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

Definition at line 29 of file SiStripLorentzAngle.h.

29 {};
SiStripLorentzAngle::~SiStripLorentzAngle ( )
inline

Definition at line 30 of file SiStripLorentzAngle.h.

30 {};

Member Function Documentation

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

Definition at line 14 of file SiStripLorentzAngle.cc.

References m_LA.

Referenced by SiStripDigitizerAlgorithm::accumulateSimHits(), SiStripBackplaneCalibration::derivatives(), shallow::drift(), StripCPE::driftDirection(), ApeEstimator::fillHitVariables(), SiStripLorentzAngleDQM::fillMEsForLayer(), getLorentzAngles(), and DigiSimLinkProducer::produce().

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

Prints LorentzAngles for all detIds.

Definition at line 23 of file SiStripLorentzAngle.cc.

References KineDebug3::count(), and getLorentzAngles().

Referenced by getLorentzAngles().

24 {
25  std::map<unsigned int,float> detid_la = getLorentzAngles();
26  std::map<unsigned int,float>::const_iterator it;
27  size_t count=0;
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  ++count;
33  }
34 }
const std::map< unsigned int, float > & getLorentzAngles() const
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 36 of file SiStripLorentzAngle.cc.

References getLorentzAngles(), and heppy_report::summary.

Referenced by getLorentzAngles().

37 {
38  std::map<unsigned int,float> detid_la = getLorentzAngles();
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 lorentz angles:" << std::endl;
49  summary.print(ss);
50 
51 }
const std::map< unsigned int, float > & getLorentzAngles() const
Definition: value.py:1
Definition: DetId.h:18
void SiStripLorentzAngle::putLorentsAngles ( std::map< unsigned int, float > &  LA)
inline

Definition at line 32 of file SiStripLorentzAngle.h.

References m_LA.

32 {m_LA=LA;}
std::map< unsigned int, float > m_LA
bool SiStripLorentzAngle::putLorentzAngle ( const uint32_t &  detid,
float  value 
)

Definition at line 5 of file SiStripLorentzAngle.cc.

References m_LA, and relativeConstraints::value.

Referenced by SiStripLorentzAngleCalibration::createFromTree(), SiStripLorentzAngleCalibration::endOfJob(), getLorentzAngles(), and SiStripCalibLorentzAngle::getNewObject().

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 << " is already stored. Skippig this put" << std::endl;
9  return false;
10  }
11  else m_LA[detid]=value;
12  return true;
13 }
std::map< unsigned int, float > m_LA
template<class Archive >
void SiStripLorentzAngle::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 46 of file SiStripLorentzAngle.h.

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

Definition at line 46 of file SiStripLorentzAngle.h.

Member Data Documentation

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