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::pair< int, int > locationTypeIndex (const std::string &locType)
 
std::string moduleLocationType (const uint32_t &mod, const TrackerTopology *tTopo)
 Generates a module location type string based on the detector ID and topology information. More...
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Function Documentation

◆ apvModeAsString()

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

◆ fieldAsString()

const std::string siStripLACalibration::fieldAsString ( const float &  inputField)
inline
Examples:
/pool/condor/dir_2615074/jenkins/workspace/cmssw-doxygen/cmsdoxy/TMP/CMSSW_14_1_4_patch1/src/CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleCalibrationHelpers.h.

Definition at line 102 of file SiStripLorentzAngleCalibrationHelpers.h.

References AlCaHLTBitMon_QueryRunRegistry::string, and to_string().

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

102  {
103  std::string theMagFieldStr = std::to_string(inputField);
104  size_t dotPosition = theMagFieldStr.find('.');
105  if (dotPosition != std::string::npos) {
106  theMagFieldStr = theMagFieldStr.substr(0, dotPosition + 2); // +2 to include one decimal place
107  }
108  return theMagFieldStr;
109  }
static std::string to_string(const XMLCh *ch)

◆ fitFunction()

double siStripLACalibration::fitFunction ( double *  x,
double *  par 
)
inline
Examples:
/pool/condor/dir_2615074/jenkins/workspace/cmssw-doxygen/cmsdoxy/TMP/CMSSW_14_1_4_patch1/src/CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleCalibrationHelpers.h.

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

128  {
129  double a = par[0];
130  double thetaL = par[1];
131  double b = par[2];
132 
133  double tanThetaL = std::tan(thetaL);
134  double value = a * std::abs(std::tan(x[0]) - tanThetaL) + b;
135 
136  //TF1::RejectPoint(); // Reject points outside the fit range
137  return value;
138  }
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

◆ locationTypeIndex()

std::pair<int, int> siStripLACalibration::locationTypeIndex ( const std::string &  locType)
inline
Examples:
/pool/condor/dir_2615074/jenkins/workspace/cmssw-doxygen/cmsdoxy/TMP/CMSSW_14_1_4_patch1/src/CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleCalibrationHelpers.h.

Definition at line 72 of file SiStripLorentzAngleCalibrationHelpers.h.

References DMR_cfg::cerr, LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripLorentzAnglePCLHarvester::dqmEndJob().

72  {
73  // Assuming input format is "subdet_LlayerType"
74  // Example: "TIB_L3a"
75 
76  std::string subdet, layerType;
77  int layer;
78 
79  // Parse the input string
80  if (sscanf(locType.c_str(), "%3s_L%d%1[a-zA-Z]", &subdet[0], &layer, &layerType[0]) == 3) {
81  // Process subdet and layerType to compute the values
82  LogTrace("locationTypeIndex") << "subdet " << &subdet[0] << ") layer " << layer << " type " << layerType[0]
83  << std::endl;
84 
85  int firstElement = (layerType[0] == 'a') ? 1 : 2;
86  int secondElement = (std::string(&subdet[0]) == "TIB") ? layer : (layer + 4);
87 
88  return std::make_pair(firstElement, secondElement);
89  } else {
90  // Handle invalid input format
91  // FIXME use MessageLogger
92  std::cerr << "Invalid input format: " << locType << std::endl;
93  return std::make_pair(-1, -1); // Indicates error
94  }
95  }
#define LogTrace(id)

◆ moduleLocationType()

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

Generates a module location type string based on the detector ID and topology information.

Given a module ID and the corresponding TrackerTopology, this function constructs a module location type string in the format "subdet_LlayerType", where subdet is the subdetector name (TIB or TOB), layer is the layer number, and Type is 'a' for axial or 's' for stereo.

Parameters
modThe module ID.
tTopoPointer to the TrackerTopology object providing information about the detector.
Returns
A module location type string.
Examples:
/pool/condor/dir_2615074/jenkins/workspace/cmssw-doxygen/cmsdoxy/TMP/CMSSW_14_1_4_patch1/src/CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleCalibrationHelpers.h.

Definition at line 33 of file SiStripLorentzAngleCalibrationHelpers.h.

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

Referenced by SiStripLorentzAnglePCLHarvester::beginRun().

33  {
34  const SiStripDetId detid(mod);
35  std::string subdet = "";
36  unsigned int layer = 0;
37  if (detid.subDetector() == SiStripDetId::TIB) {
38  subdet = "TIB";
39  layer = tTopo->layer(mod);
40  } else if (detid.subDetector() == SiStripDetId::TOB) {
41  subdet = "TOB";
42  layer = tTopo->layer(mod);
43  }
44 
45  if (layer == 0)
46  return subdet;
47 
48  std::string type = (detid.stereo() ? "s" : "a");
49  std::string d_l_t = Form("%s_L%d%s", subdet.c_str(), layer, type.c_str());
50  return d_l_t;
51  }
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