20 log << MSG::WARNING <<
"TubeDataFromFile::write: <inconsistent count>" <<
endmsg;
24 unsigned int counter{0};
27 const unsigned int nml =
container->numMultilayers();
28 const unsigned int nl =
container->numLayers();
29 const unsigned int nt =
container->numTubes();
30 const std::string datatype =
container->name();
31 const std::string implementation =
container->implementation();
34 const std::string stnName =
container->idHelperSvc()->stationNameString(
container->identify());
35 os << datatype <<
" " << implementation <<
" " << counter <<
" " <<
container->size() << std::endl;
38 for (
unsigned int km = 1; km <= nml; ++km) {
39 for (
unsigned int kl = 1; kl <= nl; ++kl) {
40 for (
unsigned int kt = 1; kt <= nt; ++kt) {
47 if (std::isnan(
t0) != 0)
t0 = -99999.;
49 constexpr int technology = 0;
50 os <<
" " << stnName <<
" " << stnPhi <<
" " << stnEta
51 <<
" " << technology <<
" " << km <<
" " << kl <<
" " << kt;
55 os <<
" " << 0 <<
" " << 0 <<
" " << 0;
65 <<
" " << stf->
cov[6];
67 os <<
" " << -1 <<
" " << 0 <<
" " << 0 <<
" " << 0 <<
" "
68 << 0 <<
" " << 0 <<
" " << 0 <<
" " << 0 <<
" "
86 log << MSG::WARNING <<
"TubeDataFromFile::write_forDB: <inconsistent count>" <<
endmsg;
91 const unsigned int nml =
container->numMultilayers();
92 const unsigned int nl =
container->numLayers();
93 const unsigned int nt =
container->numTubes();
94 const std::string datatype =
container->name();
95 const std::string implementation =
container->implementation();
98 const std::string stnName =
container->idHelperSvc()->stationNameString(
container->identify());
101 for (
unsigned int km = 1; km <= nml; ++km) {
102 for (
unsigned int kl = 1; kl <= nl; ++kl) {
103 for (
unsigned int kt = 1; kt <= nt; ++kt) {
107 constexpr int technology = 0;
111 double t0{0.}, adcm{0.}, chi2tdc{0.}, t0err{0.},
112 tmax{0.}, tmaxerr{0.}, noise{0.}, noiseerr{0.},
113 slope{0.}, sloperr{0.};
114 int tube_id{0}, runflag{0}, validflag{0};
123 std::stringstream except{};
124 except<<__FILE__<<
":"<<__LINE__<<
"nTubeDataFromFile::write_forDB() - Setting identifier failed!";
125 throw std::runtime_error(except.str());
139 tmaxerr = stf->
cov[5];
141 noiseerr = stf->
cov[0];
143 sloperr = stf->
cov[6];
146 if (std::isnan(
t0) != 0)
t0 = -99999.;
149 <<
","<<lowrun<<
","<<uprun<<
","<<runflag<<
","<<
sc
150 <<validflag<<
","<<stat<<
",";
152 for (
int ii = -2; ii < 35; ii++) {
155 }
else if (ii == 0) {
157 }
else if (ii == 4) {
159 }
else if (ii == 5) {
161 }
else if (ii == 6) {
163 }
else if (ii == 10) {
165 }
else if (ii == 11) {
167 }
else if (ii == 12) {
168 ftube<<noiseerr<<
",";
169 }
else if (ii == 13) {
171 }
else if (ii == 14) {
177 ftube<<
"0,0,algoflag,tubegrpgr"<<std::endl;
char data[hepevt_bytes_allocation_ATLAS]
std::ostream & operator<<(std::ostream &os, const MuonCalib::TubeDataFromFile &data)
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
Holds single-tube full calibration information of one chamber.
Implements fixed identifiers not dependent upon Athena Identifier for internal use in the calibration...
bool setTechnology(int num)
set technology to num in the fixed identifier
bool setStationEta(int num)
set station eta to num in the fixed identifier
bool setMdtTubeLayer(int num)
Mdt specific: set layer to num.
bool setStationPhi(int num)
set station phi to num in the fixed identifier
bool setMdtTube(int num)
Mdt specific: set tube to num.
unsigned int getIdInt() const
MuonFixedId mdtChamberId() const
Mdt specific: convert channel ID into MDT Chamber ID.
bool setMdtMultilayer(int num)
Mdt specific: set multilayer to num.
bool setStationName(int num)
set station name to num in the fixed identifier
static int stationStringToFixedStationNumber(const std::string &station)
Manage the I/O of MdtTubeFitContainer objects.
std::ostream & write(std::ostream &os) const
unsigned int m_regions
total number of regions
std::ostream & write_forDB(std::ostream &ftube, int mdt_head, int lowrun, int uprun) const
IMessageSvc * getMessageSvc(bool quiet=false)
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
float adcCal
quality flag for the SingleTubeCalib constants: 0 all ok, 1 no hits found, 2 too few hits,...
float t0
< relative t0 in chamber (ns)
std::array< float, 8 > par
std::array< float, 36 > cov
int statistics
< number of hits used for the fit