ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_CalibAlgs Namespace Reference

Classes

class  IElementStreamer
class  XmlHeader
class  XmlStreamer

Enumerations

enum  {
  nbins = 6*128 , firstStrip = 0 , lastStrip = nbins-1 , ntimeBins = 3 ,
  firstTimeBin = 0 , lastTimeBin = 2 , n_hitBins = 50 , first_hitBin = 0 ,
  last_hitBin = 50 , n_etaBins = 13 , first_etaBin = -6 , last_etaBin = 6 ,
  n_phiBins = 56 , first_phiBin = 0 , last_phiBin = 55 , n_barrels = 4 ,
  first_barrel = 0 , last_barrel = 3 , n_disks = 9 , first_disk = 0 ,
  last_disk = 8 , n_etaBinsEC = 3 , first_etaBinEC = 0 , last_etaBinEC = 2 ,
  n_phiBinsEC = 52 , first_phiBinEC = 0 , last_phiBinEC = 51
}

Functions

std::string normalizeList (std::string s)
std::string formatPosition (const Identifier &waferId, const SCT_ID *helper, const std::string &delimiter, const bool includeSide)
std::string chipList2LinkList (const std::string &chipList)
unsigned int bec2Index (const int bec)
std::string xmlCloseChannel ()
template<class T>
std::string xmlValue (const std::string &name, const T value)
template<class T>
std::string xmlOpenChannel (const long id, const T since, const T until)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
nbins 
firstStrip 
lastStrip 
ntimeBins 
firstTimeBin 
lastTimeBin 
n_hitBins 
first_hitBin 
last_hitBin 
n_etaBins 
first_etaBin 
last_etaBin 
n_phiBins 
first_phiBin 
last_phiBin 
n_barrels 
first_barrel 
last_barrel 
n_disks 
first_disk 
last_disk 
n_etaBinsEC 
first_etaBinEC 
last_etaBinEC 
n_phiBinsEC 
first_phiBinEC 
last_phiBinEC 

Definition at line 10 of file SCT_CalibNumbers.h.

10 { nbins = 6*128, firstStrip = 0, lastStrip = nbins-1,
12 n_hitBins = 50, first_hitBin = 0, last_hitBin = 50,
13 n_etaBins = 13, first_etaBin = -6, last_etaBin = 6,
14 n_phiBins = 56, first_phiBin = 0, last_phiBin = 55,
16 n_disks = 9, first_disk = 0, last_disk = 8,
19 };

Function Documentation

◆ bec2Index()

unsigned int SCT_CalibAlgs::bec2Index ( const int bec)

Definition at line 60 of file SCT_CalibUtilities.cxx.

60 {
61 return static_cast<unsigned int>((bec/2) + 1);
62}

◆ chipList2LinkList()

std::string SCT_CalibAlgs::chipList2LinkList ( const std::string & chipList)

Definition at line 47 of file SCT_CalibUtilities.cxx.

47 {
48 if (chipList == "0-5 6-11") {
49 return "0 1";
50 } else if (chipList == "0-5") {
51 return "0";
52 } else if (chipList == "6-11") {
53 return "1";
54 } else {
55 return "";
56 }
57}

◆ formatPosition()

std::string SCT_CalibAlgs::formatPosition ( const Identifier & waferId,
const SCT_ID * helper,
const std::string & delimiter,
const bool includeSide )

Definition at line 36 of file SCT_CalibUtilities.cxx.

36 {
37 using std::string;
38 string result{std::to_string(helper->barrel_ec(waferId))+delimiter};
39 result += std::to_string(helper->layer_disk(waferId))+delimiter;
40 result += std::to_string(helper->phi_module(waferId))+delimiter;
41 result += std::to_string(helper->eta_module(waferId));
42 if (includeSide) result += (delimiter+std::to_string(helper->side(waferId)));
43 return result;
44}//function end

◆ normalizeList()

std::string SCT_CalibAlgs::normalizeList ( std::string s)

Definition at line 21 of file SCT_CalibUtilities.cxx.

21 {
22 auto binaryPredicate=[](char s0, char s1){
23 return (s0==' ' and s0==s1);
24 };
25 auto normalised= std::unique(s.begin(), s.end(), binaryPredicate);
26 s.erase(normalised,s.end());
27 size_t first=0;
28 size_t last=s.size()-1;
29 if (s[first] == ' ') first =1;
30 if (s[last] == ' ') last-=1;
31 return s.substr(first,last);
32}
static Double_t s0
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.

◆ xmlCloseChannel()

std::string SCT_CalibAlgs::xmlCloseChannel ( )

Definition at line 65 of file SCT_CalibUtilities.cxx.

65 {
66 return "</channel>";
67}

◆ xmlOpenChannel()

template<class T>
std::string SCT_CalibAlgs::xmlOpenChannel ( const long id,
const T since,
const T until )

Definition at line 36 of file SCT_CalibUtilities.h.

36 {
37 std::string opener=std::string{" <channel id=\""}+std::to_string(id)+"\"";
38 std::string sinceAttr=std::string{" since=\""}+std::to_string(since)+"\"";
39 std::string untilAttr=std::string{" until=\""}+std::to_string(until)+"\"";
40 return opener+sinceAttr+untilAttr+">";
41}

◆ xmlValue()

template<class T>
std::string SCT_CalibAlgs::xmlValue ( const std::string & name,
const T value )

Definition at line 29 of file SCT_CalibUtilities.h.

29 {
30 std::ostringstream os;
31 os << " <value name=\"" << name << "\">" << value << "</value>";
32 return os.str();
33}