CMS 3D CMS Logo

Enumerations | Functions
siStripLACalibration Namespace Reference

Enumerations

enum  { k_DeconvolutionMode = 0, k_PeakMode = 1 }
 

Functions

const std::string apvModeAsString (const SiStripLatency *latency)
 
const std::string fieldAsString (const float &inputField)
 
double fitFunction (double *x, double *par)
 
std::string moduleLocationType (const uint32_t &mod, const TrackerTopology *tTopo)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Function Documentation

◆ apvModeAsString()

const std::string siStripLACalibration::apvModeAsString ( const SiStripLatency latency)
inline

Definition at line 54 of file SiStripLorentzAngleCalibrationHelpers.h.

References k_DeconvolutionMode, k_PeakMode, and config_102169_raw_cff::latency.

Referenced by SiStripLorentzAnglePCLHarvester::beginRun(), and SiStripLorentzAnglePCLMonitor::dqmBeginRun().

54  {
55  if (latency) {
56  switch (latency->singleReadOutMode()) {
57  case k_PeakMode:
58  return "PEAK"; // peak mode
60  return "DECO"; // deco mode
61  default:
62  return "UNDEF"; // undefined
63  }
64  } else {
65  return "UNDEF";
66  }
67  }

◆ fieldAsString()

const std::string siStripLACalibration::fieldAsString ( const float &  inputField)
inline

Definition at line 44 of file SiStripLorentzAngleCalibrationHelpers.h.

References AlCaHLTBitMon_QueryRunRegistry::string, and to_string().

Referenced by SiStripLorentzAnglePCLHarvester::beginRun(), and SiStripLorentzAnglePCLMonitor::dqmBeginRun().

44  {
45  std::string theMagFieldStr = std::to_string(inputField);
46  size_t dotPosition = theMagFieldStr.find('.');
47  if (dotPosition != std::string::npos) {
48  theMagFieldStr = theMagFieldStr.substr(0, dotPosition + 2); // +2 to include one decimal place
49  }
50  return theMagFieldStr;
51  }
static std::string to_string(const XMLCh *ch)

◆ fitFunction()

double siStripLACalibration::fitFunction ( double *  x,
double *  par 
)
inline

Definition at line 70 of file SiStripLorentzAngleCalibrationHelpers.h.

References a, funct::abs(), b, funct::tan(), relativeConstraints::value, and x.

Referenced by DQMGenericTnPClient::calculateEfficiency(), SiStripLorentzAnglePCLHarvester::dqmEndJob(), LASPeakFinder::FindPeakIn(), and TPedValues::makePlots().

70  {
71  double a = par[0];
72  double thetaL = par[1];
73  double b = par[2];
74 
75  double tanThetaL = std::tan(thetaL);
76  double value = a * std::abs(std::tan(x[0]) - tanThetaL) + b;
77 
78  //TF1::RejectPoint(); // Reject points outside the fit range
79  return value;
80  }
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: value.py:1
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
float x

◆ moduleLocationType()

std::string siStripLACalibration::moduleLocationType ( const uint32_t &  mod,
const TrackerTopology tTopo 
)
inline

Definition at line 19 of file SiStripLorentzAngleCalibrationHelpers.h.

References TrackerTopology::layer(), mod(), SiStripDetId::stereo(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripDetId::subDetector(), SiStripDetId::TIB, and SiStripDetId::TOB.

Referenced by SiStripLorentzAnglePCLHarvester::beginRun().

19  {
20  const SiStripDetId detid(mod);
21  std::string subdet = "";
22  unsigned int layer = 0;
23  if (detid.subDetector() == SiStripDetId::TIB) {
24  subdet = "TIB";
25  layer = tTopo->layer(mod);
26  } else if (detid.subDetector() == SiStripDetId::TOB) {
27  subdet = "TOB";
28  layer = tTopo->layer(mod);
29  }
30 
31  if (layer == 0)
32  return subdet;
33 
34  std::string type = (detid.stereo() ? "s" : "a");
35  std::string d_l_t = Form("%s_L%d%s", subdet.c_str(), layer, type.c_str());
36  return d_l_t;
37  }
unsigned int layer(const DetId &id) const
static constexpr auto TOB
Definition: SiStripDetId.h:39
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
static constexpr auto TIB
Definition: SiStripDetId.h:37
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4