CMS 3D CMS Logo

Public Member Functions | Private Attributes

SiStripLorentzAngle Class Reference

#include <SiStripLorentzAngle.h>

List of all members.

Public Member Functions

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

Private Attributes

std::map< unsigned int, float > m_LA

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 24 of file SiStripLorentzAngle.h.


Constructor & Destructor Documentation

SiStripLorentzAngle::SiStripLorentzAngle ( ) [inline]

Definition at line 27 of file SiStripLorentzAngle.h.

{};
SiStripLorentzAngle::~SiStripLorentzAngle ( ) [inline]

Definition at line 28 of file SiStripLorentzAngle.h.

{};

Member Function Documentation

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

Definition at line 14 of file SiStripLorentzAngle.cc.

References m_LA.

Referenced by shallow::drift(), and StripCPE::driftDirection().

                                                                              {
  std::map<unsigned int,float>::const_iterator id=m_LA.find(detid);
  if(id!=m_LA.end()) return id->second;
  else {
    edm::LogError("SiStripLorentzAngle") << "SiStripLorentzAngle for DetID " << detid << " is not stored" << std::endl; 
  }
  static float temp = 0.; // added by R.B. 
  return temp;
}
const std::map<unsigned int,float>& SiStripLorentzAngle::getLorentzAngles ( ) const [inline]
void SiStripLorentzAngle::printDebug ( std::stringstream &  ss) const

Prints LorentzAngles for all detIds.

Definition at line 24 of file SiStripLorentzAngle.cc.

References prof2calltree::count, and getLorentzAngles().

{
  std::map<unsigned int,float> detid_la = getLorentzAngles();
  std::map<unsigned int,float>::const_iterator it;
  size_t count=0;
  ss << "SiStripLorentzAngleReader:" << std::endl;
  ss << "detid \t Lorentz angle" << std::endl;
  for( it=detid_la.begin(); it!=detid_la.end(); ++it ) {
    ss << it->first << "\t" << it->second << std::endl;
    ++count;
  }
}
void SiStripLorentzAngle::printSummary ( std::stringstream &  ss) const

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

Definition at line 37 of file SiStripLorentzAngle.cc.

References SiStripDetSummary::add(), cond::rpcobgas::detid, getLorentzAngles(), SiStripDetSummary::print(), summarizeEdmComparisonLogfiles::summary, and relativeConstraints::value.

{
  std::map<unsigned int,float> detid_la = getLorentzAngles();
  std::map<unsigned int,float>::const_iterator it;

  SiStripDetSummary summary;

  for( it=detid_la.begin(); it!=detid_la.end(); ++it ) {
    DetId detid(it->first);
    float value = it->second;
    summary.add(detid, value);
  }
  ss << "Summary of lorentz angles:" << std::endl;
  summary.print(ss);

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

Definition at line 30 of file SiStripLorentzAngle.h.

References m_LA.

{m_LA=LA;}   
bool SiStripLorentzAngle::putLorentzAngle ( const uint32_t &  detid,
float &  value 
)

Definition at line 5 of file SiStripLorentzAngle.cc.

References cond::rpcobgas::detid, m_LA, and relativeConstraints::value.

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

                                                                            {
  std::map<unsigned int,float>::const_iterator id=m_LA.find(detid);
  if(id!=m_LA.end()){
    edm::LogError("SiStripLorentzAngle") << "SiStripLorentzAngle for DetID " << detid << " is already stored. Skippig this put" << std::endl;
    return false;
  }
  else m_LA[detid]=value;
  return true;
}

Member Data Documentation

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