 |
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;
417 static std::once_flag
flag;
418 std::call_once(
flag, [&]() {
457 case TileLaserObject::calibType::Pedestal0:
458 if ( laserObj->
isSet(0, 0, TileLaserObject::calibType::Pedestal0) ) {
459 for (
int diode=0; diode<
NDIODES; ++diode ) {
487 case TileLaserObject::calibType::Pedestal1:
490 case TileLaserObject::calibType::Alpha:
491 if ( laserObj->
isSet(0, 0, TileLaserObject::calibType::Alpha) ) {
492 for (
int diode=0; diode<
NDIODES; ++diode ) {
507 case TileLaserObject::calibType::LED:
508 if ( laserObj->
isSet(0, 0, TileLaserObject::calibType::LED) ) {
509 for (
int diode=0; diode<
NDIODES; ++diode ) {
525 ATH_MSG_ERROR (
"Got an invalid calibration type from LaserObject" );
526 return StatusCode::SUCCESS;
534 for (
int diode=0; diode<
NDIODES; ++diode ) {
538 <<
" ( " << laserObj->
isSet(diode,
gain, 0) <<
" ) "
548 for (
int diodei=0; diodei<
NDIODES; diodei++ ) {
549 for (
int diodej=0; diodej<
NDIODES; diodej++ ) {
603 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
604 for (
int pmt2=0; pmt2<
NCOUPLES; ++pmt2){
623 for ( itColl=rawCnt->
begin(); itColl != itCollEnd; ++itColl ) {
630 float ofctime = (*it)->time();
631 if(ofctime!=0.0 and std::abs(ofctime-15.0)<30.)
636 for ( itColl=rawCnt->
begin(); itColl != itCollEnd; ++itColl ) {
649 float amp = (*it)->amplitude();
650 float ofctime = (*it)->time();
651 float ped = (*it)->pedestal();
654 if(ofctime!=0.0) ofctime -= avg_time[
part][
gain]->
Mean();
667 int problem =
int(
ped + 500.)/10000;
703 for(
int diode=0; diode<
NDIODES; ++diode){
704 for (
int diode_gain=0; diode_gain<
NGAINS; diode_gain++ ) {
705 if ( normalization[diode][diode_gain]!=0. ){
734 for(
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
735 for (
int pmt2=0; pmt2<
NCOUPLES; ++pmt2){
741 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
743 if (
chan1==-1)
continue;
745 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
747 if (chan2==-1)
continue;
750 if (Q1Q2[pmt1][pmt2]>0.){
757 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
759 if (
chan1==-1)
continue;
760 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
765 if (Q1Q2[pmt1][pmt2]>0.){
783 chanref = 24 +
chan%2;
798 chanref = 38 -
chan%2;
817 return StatusCode::SUCCESS;
828 for (
int diodei=0; diodei<
NDIODES; diodei++ ) {
829 for (
int diodej=0; diodej<
NDIODES; diodej++ ) {
875 int nCouplesEven=0, nCouplesOdd=0;
883 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
884 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
908 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
909 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
932 if ( nCouplesEven!=0 ){
938 if ( nCouplesOdd!=0 ){
956 for(
int iSlice=0; iSlice<nSlices; ++iSlice){
964 for (
int diode=0; diode<
NDIODES; diode++ ) {
965 for (
int diode_gain=0; diode_gain<
NGAINS; diode_gain++) {
1010 for (
int diodei=0; diodei<
NDIODES; diodei++ ) {
1011 for (
int diodej=0; diodej<
NDIODES; diodej++ ) {
1017 for (
int diode=0; diode<
NDIODES; ++diode ) {
1041 for (
int fiber=0; fiber<
NFIBERS; ++fiber){
1042 for (
int pmt1=0; pmt1<
NCOUPLES-1; ++pmt1){
1043 for (
int pmt2=pmt1+1; pmt2<
NCOUPLES; ++pmt2){
1054 for(
int diode=0; diode<
NDIODES; ++diode){
1055 for (
int diode_gain=0; diode_gain<
NGAINS; diode_gain++) {
1073 return StatusCode::SUCCESS;
1085 TTree *
t =
new TTree(
m_toolNtuple.c_str(),
"TileLaserCalib-Ntuple");
1091 t->Branch(
"MeanTime",
m_meantime,
"meantime[4][2]/F");
1092 t->Branch(
"Time",*
m_time,
"time[4][64][48][2]/F");
1093 t->Branch(
"Sigma_Time",*
m_time_S,
"time_s[4][64][48][2]/F");
1094 t->Branch(
"Signal",*
m_mean,
"signal[4][64][48][2]/F");
1095 t->Branch(
"Sigma_Signal",*
m_mean_S,
"signal_s[4][64][48][2]/F");
1096 t->Branch(
"Raw_Signal",*
m_raw_mean,
"rawsignal[4][64][48][2]/F");
1097 t->Branch(
"Raw_Sigma_Signal",*
m_raw_mean_S,
"rawsignal_s[4][64][48][2]/F");
1098 t->Branch(
"LaserEntries",*
m_entries,
"LASER_entries[4][64][48][2]/I");
1099 t->Branch(
"Kappa",*
m_kappa,
"Kappa[4][64][2][2]/F");
1100 t->Branch(
"Status",*
m_status,
"Status[4][64][48][2]/S");
1101 t->Branch(
"HV",*
m_HV,
"HV[4][64][48]/F");
1102 t->Branch(
"HVSet",*
m_HVSet,
"HVSet[4][64][48]/F");
1129 t->Branch(
"Pmt_Ratio", *
m_pmt_ratios,
"pmt_ratio[4][64][48][2]/F");
1130 t->Branch(
"Sigma_Pmt_Ratio", *
m_pmt_S_ratios,
"pmt_ratio_s[4][64][48][2]/F");
1140 t->Branch(
"Humidity",&
m_hrate,
"humid/F");
1141 t->Branch(
"AirFlow",&
m_flow,
"flow/F");
1144 t->Branch(
"PMT1_Signal",&
m_PMT[0],
"PMT_1/F");
1145 t->Branch(
"PMT2_Signal",&
m_PMT[1],
"PMT_2/F");
1146 t->Branch(
"PMT_Sigma_Signal",
m_PMT_S,
"PMT_s[2]/F");
1147 t->Branch(
"Diode_Signal",
m_diode,
"diode[4]/F");
1148 t->Branch(
"Diode_Sigma_Signal",
m_diode_S,
"diode_s[4]/F");
1150 t->Branch(
"Diode_Sigma_Ped",
m_diode_SPed,
"diode_sPed[4]/F");
1154 t->Branch(
"Ratio",*
m_ratio,
"signal_cor[4][4][64][48][2]/F");
1155 t->Branch(
"Sigma_Ratio",*
m_ratio_S,
"signal_cor_s[4][4][64][48][2]/F");
1156 t->Branch(
"Ratio",*
m_ratio_good,
"signal_cor_good[4][4][64][48][2]/F");
1157 t->Branch(
"Sigma_Ratio",*
m_ratio_good_S,
"signal_cor_good_s[4][4][64][48][2]/F");
1161 t->Branch(
"MeanSlice",*
m_mean_slice,
"MeanSlice[4][64][48][100][2]/F");
1162 t->Branch(
"VarianceSlice",*
m_variance_slice,
"VarianceSlice[4][64][48][100][2]/F");
1167 ATH_MSG_WARNING(
"Impossible to get ITileStuckBitsProbsTool and stuck bits probabilities!");
1176 return StatusCode::SUCCESS;
1182 return StatusCode::SUCCESS;
1187 std::pair<unsigned int, unsigned int> coupleOfPMTs;
1189 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};
1190 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};
1192 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};
1193 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};
1196 coupleOfPMTs.first = chanLBEven[couple];
1197 coupleOfPMTs.second = chanLBOdd[couple];
1199 coupleOfPMTs.first = chanEBEven[couple];
1200 coupleOfPMTs.second = chanEBOdd[couple];
1203 return coupleOfPMTs;
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
static const TileCablingService * getInstance()
get pointer to service instance
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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