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 56 of file SiStripLorentzAngleCalibrationHelpers.h.

References k_DeconvolutionMode, k_PeakMode, and config_102169_raw_cff::latency.

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

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

◆ fieldAsString()

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

Definition at line 46 of file SiStripLorentzAngleCalibrationHelpers.h.

References AlCaHLTBitMon_QueryRunRegistry::string, and to_string().

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

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

◆ fitFunction()

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

Definition at line 72 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().

72  {
73  double a = par[0];
74  double thetaL = par[1];
75  double b = par[2];
76 
77  double tanThetaL = std::tan(thetaL);
78  double value = a * std::abs(std::tan(x[0]) - tanThetaL) + b;
79 
80  //TF1::RejectPoint(); // Reject points outside the fit range
81  return value;
82  }
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  }
27 
28  if (detid.subDetector() == SiStripDetId::TOB) {
29  subdet = "TOB";
30  layer = tTopo->layer(mod);
31  }
32 
33  std::string type = (detid.stereo() ? "s" : "a");
34  std::string d_l_t = Form("%s_L%d%s", subdet.c_str(), layer, type.c_str());
35 
36  if (layer == 0)
37  return subdet;
38  return d_l_t;
39  }
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