|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "GaudiKernel/MsgStream.h"
14 #include "GaudiKernel/Service.h"
15 #include "GaudiKernel/IToolSvc.h"
16 #include "GaudiKernel/TypeNameString.h"
17 #include "GaudiKernel/ThreadLocalContext.h"
42 m_isLaserCalib(false),
68 declareInterface<ITileCalibTool>(
this );
223 for (
int diodei=0; diodei<
NDIODES; diodei++ ) {
224 for (
int diodej=0; diodej<
NDIODES; diodej++ ) {
235 for (
int diode=0; diode<
NDIODES; ++diode ) {
244 for (
int diode=0; diode<
NDIODES+1; ++diode ) {
291 for (
int fiber=0; fiber<
NFIBERS; ++fiber){
293 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
294 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
313 for (
int iSlice=0; iSlice<
NSLICES; ++iSlice ) {
319 for(
int diode=0; diode<
NDIODES; ++diode){
320 for (
int diode_gain=0; diode_gain<
NGAINS; diode_gain++) {
361 return StatusCode::SUCCESS;
367 return StatusCode::SUCCESS;
372 const EventContext& ctx = Gaudi::Hive::currentContext();
375 const char*
text[
NGAINS] = {
"LG DIODE ",
"HG DIODE "};
396 m_las_time =
static_cast<double>(cispar[10])+
static_cast<double>(cispar[11])/1000000;
400 ATH_MSG_ERROR (
"No filter number or diode current: wheel moving or QDC timeout" );
401 return StatusCode::SUCCESS;
416 static std::once_flag
flag;
417 std::call_once(
flag, [&]() {
456 case TileLaserObject::calibType::Pedestal0:
457 if ( laserObj->
isSet(0, 0, TileLaserObject::calibType::Pedestal0) ) {
458 for (
int diode=0; diode<
NDIODES; ++diode ) {
486 case TileLaserObject::calibType::Pedestal1:
489 case TileLaserObject::calibType::Alpha:
490 if ( laserObj->
isSet(0, 0, TileLaserObject::calibType::Alpha) ) {
491 for (
int diode=0; diode<
NDIODES; ++diode ) {
506 case TileLaserObject::calibType::LED:
507 if ( laserObj->
isSet(0, 0, TileLaserObject::calibType::LED) ) {
508 for (
int diode=0; diode<
NDIODES; ++diode ) {
524 ATH_MSG_ERROR (
"Got an invalid calibration type from LaserObject" );
525 return StatusCode::SUCCESS;
533 for (
int diode=0; diode<
NDIODES; ++diode ) {
537 <<
" ( " << laserObj->
isSet(diode,
gain, 0) <<
" ) "
547 for (
int diodei=0; diodei<
NDIODES; diodei++ ) {
548 for (
int diodej=0; diodej<
NDIODES; diodej++ ) {
602 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
603 for (
int pmt2=0; pmt2<
NCOUPLES; ++pmt2){
622 for ( itColl=rawCnt->
begin(); itColl != itCollEnd; ++itColl ) {
629 float ofctime = (*it)->time();
630 if(ofctime!=0.0 and std::abs(ofctime-15.0)<30.)
635 for ( itColl=rawCnt->
begin(); itColl != itCollEnd; ++itColl ) {
648 float amp = (*it)->amplitude();
649 float ofctime = (*it)->time();
650 float ped = (*it)->pedestal();
653 if(ofctime!=0.0) ofctime -= avg_time[
part][
gain]->
Mean();
666 int problem =
int(
ped + 500.)/10000;
702 for(
int diode=0; diode<
NDIODES; ++diode){
703 for (
int diode_gain=0; diode_gain<
NGAINS; diode_gain++ ) {
704 if ( normalization[diode][diode_gain]!=0. ){
733 for(
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
734 for (
int pmt2=0; pmt2<
NCOUPLES; ++pmt2){
740 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
742 if (
chan1==-1)
continue;
744 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
746 if (chan2==-1)
continue;
749 if (Q1Q2[pmt1][pmt2]>0.){
756 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
758 if (
chan1==-1)
continue;
759 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
764 if (Q1Q2[pmt1][pmt2]>0.){
782 chanref = 24 +
chan%2;
797 chanref = 38 -
chan%2;
816 return StatusCode::SUCCESS;
827 for (
int diodei=0; diodei<
NDIODES; diodei++ ) {
828 for (
int diodej=0; diodej<
NDIODES; diodej++ ) {
874 int nCouplesEven=0, nCouplesOdd=0;
882 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
883 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
907 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
908 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
931 if ( nCouplesEven!=0 ){
937 if ( nCouplesOdd!=0 ){
955 for(
int iSlice=0; iSlice<nSlices; ++iSlice){
963 for (
int diode=0; diode<
NDIODES; diode++ ) {
964 for (
int diode_gain=0; diode_gain<
NGAINS; diode_gain++) {
1009 for (
int diodei=0; diodei<
NDIODES; diodei++ ) {
1010 for (
int diodej=0; diodej<
NDIODES; diodej++ ) {
1016 for (
int diode=0; diode<
NDIODES; ++diode ) {
1040 for (
int fiber=0; fiber<
NFIBERS; ++fiber){
1041 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
1042 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
1053 for(
int diode=0; diode<
NDIODES; ++diode){
1054 for (
int diode_gain=0; diode_gain<
NGAINS; diode_gain++) {
1072 return StatusCode::SUCCESS;
1084 TTree *
t =
new TTree(
m_toolNtuple.c_str(),
"TileLaserCalib-Ntuple");
1090 t->Branch(
"MeanTime",
m_meantime,
"meantime[4][2]/F");
1091 t->Branch(
"Time",*
m_time,
"time[4][64][48][2]/F");
1092 t->Branch(
"Sigma_Time",*
m_time_S,
"time_s[4][64][48][2]/F");
1093 t->Branch(
"Signal",*
m_mean,
"signal[4][64][48][2]/F");
1094 t->Branch(
"Sigma_Signal",*
m_mean_S,
"signal_s[4][64][48][2]/F");
1095 t->Branch(
"Raw_Signal",*
m_raw_mean,
"rawsignal[4][64][48][2]/F");
1096 t->Branch(
"Raw_Sigma_Signal",*
m_raw_mean_S,
"rawsignal_s[4][64][48][2]/F");
1097 t->Branch(
"LaserEntries",*
m_entries,
"LASER_entries[4][64][48][2]/I");
1098 t->Branch(
"Kappa",*
m_kappa,
"Kappa[4][64][2][2]/F");
1099 t->Branch(
"Status",*
m_status,
"Status[4][64][48][2]/S");
1100 t->Branch(
"HV",*
m_HV,
"HV[4][64][48]/F");
1101 t->Branch(
"HVSet",*
m_HVSet,
"HVSet[4][64][48]/F");
1128 t->Branch(
"Pmt_Ratio", *
m_pmt_ratios,
"pmt_ratio[4][64][48][2]/F");
1129 t->Branch(
"Sigma_Pmt_Ratio", *
m_pmt_S_ratios,
"pmt_ratio_s[4][64][48][2]/F");
1139 t->Branch(
"Humidity",&
m_hrate,
"humid/F");
1140 t->Branch(
"AirFlow",&
m_flow,
"flow/F");
1143 t->Branch(
"PMT1_Signal",&
m_PMT[0],
"PMT_1/F");
1144 t->Branch(
"PMT2_Signal",&
m_PMT[1],
"PMT_2/F");
1145 t->Branch(
"PMT_Sigma_Signal",
m_PMT_S,
"PMT_s[2]/F");
1146 t->Branch(
"Diode_Signal",
m_diode,
"diode[4]/F");
1147 t->Branch(
"Diode_Sigma_Signal",
m_diode_S,
"diode_s[4]/F");
1149 t->Branch(
"Diode_Sigma_Ped",
m_diode_SPed,
"diode_sPed[4]/F");
1153 t->Branch(
"Ratio",*
m_ratio,
"signal_cor[4][4][64][48][2]/F");
1154 t->Branch(
"Sigma_Ratio",*
m_ratio_S,
"signal_cor_s[4][4][64][48][2]/F");
1155 t->Branch(
"Ratio",*
m_ratio_good,
"signal_cor_good[4][4][64][48][2]/F");
1156 t->Branch(
"Sigma_Ratio",*
m_ratio_good_S,
"signal_cor_good_s[4][4][64][48][2]/F");
1160 t->Branch(
"MeanSlice",*
m_mean_slice,
"MeanSlice[4][64][48][100][2]/F");
1161 t->Branch(
"VarianceSlice",*
m_variance_slice,
"VarianceSlice[4][64][48][100][2]/F");
1166 ATH_MSG_WARNING(
"Impossible to get ITileStuckBitsProbsTool and stuck bits probabilities!");
1175 return StatusCode::SUCCESS;
1181 return StatusCode::SUCCESS;
1186 std::pair<unsigned int, unsigned int> coupleOfPMTs;
1188 int chanLBOdd[
NCOUPLES] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 33, 35, 37, 39, 41, 45, 47};
1189 int chanLBEven[
NCOUPLES] = {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 34, 36, 38, 40, 42, 44, 46};
1191 int chanEBOdd[
NCOUPLES] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 21, 23, 32, 35, 36, 37, 40, -1, -1, -1, -1, -1, -1};
1192 int chanEBEven[
NCOUPLES] = {0, 2, 4, 6, 8, 10, 12, 14, 16, 20, 22, 30, 31, 38, 39, 41, -1, -1, -1, -1, -1, -1};
1195 coupleOfPMTs.first = chanLBEven[couple];
1196 coupleOfPMTs.second = chanLBOdd[couple];
1198 coupleOfPMTs.first = chanEBEven[couple];
1199 coupleOfPMTs.second = chanEBOdd[couple];
1202 return coupleOfPMTs;
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
static const TileCablingService * getInstance()
get pointer to service instance
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
double getPumpDiodeTemp() const
double getAlpha(const unsigned int i, const unsigned int gain=0) const
double getDiodeCurrOrd() const
static int isChEmpty(int partition, int drawer, int ch)
True if channel is not fully implemented.
bool isSet(int chan, int gain, int type) const
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
int getPMADC(const unsigned int j, const unsigned int gain=0) const
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
int getFiltNumber() const
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
double getHumidity() const
Class that holds Data Quality fragment information and provides functions to extract the data quality...
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
double getMean(int chan, int gain, int type) const
::StatusCode StatusCode
StatusCode definition for legacy code.
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
bool getQDCTimeout() const
double getDiodeSigmaPedestal(const unsigned int i, const unsigned int gain=0) const
int NumDataValues() const
HWIdentifier drawer_id(int frag) const
ROS HWIdentifer.
int getDiodeADC(const unsigned int i, const unsigned int gain=0) const
double getPMPedestal(const unsigned int j, const unsigned int gain=0) const
const uint32_t * cispar() const
CIS parameters.
double StandardDeviation() const
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
#define ATH_MSG_WARNING(x)
double getDiodePedestal(const unsigned int i, const unsigned int gain=0) const
double getGasFlux() const
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Handle class for reading from StoreGate.
double getSigmaAlpha(const unsigned int i, const unsigned int gain=0) const
double getSigma(int chan, int gain, int type) const