ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonCalib::CscCalcSlope Class Reference

does calibration of the CSC chambers More...

#include <CscCalcSlope.h>

Inheritance diagram for MuonCalib::CscCalcSlope:
Collaboration diagram for MuonCalib::CscCalcSlope:

Public Member Functions

 CscCalcSlope (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~CscCalcSlope ()=default
 
StatusCode initialize (void)
 basic required functions More...
 
StatusCode execute (void)
 
StatusCode finalize (void)
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode collectEventInfo ()
 event loop functions More...
 
StatusCode calculateParameters ()
 Finalize functions. More...
 
StatusCode writeCalibrationFile ()
 
StatusCode storeGateRecord ()
 
StatusCode makeCalibPoints ()
 Utility functions. More...
 
double calShape (double *x, double *par)
 
StatusCode calOutput0 ()
 
StatusCode calOutput3 ()
 
void outputParameter3 (const CscCalibResultCollection &results, std::ofstream &out)
 
StatusCode fillBitHist (TH1I *bitHist, const uint16_t &val)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ToolHandle< ICscCalibToolm_cscCalibTool {this, "CscCalibTool", "CscCalibTool"}
 Services and tools. More...
 
ToolHandle< Muon::ICSC_RDO_Decoderm_cscRdoDecoderTool {this,"CscRDODecoder","Muon::CscRDO_Decoder"}
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
SmartIF< IChronoStatSvc > m_chronoSvc
 
SG::ReadCondHandleKey< CscCondDbDatam_readKey {this, "ReadKey", "CscCondDbData", "Key of CscCondDbData"}
 
std::string m_outputFileName
 Parameters input through joboptions. More...
 
std::string m_calOutputVersion
 
double m_minDeltaAdc
 
bool m_dumpAllHists
 
bool m_ignoreDatabaseError
 
bool m_doBitHists
 
std::string m_titlePrefix
 
std::string m_titlePostfix
 
unsigned int m_maxStripHash
 Internally global variables. More...
 
int m_lastPulserLevel
 
DataVector< DataVector< TProfile > > * m_fracProfs
 
DataVector< DataVector< TGraph > > * m_fracGraphs
 
DataVector< TH1I > * m_bitHists
 
std::vector< float > * m_fitReturns
 
TGraph * m_resGraph
 
DataVector< TGraphErrors > * m_calGraphs
 
TProfile * m_currentAmpProf
 
std::map< int, TProfile * > * m_ampProfs
 
std::set< int > * m_pulsedChambers
 
int m_eventCnt
 coherent correction array has the corrections to the coherently pulsed channels to get the basic channels More...
 
CscCalibResultCollectionm_slopes
 
CscCalibResultCollectionm_intercepts
 
BipolarFit m_bipolarFit
 
bool m_doBipolarFit
 
double * m_crossTalkFix
 
bool m_doCrossTalkFix
 
std::vector< float > m_dbLevels
 
float * m_peds
 
float * m_noises
 
bool m_pedFile
 
std::string m_pedFileName
 
int m_expectedChamberLayer
 
std::string m_calFitFunc
 
bool m_findPeakTime
 
TProfile * m_peakTimeProf
 
CscCalibResultCollectionm_peakTimes
 
bool m_doLinPlot
 
std::string m_cmd_parameters
 
unsigned int m_numBits
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

does calibration of the CSC chambers

Author
lampe.nosp@m.n@ph.nosp@m.ysics.nosp@m..ari.nosp@m.zona..nosp@m.edu

Description

CscCalcSlope is an algorithm that cycles through calibration events and generates the calibration constants. A root file is also generated where the user can view the validity of the constants.

Definition at line 51 of file CscCalcSlope.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CscCalcSlope()

MuonCalib::CscCalcSlope::CscCalcSlope ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 30 of file CscCalcSlope.cxx.

30  :
31  AthAlgorithm(name,pSvcLocator),
32  m_outputFileName("output.cal"),
33  m_dumpAllHists(false),
34  m_maxStripHash(0),
35  m_lastPulserLevel(-999),
36  m_fracProfs(nullptr),
37  m_fracGraphs(nullptr),
38  m_bitHists(nullptr),
39  m_fitReturns(nullptr),
40  m_resGraph(nullptr),
41  m_calGraphs(nullptr),
42  m_currentAmpProf(nullptr),
43  m_ampProfs(nullptr),
44  m_pulsedChambers(nullptr),
45  m_eventCnt(0),
46  m_slopes(nullptr),
47  m_intercepts(nullptr),
48  m_peds(nullptr),
49  m_noises(nullptr),
50  m_peakTimeProf(nullptr),
51  m_peakTimes(nullptr),
52  m_numBits(12)
53  {
54  declareProperty("OutputFile", m_outputFileName = "");
55  declareProperty("IgnoreDatabaseError",m_ignoreDatabaseError = false); //Set to true to ignore database errors
56  declareProperty("TitlePrefix",m_titlePrefix = ""); //Prefix appended to title of histograms and graphs
57  declareProperty("TitlePostfix",m_titlePostfix = ""); //Postfix appended to title of histograms and graphs
58 
59  //test parameters
60  declareProperty("DoBipolarFit", m_doBipolarFit = true);
61  declareProperty("DoCrossTalkFix",m_doCrossTalkFix = true);
62 
63  declareProperty("GetPedFromFile",m_pedFile = false);
64  declareProperty("PedFileName",m_pedFileName = "");
65 
66  declareProperty("ExpectedChamberLayer", m_expectedChamberLayer = 2);
67 
68  declareProperty("DoLinPlot" , m_doLinPlot = false);
69  declareProperty("CalibFitFunction" , m_calFitFunc = "[0] + [1]*10^(x/-20)");
70  declareProperty("MinDeltaAdc",m_minDeltaAdc = 10, "Minimum change in ADC a calgraph needs to drop for a fit lower bound to be set");
71 
72  /*
73  ADC = mC(db) = m*C_max*10^(db/20) + intercept // C_max = maximum charge
74 
75  we divide by c_max later to get m (the function as in m_calFitFunc has
76  [1] = max ADC, so we divide max charge to get
77 
78  since attenuation is negative
79 
80  db = -20 log(ADC+intercept/mC_max)
81 
82  db = -20 log(ADC - intercept / mC_max)
83 
84  (-20 since V^2 gives power disipation)
85 
86  */
87 
88  declareProperty("FindPeakTime", m_findPeakTime = true);
89  declareProperty("DoBitHists", m_doBitHists = true);
90 
91  declareProperty("CalOutputVersion", m_calOutputVersion="03-00");
92 
93  m_crossTalkFix = new double[24];
94  m_crossTalkFix[0] = 1.0322840930;
95  m_crossTalkFix[1] = 1.0422690324;
96  m_crossTalkFix[2] = 1.0235384586;
97  m_crossTalkFix[3] = 1.0183445962;
98  m_crossTalkFix[4] = 1.0151409212;
99  m_crossTalkFix[5] = 1.0152511102;
100  m_crossTalkFix[6] = 1.0103618910;
101  m_crossTalkFix[7] = 1.0113985580;
102  m_crossTalkFix[8] = 1.0040464232;
103  m_crossTalkFix[9] = 1.0049431193;
104  m_crossTalkFix[10] = 0.9997829589;
105  m_crossTalkFix[11] = 1.0003994005;
106  m_crossTalkFix[12] = 0.9826108255;
107  m_crossTalkFix[13] = 0.9850002836;
108  m_crossTalkFix[14] = 0.9831852065;
109  m_crossTalkFix[15] = 0.9826508145;
110  m_crossTalkFix[16] = 0.9804885017;
111  m_crossTalkFix[17] = 0.9811262196;
112  m_crossTalkFix[18] = 0.9784119832;
113  m_crossTalkFix[19] = 0.9777689757;
114  m_crossTalkFix[20] = 0.9704773978;
115  m_crossTalkFix[21] = 0.9738781078;
116  m_crossTalkFix[22] = 0.9710430303;
117  m_crossTalkFix[23] = 0.9743144079;
118  }

◆ ~CscCalcSlope()

MuonCalib::CscCalcSlope::~CscCalcSlope ( )
default

Member Function Documentation

◆ calculateParameters()

StatusCode MuonCalib::CscCalcSlope::calculateParameters ( )
private

Finalize functions.

Definition at line 525 of file CscCalcSlope.cxx.

526  {
527  Chrono chrono(m_chronoSvc,"calculateParameters");
528  StatusCode sc;
529  ATH_MSG_INFO("Calculating calibration constants.");
530 
531  if(!m_ampProfs){
532  ATH_MSG_FATAL("m_ampProfs empty!");
533  return StatusCode::FAILURE;
534  }
535  unsigned int numCalibPoints = m_ampProfs->size();
536  ATH_MSG_INFO("There are " << numCalibPoints << " pulser levels to evaluate.");
537 
538  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
539 
540  float chargeMax = 530.88; //in fC
541 
542  int crossTalkCnt = 0;
543 
544  for(unsigned int stripHash = 0 ;stripHash <= m_maxStripHash; stripHash++)
545  {
546 
547  if(true)//stripHash < 50 || stripHash%1000 == 0)
548  {
549  ATH_MSG_INFO("Analyzing strip with hash " << stripHash << " out of " << m_maxStripHash);
550  }
551 
552  //**Now tackle slope calculation
553 
554 
555  Identifier id;
556  m_idHelperSvc->cscIdHelper().get_id((IdentifierHash)stripHash,id,&channelContext);
557  int chamberLayer = m_idHelperSvc->cscIdHelper().chamberLayer(id);
558  char orientation = (m_idHelperSvc->cscIdHelper().measuresPhi(id) ? 'Y':'X');
559 
560  int wireLayer = m_idHelperSvc->cscIdHelper().wireLayer(id);
561 
562 
563  int stationName = m_idHelperSvc->cscIdHelper().stationName(id);
564  int stationPhi = m_idHelperSvc->cscIdHelper().stationPhi(id);
565  int stationEta = m_idHelperSvc->cscIdHelper().stationEta(id);
566  int stripNumber = m_idHelperSvc->cscIdHelper().strip(id);
567 
568  IdentifierHash chamHash;
569  m_idHelperSvc->cscIdHelper().get_module_hash(id,chamHash);
570 
571  if(chamberLayer != m_expectedChamberLayer)
572  continue;
573 
574  if(m_findPeakTime)
575  {
576  if(m_peakTimeProf->GetBinEntries(stripHash+1)) //See if any peaking times were recorded for strip
577  {
578  float peakt = m_peakTimeProf->GetBinContent(stripHash+1);
579  float peaktError = m_peakTimeProf->GetBinError(stripHash+1);
580  CscCalibResult * peaktResult = new CscCalibResult(stripHash,peakt, peaktError);
581  m_peakTimes->push_back(peaktResult);
582  }
583  }//end if(m_findPeakTime)
584 
585  //Don't find slope for this strip if it is a transverse strip
586  if(orientation != 'X')
587  continue;
588 
589  //For removing plateau's from fit
590  bool foundMin(false);
591  double fitMinX = 0;
592  double fitMaxX = 0;
593  double lastVal = -1;
594  double lastDrop=0;
595  double thisDrop=0;
596 
597 
598  TGraphErrors * calGraph = new TGraphErrors(numCalibPoints); //calGraph will be what the gain will be found on
599  char calName[20],titleSeed[500];
600  sprintf(calName, "calGraph%u",stripHash);
601  sprintf(titleSeed, "Calgraph for eta %d, sector %d, layer %d%c, strip %d",stationEta,(2*stationPhi+50 - stationName),wireLayer,orientation, stripNumber);
602  calGraph->SetName(calName);
603  std::string title = m_titlePrefix + titleSeed + m_titlePostfix;
604  calGraph->SetTitle(title.c_str());
605  calGraph->GetYaxis()->SetTitle("ADC counts");
606  calGraph->GetXaxis()->SetTitle("Attenuation (-db)");
607 
608  ATH_MSG_DEBUG(" Generating " << title);
609 
610  bool isGoodStrip = false;
611 
612  //Loop over all attenuation levels, filling the calGraph with the amplitudes
613  //for this strip
614  ATH_MSG_DEBUG("Number of ampProfs " << m_ampProfs->size());
615  int calPointItr = 0;
616  for(const auto & [pulserLevel, pAmplitudeProfile] : *m_ampProfs)
617  {
618  if(!pAmplitudeProfile){
619  ATH_MSG_FATAL("Failed at accessing ampProf!");
620  return StatusCode::FAILURE;
621  }
622  ATH_MSG_DEBUG("\tLooking for data for pulser level "
623  << pulserLevel);
624 
625  if(pAmplitudeProfile->GetBinEntries(stripHash+1))
626  {
627 
628  ATH_MSG_VERBOSE("\nHave data for strip " << stripHash);
629 
630  isGoodStrip = true;
631 
632 
633  float adcValue = pAmplitudeProfile->GetBinContent(stripHash+1);
634  float adcError = pAmplitudeProfile->GetBinError(stripHash+1);
635  if(m_doCrossTalkFix)
636  {
637  ATH_MSG_VERBOSE("\tCrosstalk fix " << m_crossTalkFix[crossTalkCnt]);
638  adcValue /= m_crossTalkFix[crossTalkCnt];
639  adcError /= m_crossTalkFix[crossTalkCnt];
640  }
641  if(adcError != adcError)
642  adcError = 0.01;
643 
644  float db = m_dbLevels[pulserLevel];
645 
646 
647  float attenValue =0;
648  if(m_doLinPlot)
649  attenValue = 300*std::pow(10,db/20);
650  else
651  attenValue = db;
652 
653  ATH_MSG_DEBUG("\tStoring at db of " << db << " with attenValue " << attenValue << " from pulser level of " << pulserLevel << " and adcValue " << adcValue);
654 
655 
656 
657  //See if the last two drops were far down enough
658  if(!foundMin){
659  thisDrop = lastVal - adcValue;
660  ATH_MSG_DEBUG("\tFinding fit min:"
661  << "\tlastVal = " << lastVal
662  << ";lastDrop " << lastDrop << "; thisDrop " << thisDrop);
663  if(thisDrop > m_minDeltaAdc && lastDrop > m_minDeltaAdc){
664  ATH_MSG_DEBUG("Found fitMin!");
665  foundMin = true;
666  fitMinX = attenValue;
667  }
668  else{
669  //Not enough deltaADC, store this iterations values for the next loop
670  lastDrop = thisDrop;
671  lastVal = adcValue;
672  }
673  }
674 
675  //Use highest attenuation level as fitMaxX
676  if(attenValue > fitMaxX)
677  fitMaxX = attenValue;
678 
679  calGraph->SetPoint(calPointItr,attenValue,adcValue);
680  calGraph->SetPointError(calPointItr,0.01,adcError);
681  calPointItr++;
682  }//done if(entries >0)
683 
684  }//Done ampProfItr loop
685 
686  if(!foundMin && isGoodStrip){
687  ATH_MSG_WARNING("Failed to find minium for " << title);
688  }
689 
690  //***Do a simple fit to calGraph***
691  //Here we only fit the linear part of the plot. m_fitCutoff can be set by user.
692  if(isGoodStrip)
693  {
694  ATH_MSG_INFO("we have a good stripHash at " << stripHash);
695 
696  m_pulsedChambers->insert(chamHash); //Programer note: Only gets filled on x-axis. Probably OK.
697 
698  float slope, slopeError, intercept, interceptError, chiSquared;
699  int ndf;
700  int fitRet=0;
701 
702  //Setup our gain fit function
703  TF1 myFunc("myFunction", m_calFitFunc.c_str(), fitMinX, fitMaxX);
704  myFunc.SetLineColor(kRed);
705  if(m_doLinPlot)
706  {
707  myFunc.SetParameters(0,5);
708  slope = myFunc.GetParameter(1);
709  slopeError = myFunc.GetParError(1);
710  intercept = myFunc.GetParameter(0);
711  interceptError = myFunc.GetParError(0);
712  chiSquared = myFunc.GetChisquare();
713  ndf = myFunc.GetNDF();
714  }
715  else
716  {
717  myFunc.SetParameters(0.1,2000);
718 
719  fitRet = calGraph->Fit(&myFunc,"RV");
720 
721  slope = myFunc.GetParameter(1)/chargeMax;
722  slopeError = myFunc.GetParError(1);
723  intercept = myFunc.GetParameter(0);
724  interceptError = myFunc.GetParError(0);
725  chiSquared = myFunc.GetChisquare();
726  ndf = myFunc.GetNDF();
727  }
728 
729  float invertedSlope;
730  if(std::abs(slope) < 0.00001 || slope == -999) //watch out for slope==0
731  {
732  ATH_MSG_WARNING("Slope invalid ");
733  continue;
734  }
735 
736  invertedSlope = 1/slope;
737 
738  ATH_MSG_ERROR("Inserting calgraph in for hash " << stripHash);
739  (*m_calGraphs)[stripHash] = calGraph;
740 
741  ATH_MSG_DEBUG("StripHash: " << stripHash << "; slope: " <<slope
742  << "; intercept: " << intercept
743  << "; chi^2/ndf: " << chiSquared << "/" << ndf);
744  CscCalibResult * slopeResult = new CscCalibResult(stripHash,invertedSlope,slopeError,chiSquared,ndf);
745  CscCalibResult * interceptResult = new CscCalibResult(stripHash, intercept, interceptError, chiSquared, ndf);
746 
747  m_slopes->push_back(slopeResult);
748  m_intercepts->push_back(interceptResult);
749  (*m_fitReturns)[stripHash] = fitRet;
750 
751  }//end if(isGoodStrip)
752 
753 
754  if(crossTalkCnt == 23)
755  crossTalkCnt = 0;
756  else
757  crossTalkCnt++;
758  ATH_MSG_DEBUG("Looping over next strip...");
759  }//end loop over strips
760  ATH_MSG_INFO("Completed calculating parameters for each strip");
761  return StatusCode::SUCCESS;
762  }//End calculateParameters()

◆ calOutput0()

StatusCode MuonCalib::CscCalcSlope::calOutput0 ( )
private

Definition at line 782 of file CscCalcSlope.cxx.

782  {
783  //***Take conditions data held in summary histograms and print to the calibration file***//
784  ATH_MSG_INFO("Parameters calculated, preparing to outputing to file: " << m_outputFileName);
785  std::ofstream out;
786  out.open(m_outputFileName.c_str());
787  if(!out.is_open())
788  {
789  ATH_MSG_FATAL("Can't open file " << m_outputFileName.c_str() << "for writing");
790  return StatusCode::FAILURE;
791  }
792  //Start by writing file version number (mainly for COOL program to read)
793  out << "00-00 ";
794  //Number of strips we have info for:
795  out << m_slopes->size() << " ";
796  //print out header
797  out << "pslope ";
798  if(m_findPeakTime) out << "peakt ";
799  out << "END_HEADER\n";
800  //Now we loop over each strip's parameters and print them out
801  ATH_MSG_DEBUG("Begining loop over all " << m_maxStripHash << " hash ids.");
802 
803  //form is:
804  //hashID chamber LayerOrientationStrip parametervalue parametervalue
809  if(m_findPeakTime)
810  {
811  peaktItr = m_peakTimes->begin();
812  peaktEnd = m_peakTimes->end();
813  }
814  for(; slopeItr != slopeEnd; ++slopeItr)
815  {
816  if(m_findPeakTime && (peaktItr == peaktEnd) )
817  {
818  ATH_MSG_FATAL("Peaktimes out of sync with slopes. Quiting write.");
819 
820  return StatusCode::FAILURE;
821  }
822 
823  //Output hashId
824  out << (*slopeItr)->hashId();
825 
826  //get id for next few outputs
827  Identifier id;
828  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
829  m_idHelperSvc->cscIdHelper().get_id((*slopeItr)->hashId(),id, &channelContext);
830 
831  //output chamber #
832  IdentifierHash chamberHash;
833  Identifier chamberId = m_idHelperSvc->cscIdHelper().elementID(id);
834  if(!m_idHelperSvc->cscIdHelper().valid(chamberId))
835  {
836  ATH_MSG_FATAL(chamberId.getString() << " is not a valid id!");
837  ATH_MSG_FATAL("identifier is: " << m_idHelperSvc->cscIdHelper().show_to_string(chamberId));
838  return StatusCode::FAILURE;
839  }
840 
841  m_idHelperSvc->cscIdHelper().get_module_hash(id,chamberHash);
842  out <<" " << chamberHash;
843 
844  //output strip details
845  out << " " << m_idHelperSvc->cscIdHelper().show_to_string(id) << " ";
846 
847  //output parameter values
848  out << " " << (*slopeItr)->value();
849  if(m_findPeakTime) out << " " << (*peaktItr)->value();
850  out << "\n" ; //to improve readability
851  } //end loop over hash Ids
852 
853  out.close(); //done writing
854 
855  return StatusCode::SUCCESS;
856  }//end calOutput0

◆ calOutput3()

StatusCode MuonCalib::CscCalcSlope::calOutput3 ( )
private

Definition at line 912 of file CscCalcSlope.cxx.

912  {
913  std::ofstream out;
914  out.open(m_outputFileName.c_str());
915  if(!out.is_open())
916  {
917  ATH_MSG_ERROR("Can't open file " << m_outputFileName.c_str());
918  return StatusCode::RECOVERABLE;
919  }
920  out << "03-00 <END_HEADER>";
921 
923  out << "\n<END_FILE>";
924  out.close();
925 
926  ATH_MSG_INFO("Successfully opened file " << m_outputFileName);
927 
928  return StatusCode::SUCCESS;
929  }

◆ calShape()

double MuonCalib::CscCalcSlope::calShape ( double *  x,
double *  par 
)
private

◆ collectEventInfo()

StatusCode MuonCalib::CscCalcSlope::collectEventInfo ( )
private

event loop functions

Definition at line 312 of file CscCalcSlope.cxx.

313  {
314  MsgStream mLog( msgSvc(), name() );
315 
316  // apparently not used since code is exited automatically if there is an error
317  // bool thereIsAnError = false;
318 
319  Chrono chrono(m_chronoSvc,"collectEventInfo");
320  ATH_MSG_DEBUG("Collecting event info for event " << m_eventCnt);
321  //Below might need to be changed depending on how we get data
322  const CscRawDataContainer* fullRDO;
323  StatusCode sc_read = evtStore()->retrieve(fullRDO, "CSCRDO");
324  if (sc_read != StatusCode::SUCCESS)
325  {
326  ATH_MSG_FATAL("Could not find event");
327  return StatusCode::FAILURE;
328  }
329 
331  const CscCondDbData* readCdo{*readHandle};
332 
333  //Loop over RODs (data from 2 chambers), each of which is in
334  //a single CscRawaData collection
335 
336 
337  for(const auto rod:*fullRDO)
338  {
339  if(not rod->empty())
340  {
341 
342  uint16_t pulsedWireLayer = rod->calLayer();
343 
344  int pulserLevel = rod->calAmplitude();
345  ATH_MSG_VERBOSE("Pulser level is " << pulserLevel);
346  if( pulserLevel != m_lastPulserLevel)
347  {
348  ATH_MSG_INFO("New pulser level found. (" << pulserLevel <<").");
349 
350  std::map<int,TProfile*>::iterator alreadyExistingProfile = m_ampProfs->find(pulserLevel);
351 
352  if(alreadyExistingProfile == m_ampProfs->end())
353  {//No previous profile for this amplitude exists
354 
355  ATH_MSG_DEBUG(" creating new amplitude profile");
356  std::stringstream name, title;
357  name << "ampProf_" << pulserLevel;
358  title << m_titlePrefix << "Amplitudes For Pulser Level " << pulserLevel << m_titlePostfix;
359  m_currentAmpProf = new TProfile(name.str().c_str(), title.str().c_str(),
361  m_currentAmpProf->GetXaxis()->SetTitle("Channel (Hash Id)");
362  m_currentAmpProf->GetYaxis()->SetTitle("Amplitude (ADC value)");
363  ATH_MSG_DEBUG("Adding new amplitude profile");
364  m_ampProfs->insert(std::pair<int, TProfile*>( pulserLevel, m_currentAmpProf));
365  }
366  else
367  {
368  ATH_MSG_DEBUG(" using existing amplitude profile");
369  m_currentAmpProf = alreadyExistingProfile->second;
370  }
371 
372  m_lastPulserLevel = pulserLevel;
373  }
374 
375  unsigned int samplingPhase = rod->samplingPhase();
376  uint8_t samplingPeriod = rod->rate(); //sampling period in ns
377 
378 
379  //Loop over strips in rod
380 
381 
382  for(const auto cluster: *rod)
383  {
384  //Note: For a pulser or ped run, the "cluster"
385  //is the size of an entire layer
386  int numStrips = cluster->width();
387  int samplesPerStrip = (cluster->samples()).size()/numStrips;
388 
389  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
390 
391  for(int stripItr = 0; stripItr <numStrips; stripItr++)
392  {
393  Identifier stripId =m_cscRdoDecoderTool->channelIdentifier(cluster, &m_idHelperSvc->cscIdHelper(), stripItr);
394  IdentifierHash cscChannelHashId;
395  m_idHelperSvc->cscIdHelper().get_channel_hash(stripId, cscChannelHashId);
396  int stripHash = cscChannelHashId;
397  ATH_MSG_VERBOSE("The eta of this strip is: " << m_idHelperSvc->cscIdHelper().stationEta(stripId));
398 
399  int chamberLayer = m_idHelperSvc->cscIdHelper().chamberLayer(stripId);
400  if(chamberLayer != m_expectedChamberLayer)
401  {
402  ATH_MSG_FATAL("Cluster includes strip in chamber layer "
403  << chamberLayer << ". Only " << m_expectedChamberLayer
404  << " is valid.");
405  return StatusCode::FAILURE;
406  }
407 
408  int currentWireLayer = m_idHelperSvc->cscIdHelper().wireLayer(stripId) - 1;
409  if( currentWireLayer < 0 || currentWireLayer > 3)
410  {
411  ATH_MSG_FATAL("Problem in getting wire layer! - Current value is "
412  << m_idHelperSvc->cscIdHelper().wireLayer(stripId) << " while only values between 1-4 are allowed.");
413  return StatusCode::FAILURE;
414  }
415  bool isThisLayerPulsed = (pulsedWireLayer >> currentWireLayer)&0x1;
416  if(isThisLayerPulsed)
417  {
418 
419  std::vector<uint16_t> samples;
420  cluster->samples(stripItr,samplesPerStrip,samples); //Retrieve samples for a single strip
421 
422  float ped = 0;
423  float noise = 0;
424  if(m_pedFile)
425  {
426  ped = m_peds[stripHash];
427  noise = m_noises[stripHash];
428  }
429  else{
430 
431  if(!readCdo->readChannelPed(stripHash, ped).isSuccess()){
432  ped = 2054;
433  if (m_ignoreDatabaseError) ATH_MSG_WARNING("Failed at getting pedestal from COOL for hash " << stripHash);
434  else ATH_MSG_ERROR("Failed at getting pedestal from COOL for hash " << stripHash);
436  return StatusCode::RECOVERABLE;
437  ATH_MSG_WARNING("Setting to " << ped);
438  }
439  else
440  ATH_MSG_VERBOSE("Got pedestal of " << ped);
441  if(!readCdo->readChannelNoise(stripHash, noise).isSuccess())
442  {
443  noise = .001;
444  if (m_ignoreDatabaseError) ATH_MSG_WARNING("Failed at getting noise from COOL for hash " << stripHash);
445  else ATH_MSG_ERROR("Failed at getting noise from COOL for hash " << stripHash);
447  return StatusCode::FAILURE;
448  ATH_MSG_WARNING("Setting to " << noise);
449  }
450 
451  }
452 
453  double peakAmp{}, peakTime{};
454  int success{};
455  if(!m_doBipolarFit)
456  {
457  //Need to convert vector from ints to floats to pass to findCharge
458  std::vector<float> floatSamples;
459  for(const auto & thisSample:samples){
460 
461  floatSamples.push_back(thisSample-ped);
462  if(m_bitHists){
463  if(!fillBitHist((*m_bitHists)[stripHash],thisSample)){
464  ATH_MSG_WARNING("Failed recording bits for strip " << stripHash);
465  }
466 
467  }
468  }
469 
470  success = m_cscCalibTool->findCharge((float)samplingPeriod, samplingPhase,floatSamples,peakAmp,peakTime);
471 
472  }
473  else
474  {
475  //Need to convert vector from ints to doubles to pass to bipolar fit
476  double adcSamples[4];
477  for(int i = 0; i < 4; i++) adcSamples[i] = samples[i] -ped;
478  double fitResult[3],fitErrors[3], chi2;
479  double width = samplingPeriod == 50 ? 7.2:14.4; //check if 50 or 25ns period
480 
481  m_bipolarFit.Fit(adcSamples,noise,ped,width,fitResult,fitErrors,&chi2);
482  success = true;
483  peakAmp = fitResult[0];
484  peakTime = fitResult[1] - (samplingPhase ? 25 : 0);
485  }//end if m_doBipolarFit
486 
487 
488  if(success)
489  {
490  m_currentAmpProf->Fill(stripHash,peakAmp);
491  //((*m_ampHists)[stripHash])->Fill(peakAmp);
492 
493  if(m_findPeakTime)
494  m_peakTimeProf->Fill(stripHash,peakTime);
495  }
496  else
497  {
498  ATH_MSG_WARNING("Failed at fitting pulse shape. Debug info: ");
499  ATH_MSG_WARNING("stripHash " << stripHash);
500  ATH_MSG_WARNING("strip in chamber " << stripItr);
501  ATH_MSG_WARNING(" and detailed id " << m_idHelperSvc->cscIdHelper().show_to_string(stripId,&channelContext));
502  ATH_MSG_WARNING("Pulsed layer " << pulsedWireLayer<< ", Samples: " << samples[0] <<", " << samples[1] << ", " << samples[2] << ", " << samples[3]);
503  }
504  }//end if (islayerPulsedand and is precision layer)
505  }//end strip loop
506 
507  }//end cluster loop
508  }//end if rod >1
509  }//end rod loop
510 
511 
512  ATH_MSG_DEBUG("end collectEventInfo()");
513  m_eventCnt++;
514 
515  // at this part of the code thereIsAnError is always false - if true it would exit earlier
516  // if(thereIsAnError)
517  // return StatusCode::RECOVERABLE;
518 
519  return StatusCode::SUCCESS;
520  }// end collectEventInfo()

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode MuonCalib::CscCalcSlope::execute ( void  )

Definition at line 252 of file CscCalcSlope.cxx.

253  {
254  ATH_MSG_INFO("Begin execute");
255  //collectEventInfo collects infomation about each event by filling ampHistCollection and peaktHist.
257 
258  if(!sc.isSuccess())
259  {
260  ATH_MSG_WARNING("There was an error collecting information from the RDO this event.");
261  return sc;
262  }
263  ATH_MSG_INFO("End execute");
264  return StatusCode::SUCCESS;
265  } //end execute()

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ fillBitHist()

StatusCode MuonCalib::CscCalcSlope::fillBitHist ( TH1I *  bitHist,
const uint16_t &  val 
)
inlineprivate

Definition at line 149 of file CscCalcSlope.h.

150  {
151  if(!bitHist)
152  return StatusCode::RECOVERABLE;
153 
154  //Num bits should always be m_numBits
155  std::bitset<12> bitVal(val);
156 
157  for(unsigned int bitIndex = 0; bitIndex < m_numBits; bitIndex++){
158  if(bitVal[bitIndex]){
159  bitHist->Fill(bitIndex);
160  }
161  }
162 
163 
164  return StatusCode::SUCCESS;
165  }

◆ finalize()

StatusCode MuonCalib::CscCalcSlope::finalize ( void  )

m_adcValues and/or m_allPeaktsHist

Definition at line 267 of file CscCalcSlope.cxx.

268  {
269  ATH_MSG_INFO("In finalize()");
270 
271  StatusCode sc;
272 
273  bool thereIsAFatal=false;
274 
275  //calculateParameters() finds means and fits gain curves from the data in
278  if(sc.isFailure())
279  {
280  ATH_MSG_WARNING("Calculation of parameters failed!");
281  }
282  ATH_MSG_DEBUG("Finished calculating parameters");
283 
284  //writeCalibrationFile() writes the calculated parameters into a calibration fie.
286  if(!sc.isSuccess())
287  {
288  ATH_MSG_FATAL("Failed to write parameters to disk!");
289  thereIsAFatal = true; //Not quiting yet to ensure memory is properly deleted
290  }
291 
292  sc = storeGateRecord();
293  if(sc.isFailure())
294  {
295  ATH_MSG_FATAL("Failed to record parameters in StoreGate ");
296  thereIsAFatal = true;
297  }
298 
299  delete m_peakTimeProf;
300 
301  delete [] m_crossTalkFix;
302  ATH_MSG_DEBUG("Finished finalize()");
303 
304  if(thereIsAFatal)
305  return StatusCode::FAILURE;
306 
307  return StatusCode::SUCCESS;
308  }//end finalize()

◆ initialize()

StatusCode MuonCalib::CscCalcSlope::initialize ( void  )

basic required functions

Definition at line 120 of file CscCalcSlope.cxx.

121  {
122  ATH_MSG_INFO("CscCalcSlope::initialize() called");
123 
124  //*******Register services and tools *********/
125  ATH_CHECK(m_idHelperSvc.retrieve());
126 
127  m_chronoSvc = service("ChronoStatSvc");
128  ATH_CHECK(m_chronoSvc.isValid());
129 
130  ATH_CHECK(m_cscCalibTool.retrieve());
131 
132  ATH_CHECK(m_cscRdoDecoderTool.retrieve());
133 
134  ATH_MSG_INFO("Finished initializing services. ");
135  //*****Initialize internal variables and histograms*******/
136  m_ampProfs = new std::map<int, TProfile* >();
137  //Setup lookup table for pulser levels
138  m_dbLevels.resize(64);
139  for(unsigned int pulserLevel=0; pulserLevel < 64; pulserLevel++)
140  m_dbLevels[pulserLevel] = pulserLevel*.5;
141 
142  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
143 
145  //Loop through ids to find out what hash range we're working on, and to
146  //initialize histograms.
147  const std::vector<Identifier> & ids = m_idHelperSvc->cscIdHelper().idVector();
148 
149 
150  m_maxStripHash = 0;
151  for(const auto & thisChamberId:ids)
152  {
153  std::vector<Identifier> stripVect;
154  m_idHelperSvc->cscIdHelper().idChannels(thisChamberId,stripVect);
155 
156 
157 
158  for(const auto & thisStripId:stripVect)
159  {
160  IdentifierHash stripHash;
161  m_idHelperSvc->cscIdHelper().get_channel_hash(thisStripId,stripHash);
162 
163  if(m_maxStripHash < (unsigned int)stripHash)
164  m_maxStripHash = (unsigned int)stripHash;
165 
166  if(m_bitHists)
167  {
168  Identifier id;
169  m_idHelperSvc->cscIdHelper().get_id((IdentifierHash)stripHash,id,&channelContext);
170  int wireLayer = m_idHelperSvc->cscIdHelper().wireLayer(id);
171  char orientation = (m_idHelperSvc->cscIdHelper().measuresPhi(id) ? 'Y':'X');
172 
173  int stationName = m_idHelperSvc->cscIdHelper().stationName(id);
174  int stationPhi = m_idHelperSvc->cscIdHelper().stationPhi(id);
175  int stationEta = m_idHelperSvc->cscIdHelper().stationEta(id);
176 
177  int stripNumber = m_idHelperSvc->cscIdHelper().strip(id);
178 
179  char bitName[200], titleSeed[500];
180  //Bit histogram (for looking for stuck-bits)
181  sprintf(bitName, "bitHist%d",(int)stripHash);
182  sprintf(titleSeed, "Bit histogram for eta %d, sector %d, layer %d%c strip %d",
183  stationEta,(2*stationPhi+50 - stationName),wireLayer,orientation,stripNumber);
184  std::string title = m_titlePrefix + titleSeed + m_titlePostfix;
185  TH1I* hist = new TH1I(bitName, title.c_str(), m_numBits, 0, m_numBits); //12 bits
186  hist->GetXaxis()->SetTitle("Bit");
187  hist->GetYaxis()->SetTitle("Counts");
189  }
190  }
191  }//end chamber loop
192 
193  m_fitReturns = new std::vector<float>;
194  m_fitReturns->resize(m_maxStripHash+1,0);
195 
197  for(unsigned int chanItr =0; chanItr <= m_maxStripHash; chanItr++)
198  {
199  m_calGraphs->push_back(nullptr);
200  }
201 
202 
203  if(m_pedFile)
204  {
205  ATH_MSG_INFO("Opening pedestal file");
206  std::ifstream in(m_pedFileName.c_str());
207  int stripHash;
208  double ped,noise;//,pedError,noiseError;
209  std::string buff;
210  in >> buff >> buff >> buff >> buff >> buff ;// skip header
211  m_peds = new float[m_maxStripHash+1];
212  m_noises = new float[m_maxStripHash+1];
213 
214  while(!in.eof())
215  {
216  in >> stripHash >> buff >> buff >> ped >> noise;
217  ATH_MSG_INFO(stripHash << "\t" << ped << "\t" << noise);
218  if( stripHash < 0 || (unsigned int) stripHash > m_maxStripHash ) {
219  //cppcheck-suppress shiftNegative
220  ATH_MSG_FATAL("The hash "<< (int) stripHash << " is out of range for the Ped-Vector - Crashing!");
221  return StatusCode::FAILURE;
222  }
223  m_peds[stripHash] = ped;
224  m_noises[stripHash] = noise;
225  }
226  }
227  else
228  {
230  }
231 
232  ATH_MSG_INFO("Counted " << m_maxStripHash +1 << " strips.");
233 
234  m_slopes = new CscCalibResultCollection("pslope");
235  m_intercepts = new CscCalibResultCollection("pinter");
236 
237  if(m_findPeakTime)
238  {
239  m_peakTimeProf = new TProfile("PeakTimes","Peaking Time for each channel",m_maxStripHash+1,
240  0,m_maxStripHash+1);
241  m_peakTimes = new CscCalibResultCollection("peakt");
242  }
243 
244  m_pulsedChambers = new std::set<int>;
245 
246 
247  ATH_MSG_DEBUG("End initialize");
248  return StatusCode::SUCCESS;
249  }//end initialize

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ makeCalibPoints()

StatusCode MuonCalib::CscCalcSlope::makeCalibPoints ( )
private

Utility functions.

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ outputParameter3()

void MuonCalib::CscCalcSlope::outputParameter3 ( const CscCalibResultCollection results,
std::ofstream &  out 
)
private

Definition at line 932 of file CscCalcSlope.cxx.

932  {
933  ATH_MSG_INFO("Printing out parameter " << results.parName());
934 
936  const CscCondDbData* readCdo{*readHandle};
937 
938  out << "\n";
939  out << "<NEW_PAR> " << results.parName() << "\n";
940  std::string idString;
941 
944  for(; resItr != resEnd; ++resItr){
945  unsigned int hashId = (*resItr)->hashId();
946  double value = (*resItr)->value();
947  std::string idString;
948 
949  readCdo->indexToStringId(&m_idHelperSvc->cscIdHelper(), hashId, "CHANNEL", idString).ignore();
950 
951  out << idString << " " << value << "\n";
952  }
953 
954  out << "<END_PAR>" ;
955  }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ storeGateRecord()

StatusCode MuonCalib::CscCalcSlope::storeGateRecord ( )
private

Definition at line 858 of file CscCalcSlope.cxx.

859  {
860  ATH_MSG_INFO("Recording csc calibration report.");
861 
862  StatusCode sc = StatusCode::SUCCESS;
863 
864  bool thereIsAnError = false;
865 
866  std::string histKey = "cscSlopeCalibReport";
867  ATH_MSG_DEBUG("Recording calibration graphs to TDS with key " << histKey);
868 
869  CscCalibReportSlope * report = new CscCalibReportSlope("calGraphs");
870 
871  report->setCalGraphs(m_calGraphs);
872  report->setAmpProfs(m_ampProfs);
873  report->setPulsedChambers(m_pulsedChambers);
874  report->setBitHists(m_bitHists);
875  report->setFitResults(m_fitReturns);
876 
877  CscCalibReportContainer * repCont = new CscCalibReportContainer(histKey);
878  repCont->push_back(report);
879 
880  sc = evtStore()->record(repCont, histKey);
881  if(sc.isFailure())
882  {
883  ATH_MSG_ERROR("Failed to record CscCalibReportSlope to storegate");
884  thereIsAnError = true;
885  //Since storegate isn't taking ownership, we'll delete it:
886  delete repCont;
887  }
888 
889  CscCalibResultContainer * calibResults
890  = new CscCalibResultContainer("CscCalibResultSlope");
891  calibResults->push_back(m_slopes);
892  calibResults->push_back(m_intercepts);
893  if(m_findPeakTime)
894  calibResults->push_back(m_peakTimes);
895  sc = evtStore()->record(calibResults,"CscCalibResultSlope");
896  if(sc.isFailure())
897  {
898  ATH_MSG_ERROR("Failed to record results to storegate");
899  thereIsAnError = true;
900  //Since storegate isn't taking ownership, we'll delete it
901  delete calibResults;
902  }
903 
904  if(thereIsAnError)
905  return StatusCode::RECOVERABLE;
906 
907  return StatusCode::SUCCESS;
908  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ writeCalibrationFile()

StatusCode MuonCalib::CscCalcSlope::writeCalibrationFile ( )
private

Definition at line 765 of file CscCalcSlope.cxx.

766  {
767  Chrono chrono(m_chronoSvc,"writeCalibrationFile");
768  if(m_calOutputVersion == "00-00"){
769  ATH_MSG_INFO("Printing output file version 00-00");
770  return calOutput0();
771  }
772  else if(m_calOutputVersion == "03-00") {
773  ATH_MSG_INFO("Printing output file version 03-00");
774  return calOutput3();
775  }
776  else{
777  ATH_MSG_INFO("Don't know how to write calibration file version " << m_calOutputVersion);
778  return StatusCode::RECOVERABLE;
779  }
780  }

Member Data Documentation

◆ m_ampProfs

std::map<int, TProfile*>* MuonCalib::CscCalcSlope::m_ampProfs
private

Definition at line 109 of file CscCalcSlope.h.

◆ m_bipolarFit

BipolarFit MuonCalib::CscCalcSlope::m_bipolarFit
private

Definition at line 119 of file CscCalcSlope.h.

◆ m_bitHists

DataVector<TH1I>* MuonCalib::CscCalcSlope::m_bitHists
private

Definition at line 103 of file CscCalcSlope.h.

◆ m_calFitFunc

std::string MuonCalib::CscCalcSlope::m_calFitFunc
private

Definition at line 132 of file CscCalcSlope.h.

◆ m_calGraphs

DataVector<TGraphErrors>* MuonCalib::CscCalcSlope::m_calGraphs
private

Definition at line 107 of file CscCalcSlope.h.

◆ m_calOutputVersion

std::string MuonCalib::CscCalcSlope::m_calOutputVersion
private

Definition at line 88 of file CscCalcSlope.h.

◆ m_chronoSvc

SmartIF<IChronoStatSvc> MuonCalib::CscCalcSlope::m_chronoSvc
private

Definition at line 83 of file CscCalcSlope.h.

◆ m_cmd_parameters

std::string MuonCalib::CscCalcSlope::m_cmd_parameters
private

Definition at line 143 of file CscCalcSlope.h.

◆ m_crossTalkFix

double* MuonCalib::CscCalcSlope::m_crossTalkFix
private

Definition at line 121 of file CscCalcSlope.h.

◆ m_cscCalibTool

ToolHandle<ICscCalibTool> MuonCalib::CscCalcSlope::m_cscCalibTool {this, "CscCalibTool", "CscCalibTool"}
private

Services and tools.

Definition at line 80 of file CscCalcSlope.h.

◆ m_cscRdoDecoderTool

ToolHandle<Muon::ICSC_RDO_Decoder> MuonCalib::CscCalcSlope::m_cscRdoDecoderTool {this,"CscRDODecoder","Muon::CscRDO_Decoder"}
private

Definition at line 81 of file CscCalcSlope.h.

◆ m_currentAmpProf

TProfile* MuonCalib::CscCalcSlope::m_currentAmpProf
private

Definition at line 108 of file CscCalcSlope.h.

◆ m_dbLevels

std::vector<float> MuonCalib::CscCalcSlope::m_dbLevels
private

Definition at line 123 of file CscCalcSlope.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doBipolarFit

bool MuonCalib::CscCalcSlope::m_doBipolarFit
private

Definition at line 120 of file CscCalcSlope.h.

◆ m_doBitHists

bool MuonCalib::CscCalcSlope::m_doBitHists
private

Definition at line 94 of file CscCalcSlope.h.

◆ m_doCrossTalkFix

bool MuonCalib::CscCalcSlope::m_doCrossTalkFix
private

Definition at line 122 of file CscCalcSlope.h.

◆ m_doLinPlot

bool MuonCalib::CscCalcSlope::m_doLinPlot
private

Definition at line 140 of file CscCalcSlope.h.

◆ m_dumpAllHists

bool MuonCalib::CscCalcSlope::m_dumpAllHists
private

Definition at line 92 of file CscCalcSlope.h.

◆ m_eventCnt

int MuonCalib::CscCalcSlope::m_eventCnt
private

coherent correction array has the corrections to the coherently pulsed channels to get the basic channels

Definition at line 113 of file CscCalcSlope.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_expectedChamberLayer

int MuonCalib::CscCalcSlope::m_expectedChamberLayer
private

Definition at line 130 of file CscCalcSlope.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_findPeakTime

bool MuonCalib::CscCalcSlope::m_findPeakTime
private

Definition at line 135 of file CscCalcSlope.h.

◆ m_fitReturns

std::vector<float>* MuonCalib::CscCalcSlope::m_fitReturns
private

Definition at line 104 of file CscCalcSlope.h.

◆ m_fracGraphs

DataVector<DataVector<TGraph> >* MuonCalib::CscCalcSlope::m_fracGraphs
private

Definition at line 102 of file CscCalcSlope.h.

◆ m_fracProfs

DataVector<DataVector<TProfile> >* MuonCalib::CscCalcSlope::m_fracProfs
private

Definition at line 101 of file CscCalcSlope.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonCalib::CscCalcSlope::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 82 of file CscCalcSlope.h.

◆ m_ignoreDatabaseError

bool MuonCalib::CscCalcSlope::m_ignoreDatabaseError
private

Definition at line 93 of file CscCalcSlope.h.

◆ m_intercepts

CscCalibResultCollection * MuonCalib::CscCalcSlope::m_intercepts
private

Definition at line 115 of file CscCalcSlope.h.

◆ m_lastPulserLevel

int MuonCalib::CscCalcSlope::m_lastPulserLevel
private

Definition at line 99 of file CscCalcSlope.h.

◆ m_maxStripHash

unsigned int MuonCalib::CscCalcSlope::m_maxStripHash
private

Internally global variables.

Definition at line 98 of file CscCalcSlope.h.

◆ m_minDeltaAdc

double MuonCalib::CscCalcSlope::m_minDeltaAdc
private

Definition at line 90 of file CscCalcSlope.h.

◆ m_noises

float * MuonCalib::CscCalcSlope::m_noises
private

Definition at line 125 of file CscCalcSlope.h.

◆ m_numBits

unsigned int MuonCalib::CscCalcSlope::m_numBits
private

Definition at line 146 of file CscCalcSlope.h.

◆ m_outputFileName

std::string MuonCalib::CscCalcSlope::m_outputFileName
private

Parameters input through joboptions.

Definition at line 87 of file CscCalcSlope.h.

◆ m_peakTimeProf

TProfile* MuonCalib::CscCalcSlope::m_peakTimeProf
private

Definition at line 136 of file CscCalcSlope.h.

◆ m_peakTimes

CscCalibResultCollection* MuonCalib::CscCalcSlope::m_peakTimes
private

Definition at line 137 of file CscCalcSlope.h.

◆ m_pedFile

bool MuonCalib::CscCalcSlope::m_pedFile
private

Definition at line 127 of file CscCalcSlope.h.

◆ m_pedFileName

std::string MuonCalib::CscCalcSlope::m_pedFileName
private

Definition at line 128 of file CscCalcSlope.h.

◆ m_peds

float* MuonCalib::CscCalcSlope::m_peds
private

Definition at line 125 of file CscCalcSlope.h.

◆ m_pulsedChambers

std::set<int>* MuonCalib::CscCalcSlope::m_pulsedChambers
private

Definition at line 110 of file CscCalcSlope.h.

◆ m_readKey

SG::ReadCondHandleKey<CscCondDbData> MuonCalib::CscCalcSlope::m_readKey {this, "ReadKey", "CscCondDbData", "Key of CscCondDbData"}
private

Definition at line 84 of file CscCalcSlope.h.

◆ m_resGraph

TGraph* MuonCalib::CscCalcSlope::m_resGraph
private

Definition at line 106 of file CscCalcSlope.h.

◆ m_slopes

CscCalibResultCollection* MuonCalib::CscCalcSlope::m_slopes
private

Definition at line 115 of file CscCalcSlope.h.

◆ m_titlePostfix

std::string MuonCalib::CscCalcSlope::m_titlePostfix
private

Definition at line 96 of file CscCalcSlope.h.

◆ m_titlePrefix

std::string MuonCalib::CscCalcSlope::m_titlePrefix
private

Definition at line 96 of file CscCalcSlope.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MuonCalib::CscCalcSlope::storeGateRecord
StatusCode storeGateRecord()
Definition: CscCalcSlope.cxx:858
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
get_hdefs.buff
buff
Definition: get_hdefs.py:61
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
MuonCalib::CscCalcSlope::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CscCalcSlope.h:82
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:158
verify_menu_config.results
results
Definition: verify_menu_config.py:67
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
MuonCalib::CscCalcSlope::m_outputFileName
std::string m_outputFileName
Parameters input through joboptions.
Definition: CscCalcSlope.h:87
MuonCalib::CscCalcSlope::calculateParameters
StatusCode calculateParameters()
Finalize functions.
Definition: CscCalcSlope.cxx:525
MuonCalib::CscCalcSlope::fillBitHist
StatusCode fillBitHist(TH1I *bitHist, const uint16_t &val)
Definition: CscCalcSlope.h:149
MuonCalib::CscCalcSlope::m_pulsedChambers
std::set< int > * m_pulsedChambers
Definition: CscCalcSlope.h:110
MuonCalib::CscCalcSlope::m_dbLevels
std::vector< float > m_dbLevels
Definition: CscCalcSlope.h:123
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonCalib::CscCalcSlope::calOutput0
StatusCode calOutput0()
Definition: CscCalcSlope.cxx:782
CscCalibResult
Definition: CscCalibResult.h:19
MuonCalib::CscCalcSlope::outputParameter3
void outputParameter3(const CscCalibResultCollection &results, std::ofstream &out)
Definition: CscCalcSlope.cxx:932
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
plotmaker.hist
hist
Definition: plotmaker.py:148
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
MuonCalib::CscCalcSlope::writeCalibrationFile
StatusCode writeCalibrationFile()
Definition: CscCalcSlope.cxx:765
checkTP.report
report
Definition: checkTP.py:127
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
MuonCalib::CscCalcSlope::m_expectedChamberLayer
int m_expectedChamberLayer
Definition: CscCalcSlope.h:130
MuonCalib::CscCalcSlope::m_findPeakTime
bool m_findPeakTime
Definition: CscCalcSlope.h:135
MuonCalib::CscCalcSlope::m_peakTimes
CscCalibResultCollection * m_peakTimes
Definition: CscCalcSlope.h:137
athena.value
value
Definition: athena.py:124
CscCalibReportContainer
Definition: CscCalibReportContainer.h:25
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonCalib::CscCalcSlope::m_intercepts
CscCalibResultCollection * m_intercepts
Definition: CscCalcSlope.h:115
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonCalib::CscCalcSlope::m_fitReturns
std::vector< float > * m_fitReturns
Definition: CscCalcSlope.h:104
MuonCalib::CscCalcSlope::m_lastPulserLevel
int m_lastPulserLevel
Definition: CscCalcSlope.h:99
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonCalib::CscCalcSlope::m_peds
float * m_peds
Definition: CscCalcSlope.h:125
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MuonCalib::CscCalcSlope::m_bipolarFit
BipolarFit m_bipolarFit
Definition: CscCalcSlope.h:119
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
MuonCalib::CscCalcSlope::m_fracGraphs
DataVector< DataVector< TGraph > > * m_fracGraphs
Definition: CscCalcSlope.h:102
MuonCalib::CscCalcSlope::m_calFitFunc
std::string m_calFitFunc
Definition: CscCalcSlope.h:132
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonCalib::CscCalcSlope::m_chronoSvc
SmartIF< IChronoStatSvc > m_chronoSvc
Definition: CscCalcSlope.h:83
MuonCalib::CscCalcSlope::m_pedFileName
std::string m_pedFileName
Definition: CscCalcSlope.h:128
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
MuonCalib::CscCalcSlope::m_slopes
CscCalibResultCollection * m_slopes
Definition: CscCalcSlope.h:115
MuonCalib::CscCalcSlope::m_doBipolarFit
bool m_doBipolarFit
Definition: CscCalcSlope.h:120
MuonCalib::CscCalcSlope::collectEventInfo
StatusCode collectEventInfo()
event loop functions
Definition: CscCalcSlope.cxx:312
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonCalib::CscCalcSlope::m_bitHists
DataVector< TH1I > * m_bitHists
Definition: CscCalcSlope.h:103
MuonCalib::CscCalcSlope::m_numBits
unsigned int m_numBits
Definition: CscCalcSlope.h:146
covarianceTool.title
title
Definition: covarianceTool.py:542
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
MuonCalib::CscCalcSlope::m_peakTimeProf
TProfile * m_peakTimeProf
Definition: CscCalcSlope.h:136
MuonCalib::CscCalcSlope::m_calOutputVersion
std::string m_calOutputVersion
Definition: CscCalcSlope.h:88
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCalib::CscCalcSlope::m_dumpAllHists
bool m_dumpAllHists
Definition: CscCalcSlope.h:92
MuonCalib::CscCalcSlope::calOutput3
StatusCode calOutput3()
Definition: CscCalcSlope.cxx:912
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
MuonCalib::CscCalcSlope::m_noises
float * m_noises
Definition: CscCalcSlope.h:125
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
DataVector< TH1I >
MuonCalib::CscCalcSlope::m_doCrossTalkFix
bool m_doCrossTalkFix
Definition: CscCalcSlope.h:122
MuonCalib::CscCalcSlope::m_resGraph
TGraph * m_resGraph
Definition: CscCalcSlope.h:106
CscCalibReportSlope
Definition: CscCalibReportSlope.h:28
CscCalibResultContainer
Definition: CscCalibResultContainer.h:22
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MuonCalib::CscCalcSlope::m_fracProfs
DataVector< DataVector< TProfile > > * m_fracProfs
Definition: CscCalcSlope.h:101
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
MuonCalib::CscCalcSlope::m_titlePrefix
std::string m_titlePrefix
Definition: CscCalcSlope.h:96
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
MuonCalib::CscCalcSlope::m_readKey
SG::ReadCondHandleKey< CscCondDbData > m_readKey
Definition: CscCalcSlope.h:84
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MuonCalib::CscCalcSlope::m_cscRdoDecoderTool
ToolHandle< Muon::ICSC_RDO_Decoder > m_cscRdoDecoderTool
Definition: CscCalcSlope.h:81
Example_ReadSampleNoise.ped
ped
Definition: Example_ReadSampleNoise.py:45
IDTPM::chiSquared
float chiSquared(const U &p)
Definition: TrackParametersHelper.h:126
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
a
TList * a
Definition: liststreamerinfos.cxx:10
MuonCalib::CscCalcSlope::m_cscCalibTool
ToolHandle< ICscCalibTool > m_cscCalibTool
Services and tools.
Definition: CscCalcSlope.h:80
h
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
CscCalibResultCollection
Definition: CscCalibResultCollection.h:24
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
MuonCalib::CscCalcSlope::m_doLinPlot
bool m_doLinPlot
Definition: CscCalcSlope.h:140
CscRawDataContainer
This container provides access to collections of CSC RDOs and a mechanism for recording them.
Definition: CscRawDataContainer.h:23
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
MuonCalib::CscCalcSlope::m_currentAmpProf
TProfile * m_currentAmpProf
Definition: CscCalcSlope.h:108
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
MuonCalib::CscCalcSlope::m_ignoreDatabaseError
bool m_ignoreDatabaseError
Definition: CscCalcSlope.h:93
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
MuonCalib::CscCalcSlope::m_minDeltaAdc
double m_minDeltaAdc
Definition: CscCalcSlope.h:90
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:156
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
MuonCalib::CscCalcSlope::m_titlePostfix
std::string m_titlePostfix
Definition: CscCalcSlope.h:96
MuonCalib::CscCalcSlope::m_crossTalkFix
double * m_crossTalkFix
Definition: CscCalcSlope.h:121
BipolarFit::Fit
int Fit(double *x, const double ex, const double pedestal, const double predefinedwidth, double *result, double *errors, double *chi2)
Definition: BipolarFit.cxx:203
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
MuonCalib::CscCalcSlope::m_maxStripHash
unsigned int m_maxStripHash
Internally global variables.
Definition: CscCalcSlope.h:98
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
MuonCalib::CscCalcSlope::m_eventCnt
int m_eventCnt
coherent correction array has the corrections to the coherently pulsed channels to get the basic chan...
Definition: CscCalcSlope.h:113
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MuonCalib::CscCalcSlope::m_calGraphs
DataVector< TGraphErrors > * m_calGraphs
Definition: CscCalcSlope.h:107
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
MuonCalib::CscCalcSlope::m_pedFile
bool m_pedFile
Definition: CscCalcSlope.h:127
MuonCalib::CscCalcSlope::m_doBitHists
bool m_doBitHists
Definition: CscCalcSlope.h:94
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
CscCondDbData
Definition: CscCondDbData.h:24
ServiceHandle< ICondSvc >
MuonCalib::CscCalcSlope::m_ampProfs
std::map< int, TProfile * > * m_ampProfs
Definition: CscCalcSlope.h:109
Identifier
Definition: IdentifierFieldParser.cxx:14