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

does calibration of the CSC chambers More...

#include <CscCalcPed.h>

Inheritance diagram for MuonCalib::CscCalcPed:
Collaboration diagram for MuonCalib::CscCalcPed:

Public Member Functions

 CscCalcPed (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~CscCalcPed ()=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 ()
 
DataVector< TH2F > * makeBitCorrelation ()
 
StatusCode calOutput0 ()
 
StatusCode calOutput1 ()
 
StatusCode calOutput3 ()
 
void outputParameter3 (const CscCalibResultCollection &results, std::ofstream &out)
 
StatusCode hashToChamberName (IdentifierHash, std::string)
 Utility functions. More...
 
StatusCode fillBitHist (TH1I *bitHist, const uint16_t &val, TH2F *bitProds)
 
template<typename dataType >
dataType GetMinMax (std::vector< dataType > &vec)
 
void onlineToOfflineHashId (const unsigned int &onlineId, unsigned int &hashId) const
 
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

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 Services and tools. More...
 
IChronoStatSvc * m_chronoSvc
 
ToolHandle< Muon::ICSC_RDO_Decoderm_cscRdoDecoderTool {this,"CscRdoDecoderTool","Muon::CscRDO_Decoder"}
 
SG::ReadCondHandleKey< CscCondDbDatam_readKey {this, "ReadKey", "CscCondDbData", "Key of CscCondDbData"}
 
std::string m_outputFileName
 Parameters input through joboptions. More...
 
std::string m_titlePrefix
 
std::string m_titlePostfix
 
std::string m_calOutputVersion
 
bool m_doCorrelation
 
float m_thresholdMultiplier
 
int m_expectedChamberLayer
 
std::string m_onlineDbFile
 filename for file with online database information More...
 
unsigned int m_maxStripHash
 Internally global variables. More...
 
unsigned int m_ampHistLowBound
 
unsigned int m_ampHistHighBound
 
unsigned int m_ampHistNumBins
 
const unsigned int m_numBits
 
bool m_doBitHists
 
bool m_doSampleHists
 
int m_numSamplesExpected
 
bool m_doF001
 
DataVector< TH1I > * m_ampHists
 
DataVector< DataVector< TH1I > > * m_sampHists
 
DataVector< TH1I > * m_bitHists
 
DataVector< TH2F > * m_bitProds
 
DataVector< TH1F > * m_bitCorrelation
 
std::vector< int > m_onlineThresholds
 
std::vector< int > m_onlineThresholdFailureCount
 
CscCalibResultCollectionm_peds
 
CscCalibResultCollectionm_noises
 
CscCalibResultCollectionm_rmses
 
CscCalibResultCollectionm_f001s
 
CscCalibResultCollectionm_onlineTHoldBreaches
 
int m_eventCnt
 
double * m_crossTalkFix
 
std::string m_cmt_parameter
 
bool m_doOnlineDbFile
 
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

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

Definition at line 44 of file CscCalcPed.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

◆ CscCalcPed()

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

Definition at line 24 of file CscCalcPed.cxx.

24  :
25  AthAlgorithm(name,pSvcLocator),
26  m_chronoSvc(nullptr),
27  m_maxStripHash(0),
28  m_numBits(12),
29  m_ampHists(nullptr),
30  m_sampHists(nullptr),
31  m_bitHists(nullptr),
32  m_bitProds(nullptr),
33  m_bitCorrelation(nullptr),
34  m_peds(nullptr),
35  m_noises(nullptr),
36  m_rmses(nullptr),
37  m_f001s(nullptr),
38  m_onlineTHoldBreaches(nullptr),
39  m_eventCnt(0),
40  m_crossTalkFix(nullptr)
41  {
42  declareProperty("OutputFile", m_outputFileName = "output.cal");
43  declareProperty("TitlePrefix",m_titlePrefix = ""); //Prefix appended to title of histograms and graphs
44  declareProperty("TitlePostfix",m_titlePostfix = ""); //Prefix appended to title of histograms and graphs
45  declareProperty("PedAmpHighBound", m_ampHistHighBound = 2600);
46  declareProperty("PedAmpLowBound", m_ampHistLowBound = 1800);
47  declareProperty("PedAmpNumBins", m_ampHistNumBins = 800);
48  declareProperty("ExpectedChamberLayer", m_expectedChamberLayer = 2);
49  declareProperty("ThresholdMultiplier", m_thresholdMultiplier = 3.1);
50  declareProperty("DoBitHists", m_doBitHists = false);
51  declareProperty("CalOutputVersion", m_calOutputVersion="03-00");
52  declareProperty("DoCorrelation", m_doCorrelation = false);
53 
54  declareProperty("DoSampHists", m_doSampleHists = false);
55  declareProperty("NumSamplesExpected", m_numSamplesExpected = 4);
56  declareProperty("DoF001", m_doF001 = true);
57 
58  declareProperty("OnlineCalibFile", m_onlineDbFile = "", "File with data currently stored in online configuration database");
59  declareProperty("CompareOnlineCalibFile",m_doOnlineDbFile = true, "Compare new to online data?");
60 
61 
62  //Can't do correlation without bitHists
63  if(!m_doBitHists){
64  m_doCorrelation = false;
65  }
66  }

◆ ~CscCalcPed()

MuonCalib::CscCalcPed::~CscCalcPed ( )
default

Member Function Documentation

◆ calculateParameters()

StatusCode MuonCalib::CscCalcPed::calculateParameters ( )
private

Finalize functions.

Definition at line 498 of file CscCalcPed.cxx.

499  {
500  Chrono chrono(m_chronoSvc,"calculateParameters");
501 
502 
503  //**********Calculate all the parameters from data collected during execute*****************//
504 
505  for(unsigned int stripHash = 0 ;stripHash <= m_maxStripHash; stripHash++)
506  {
507  if(stripHash < 50 || stripHash%1000 == 0)
508  {
509  ATH_MSG_INFO("Analyzing strip with hash " << stripHash << " out of " << m_maxStripHash);
510  ATH_MSG_VERBOSE((float)clock()/((float)CLOCKS_PER_SEC) << " is the time");
511  }
512 
513  TH1I * ampHist = (*m_ampHists)[stripHash];
514  if(ampHist)
515  {
516  ATH_MSG_VERBOSE("Have data for strip hash " << stripHash);
517  if(ampHist->GetEntries() >0) //If strip wasn't tested, it won't have entries
518  {
519  //Following Schernau's work
520  float histMean = ampHist->GetMean();
521  float histRMS = ampHist->GetRMS();
522  float histRMSError = ampHist->GetRMSError();
523 
524  float lowbound = histMean - 3*histRMS;
525  float highbound = histMean + 3*histRMS;
526  ATH_MSG_VERBOSE("About to fit...");
527 
528  int result = ampHist->Fit("gaus","QL","",lowbound,highbound);
529  ATH_MSG_VERBOSE("Result is " << result);
530  TF1 * fittedFunction = ampHist->GetFunction("gaus");
531  double meanError = fittedFunction->GetParError(1);
532  double sigma = fittedFunction->GetParameter(2);
533  double sigmaError = fittedFunction->GetParError(2);
534  double chi2 = fittedFunction->GetChisquare();
535  int ndf = fittedFunction->GetNDF();
536 
537  m_peds->push_back(new CscCalibResult(stripHash,histMean,meanError,chi2,ndf));
538  m_noises->push_back(new CscCalibResult(stripHash,sigma,sigmaError,chi2,ndf));
539  m_rmses->push_back(new CscCalibResult(stripHash,histRMS,histRMSError,0,0));
540 
541 
542 
543  //Integrated threshold (f001) calculation
544  if(m_doF001){
545  int num = (int)ampHist->GetEntries();
546  int thr = ampHist->GetNbinsX() + 1; // start at overflow bin
547  double maxSum = 0.001*num; // 99.90 of pedestals under thr
548  //double maxSum = 0.0001*num; // 99.99 of pedestals under thr
549 
550  double sum = 0;
551  do{
552  sum += ampHist->GetBinContent(thr);
553  thr--;
554  } while ((thr>0)&&(sum<maxSum));
555 
556  //double threshold = ampHist->GetXaxis()->GetBinLowEdge(thr) +2; //For some reason +2 here matches Michael Schernau's +1
557  double threshold = ampHist->GetXaxis()->GetBinLowEdge(thr) +1; //For some reason +2 here matches Michael Schernau's +1
558  m_f001s->push_back(new CscCalibResult(stripHash,threshold,0,0,0));
559 
560  if(m_doOnlineDbFile){
562  }
563  }
564  }
565  }
566  else
567  ATH_MSG_VERBOSE("Don't have data for strip hash " << stripHash);
568  }//end loop over strips
569 
570 
571  //don't need it anymore, clear ram taken by m_failure tests
572  ATH_MSG_DEBUG("Clearing m_onlineThresholdFailureCount");
574 
575 
576  ATH_MSG_INFO("Completed calculating parameters.");
577 
578  return StatusCode::SUCCESS;
579  }//End calculateParameters()

◆ calOutput0()

StatusCode MuonCalib::CscCalcPed::calOutput0 ( )
private

Definition at line 604 of file CscCalcPed.cxx.

604  {
605 
606  std::ofstream out;
607  out.open(m_outputFileName.c_str());
608  if(!out.is_open())
609  {
610  ATH_MSG_ERROR("Can't open file " << m_outputFileName.c_str());
611  return StatusCode::RECOVERABLE;
612  }
613 
614  out << "00-00 ";
615  out << m_peds->size() << " ";
616  out << "ped ";
617  out << "noise ";
618  out << "rms ";
619  out << "END_HEADER\n";
620 
621  ATH_MSG_DEBUG("Begining loop over all " << m_peds->size() << " channels data was collected for.");
622 
623  //form is:hashID chamber LayerOrientationStrip parametervalue parametervalue
628  for(;pedItr!= pedEnd;++pedItr,++noiseItr, ++rmsItr)//,tholdItr++)
629  {
630  int hashId = (*pedItr)->hashId();
631  double ped = (*pedItr)->value();
632  double noise = (*noiseItr)->value();
633  double rms = (*rmsItr)->value();
634 
635  ATH_MSG_DEBUG("we're on hash " << hashId << " with pedestal " << ped << "and noise " << noise);
636  Identifier id;
637  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
638  m_idHelperSvc->cscIdHelper().get_id(hashId,id, &channelContext);
639 
640  Identifier chamberId = m_idHelperSvc->cscIdHelper().elementID(id);
641  if(!m_idHelperSvc->cscIdHelper().valid(chamberId))
642  {
643  ATH_MSG_WARNING(chamberId.getString() << " is not a valid id!");
644  ATH_MSG_WARNING("identifier is: " << m_idHelperSvc->cscIdHelper().show_to_string(chamberId));
645  }
646 
647  IdentifierHash chamberHash;
648  m_idHelperSvc->cscIdHelper().get_module_hash(id,chamberHash);
649 
650  //print out values.
651  out << hashId;
652  out <<" " << chamberHash;
653  out << " " << m_idHelperSvc->cscIdHelper().show_to_string(id) << " ";
654  out << " " << ped;
655  out << " " << noise;
656  out << " " << rms;
657  out << "\n" ;
658  } //end loop over hash Ids
659 
660  out.close(); //done writing
661  ATH_MSG_INFO("File written");
662  return StatusCode::SUCCESS;
663  }//end calOutput0

◆ calOutput1()

StatusCode MuonCalib::CscCalcPed::calOutput1 ( )
private

Definition at line 667 of file CscCalcPed.cxx.

667  {
668 
669  std::ofstream out;
670  std::string onlineFileName = m_outputFileName + "_online";
671 
672  out.open(onlineFileName.c_str());
673  if(!out.is_open())
674  {
675  ATH_MSG_ERROR("Can't open online file " << m_outputFileName.c_str());
676  return StatusCode::RECOVERABLE;
677  }
678 
679  out << "32\n";
680 
681  ATH_MSG_DEBUG("Begining loop over all " << m_peds->size() << " channels data was collected for.");
682 
684  const CscCondDbData* readCdo{*readHandle};
685 
686  //form is:hashID chamber LayerOrientationStrip parametervalue parametervalue
692  for(;pedItr!= pedEnd;++pedItr,++noiseItr, ++rmsItr, ++f001Itr)//,tholdItr++)
693  {
694  int hashId = (*pedItr)->hashId();
695  double ped = (*pedItr)->value();
696  double noise = (*noiseItr)->value();
697  //double rms = (*rmsItr)->value();
698  double f001 = (*f001Itr)->value();
699 
700  //double thold = (*tholdItr)->value();
701  std::string onlineHexId;
702 
703  //Online ids are same as "string ids" used internally in COOL db.
704  readCdo->indexToStringId(&m_idHelperSvc->cscIdHelper(), hashId, "CHANNEL", onlineHexId).ignore();
705 
706  ATH_MSG_DEBUG("we're on hash " << hashId << " with pedestal " << ped << "and noise " << noise);
707  Identifier id;
708  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
709  m_idHelperSvc->cscIdHelper().get_id(hashId,id, &channelContext);
710 
711  Identifier chamberId = m_idHelperSvc->cscIdHelper().elementID(id);
712  if(!m_idHelperSvc->cscIdHelper().valid(chamberId))
713  {
714  ATH_MSG_WARNING(chamberId.getString() << " is not a valid id!");
715  ATH_MSG_WARNING("identifier is: " << m_idHelperSvc->cscIdHelper().show_to_string(chamberId));
716  }
717 
718  char orientationChar = (m_idHelperSvc->cscIdHelper().measuresPhi(id) ? 'Y':'X');
719 
720 
721  IdentifierHash chamberHash;
722  m_idHelperSvc->cscIdHelper().get_module_hash(id,chamberHash);
723 
724  //print out values.
725  out.setf(std::ios::right);//right aligned columns
726  out << std::setfill('0') << std::setw(8) << onlineHexId;
727  out <<" "
728  << std::setw(2) << chamberHash << orientationChar << (m_idHelperSvc->cscIdHelper().wireLayer(id)-1)
729  <<" "
730  << std::setw(3) << m_idHelperSvc->cscIdHelper().strip(id) -1 << " " ;
731  out.setf(std::ios::fixed);
732 
733 
734  out << " " << std::setprecision(3) << std::setw(8) << ped << " 0000.00";
735  out << " " << std::setprecision(3) << std::setw(8) << noise << " 0000.000";
736  out << " " << f001;
737  out << "\n" ;
738  } //end loop over hash Ids
739 
740  out.close(); //done writing
741  ATH_MSG_INFO("File written");
742  return StatusCode::SUCCESS;
743  }//end calOutput1

◆ calOutput3()

StatusCode MuonCalib::CscCalcPed::calOutput3 ( )
private

Definition at line 747 of file CscCalcPed.cxx.

747  {
748  std::ofstream out;
749  out.open(m_outputFileName.c_str());
750  if(!out.is_open())
751  {
752  ATH_MSG_ERROR("Can't open output 3 type file " << m_outputFileName.c_str() << " for writing ");
753  return StatusCode::RECOVERABLE;
754  }
755  out << "03-00 <END_HEADER>";
756 
760  if(m_doF001)
762  out << "\n<END_FILE>";
763  out.close();
764 
765  return StatusCode::SUCCESS;
766  }

◆ collectEventInfo()

StatusCode MuonCalib::CscCalcPed::collectEventInfo ( )
private

event loop functions

Definition at line 346 of file CscCalcPed.cxx.

347  {
348  //start the timer
349  Chrono chrono(m_chronoSvc,"collectEventInfo");
350 
351 
352  m_eventCnt++;
353  ATH_MSG_DEBUG("Collecting event info for event " << m_eventCnt);
354  //Below might need to be changed depending on how we get data
355  const CscRawDataContainer* rawDataContainer;
356  StatusCode sc_read = evtStore()->retrieve(rawDataContainer, "CSCRDO");
357  if (sc_read != StatusCode::SUCCESS)
358  {
359  ATH_MSG_FATAL("Could not find event");
360  return StatusCode::FAILURE;
361  }
362 
363  ATH_MSG_VERBOSE("Retrieved RDO from storegate ");
364 
365  if(rawDataContainer->size() == 0)
366  {
367  ATH_MSG_FATAL("no rods in RDO!");
368  return StatusCode::FAILURE;
369  }
370 
371  ATH_MSG_VERBOSE("There are " << rawDataContainer->size() << " rods in the RDO");
372 
373  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
374 
375  //Loop over RODs (data from 2 chambers), each of which is in
376  //a single CscRawaData collection
377 
378  for(const auto rod : *rawDataContainer)
379  {
380  Chrono chronoRod(m_chronoSvc,"RodItr");
381  ATH_MSG_VERBOSE("Examining a ROD");
382 
383  ATH_MSG_VERBOSE("There are " << rod->size() << " clusters in the ROD");
384  if(rod->size() >0)
385  {
386  //Loop over strips in rod
387 
388 
389  for(const auto cluster: *rod)
390  {
391  Chrono chronoClus(m_chronoSvc,"ClusterItr");
392  int numStrips = cluster->width();
393  int samplesPerStrip = (cluster->samples()).size()/numStrips;
394 
395  ATH_MSG_VERBOSE("About to collect info from " << numStrips << " strips");
396  for(int stripItr = 0; stripItr <numStrips; stripItr++)
397  {
398 
399  Chrono chronoStrip(m_chronoSvc,"stripItr");
400  // WP Added
401  Identifier channelId =m_cscRdoDecoderTool->channelIdentifier(cluster, &m_idHelperSvc->cscIdHelper(), stripItr);
402  IdentifierHash cscChannelHashId;
403  m_idHelperSvc->cscIdHelper().get_channel_hash(channelId, cscChannelHashId);
404 
406  int stripHash = cscChannelHashId;
407 
408  Identifier stripId;
409  m_idHelperSvc->cscIdHelper().get_id(stripHash, stripId, &channelContext);
410 
411 
412  Chrono chronoAfterId(m_chronoSvc,"afterID1");
413 
414  if( m_idHelperSvc->cscIdHelper().chamberLayer(channelId) != m_expectedChamberLayer)
415  {
416  ATH_MSG_WARNING("Wrong chamber layer a hash ("
417  << stripHash << ") from the wrong multilayer has appeared in the data. Its string id is " << m_idHelperSvc->cscIdHelper().show_to_string(stripId)
418  << " " << m_idHelperSvc->cscIdHelper().show_to_string(channelId));
419 
420  ATH_MSG_INFO("WP added (1) "
421  << m_idHelperSvc->cscIdHelper().stationEta(stripId) << " " << m_idHelperSvc->cscIdHelper().measuresPhi(stripId) << " "
422  << stripHash << " " << cscChannelHashId);
423 
424  ATH_MSG_INFO("WP added (2) "
425  << m_idHelperSvc->cscIdHelper().stationEta(stripId) << " " << m_idHelperSvc->cscIdHelper().measuresPhi(stripId) << " "
426  << stripId << " " << channelId);
427 
428  stripId = m_idHelperSvc->cscIdHelper().channelID(
429  m_idHelperSvc->cscIdHelper().stationName(stripId),
430  m_idHelperSvc->cscIdHelper().stationEta(stripId),
431  m_idHelperSvc->cscIdHelper().stationPhi(stripId),
432  2,
433  m_idHelperSvc->cscIdHelper().wireLayer(stripId),
434  m_idHelperSvc->cscIdHelper().measuresPhi(stripId),
435  m_idHelperSvc->cscIdHelper().strip(stripId)
436  );
437  IdentifierHash newHash;
438  m_idHelperSvc->cscIdHelper().get_channel_hash(stripId, newHash );
439  stripHash = newHash;
440  ATH_MSG_DEBUG("New hash " << stripHash);
441  }
442  else{
443  if(m_idHelperSvc->cscIdHelper().measuresPhi(stripId))
444  ATH_MSG_VERBOSE(" good id Measures Phi");
445  else
446  ATH_MSG_VERBOSE(" good id is eta");
447  }
448 
449  Chrono chronoAfterId2(m_chronoSvc,"afterID2");
450 
451  //Get samples. Each shows amplitude of pulse at different
452  //time slice.
453  std::vector<uint16_t> samples;
454  cluster->samples(stripItr,samplesPerStrip,samples);
455 
456  //Test for threshold breach...
457  size_t sampCnt = 0;
458 
459 
460  for(const auto & thisSample: samples)
461  {
462  (*m_ampHists)[stripHash]->Fill(thisSample);
463  if(m_doSampleHists)
464  (*((*m_sampHists)[stripHash]))[sampCnt]->Fill(thisSample);
465  if(m_bitHists && sampCnt==1)
466  {
467  TH2F* prodHist = nullptr;
468  if(m_bitProds)
469  prodHist = (*m_bitProds)[stripHash];
470  if(!fillBitHist((*m_bitHists)[stripHash],thisSample, prodHist).isSuccess())
471  ATH_MSG_WARNING("Failed recording bits for strip " << stripHash);
472  }//end if(m_bitHists)
473 
474  if(m_doOnlineDbFile){//m_doF001){
475  //test if any samples are obvoe the online threshold
476  if (thisSample > m_onlineThresholds[stripHash] ){
477  m_onlineThresholdFailureCount[stripHash]++;
478  ATH_MSG_VERBOSE("StripHash: " << stripHash <<
479  " has online threshold breach. Sample: " << thisSample << " Thold: "
480  << m_onlineThresholds[stripHash]);
481  }
482  }
483  sampCnt++;
484  }//end Sample loop
485  }//end strip loop
486  }//end cluster loop
487  }
488  else
489  ATH_MSG_DEBUG("There is an empty rod (CscRawDataContainer).");
490  }//end rod loop
491  ATH_MSG_DEBUG("end collectEventInfo()");
492  return StatusCode::SUCCESS;
493  }// 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::CscCalcPed::execute ( void  )

Definition at line 284 of file CscCalcPed.cxx.

285  {
286  ATH_MSG_DEBUG("Begin execute");
287  //collectEventInfo collects infomation about each event by filling ampHistCollection and peaktHist.
289 
290  if(!sc.isSuccess())
291  {
292  ATH_MSG_ERROR("There was an error collecting information from the RDO this event.");
293  return StatusCode::RECOVERABLE;
294  }
295  ATH_MSG_DEBUG("End execute");
296  return StatusCode::SUCCESS;
297  } //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::CscCalcPed::fillBitHist ( TH1I bitHist,
const uint16_t &  val,
TH2F bitProds 
)
inlineprivate

Definition at line 139 of file CscCalcPed.h.

140  {
141  if(!bitHist)
142  return StatusCode::RECOVERABLE;
143 
144  //Num bits should always be m_numBits
145  std::bitset<12> bitVal(val);
146 
147  for(unsigned int bitIndex = 0; bitIndex < m_numBits; bitIndex++){
148  if(bitVal[bitIndex]){
149  bitHist->Fill(bitIndex);
150  if(bitProds){
151  for(unsigned int bitIndex2 = 0 ; bitIndex2 <= bitIndex ; bitIndex2++) {
152  if(bitVal[bitIndex2]){
153  bitProds->Fill(bitIndex,bitIndex2);
154  if(bitIndex != bitIndex2)
155  bitProds->Fill(bitIndex2,bitIndex);
156  }
157 
158  }
159  }
160  }
161 
162  }
163 
164 
165  return StatusCode::SUCCESS;
166  }

◆ finalize()

StatusCode MuonCalib::CscCalcPed::finalize ( void  )

Definition at line 299 of file CscCalcPed.cxx.

299  {
300  if(m_eventCnt ==0)
301  {
302  ATH_MSG_FATAL("No events processed!");
303  return StatusCode::FAILURE;
304  }
305  else
306  ATH_MSG_INFO("In finalize() after analyzing " << m_eventCnt << " events ");
307 
308  StatusCode sc;
309 
310  ATH_MSG_INFO("not dump all hists!");
311 
312  //calculateParameters() finds means and fits gain curves from the data in
313  //m_ampHistCollection and/or m_peaktHist
315  if(!sc.isSuccess())
316  {
317  ATH_MSG_FATAL("Calculation of parameters failed!");
318  return StatusCode::FAILURE;
319  }
320  ATH_MSG_DEBUG("Finished calculating parameters");
321 
322 
323  //writeCalibrationFile() writes the calculated parameters into a calibration fie.
325  if(!sc.isSuccess())
326  {
327  ATH_MSG_FATAL("Calculation of parameters failed!");
328  return StatusCode::FAILURE;
329  }
330 
331  //Record report (ampHists) and results to storegate for future algorithms
332  //like COOL database storage or monitoring to collect
333  sc =storeGateRecord();
334  if (!sc.isSuccess())
335  {
336  ATH_MSG_FATAL("Failed recording data in storegate");
337  return StatusCode::FAILURE;
338  }
339 
340  ATH_MSG_INFO("Finished finalize");
341  return StatusCode::SUCCESS;
342  }//end finalize()

◆ GetMinMax()

template<typename dataType >
dataType MuonCalib::CscCalcPed::GetMinMax ( std::vector< dataType > &  vec)
inlineprivate

Definition at line 74 of file CscCalcPed.h.

74  {
75  const auto [pMin, pMax] = std::minmax_element(vec.begin(), vec.end());
76  return *pMax - *pMin;
77  }

◆ hashToChamberName()

StatusCode MuonCalib::CscCalcPed::hashToChamberName ( IdentifierHash  ,
std::string   
)
private

Utility functions.

◆ initialize()

StatusCode MuonCalib::CscCalcPed::initialize ( void  )

basic required functions

Store Gate active store

Definition at line 68 of file CscCalcPed.cxx.

69  {
70  ATH_MSG_INFO("CscCalcPed::initialize() called");
71 
72  if(m_doOnlineDbFile && m_onlineDbFile ==""){
73  ATH_MSG_FATAL("Either specify an OnlineCalibFile or set CompareOnlineCalibFile to false");
74  return StatusCode::FAILURE;
75  }
76 
77  //*******Register services and tools *********/
79 
80  ATH_CHECK(m_idHelperSvc.retrieve());
81 
83 
84  ATH_CHECK(service("ChronoStatSvc",m_chronoSvc));
85 
86  ATH_CHECK(m_cscRdoDecoderTool.retrieve());
87 
88  IToolSvc* toolSvc=nullptr;
89  ATH_CHECK(service("ToolSvc",toolSvc));
90 
91  //Set to SG::VIEW_ELEMENTS, since we want root to do its own memory
92  //management.
96 
97  //Loop through ids to find out what hash range we're working on (in case we're using some
98  //unusual geometry)
99  const std::vector<Identifier> &ids = m_idHelperSvc->cscIdHelper().idVector();
100 
101 
102  m_maxStripHash = 0;
103 
104  for(const auto &thisChamberId: ids)
105  {
106  std::vector<Identifier> stripVect;
107  m_idHelperSvc->cscIdHelper().idChannels(thisChamberId,stripVect);
108 
109 
110 
111  for(const auto & thisStrip: stripVect)
112  {
113  IdentifierHash stripHash;
114  m_idHelperSvc->cscIdHelper().get_channel_hash(thisStrip,stripHash);
115  if((unsigned int)stripHash > m_maxStripHash)
116  m_maxStripHash = (int)stripHash;
117  }//End strip loop
118  }//end chamber loop
119 
120 
121  //Now creating ampHists. It wasn't done in last loop since there
122  //is no gaurantee that it will come out in strip order, and we assume
123  //later that m_ampHists's index = stripHash
124  ATH_MSG_DEBUG("Preparing ampHists. Only allowing those for " << " chamberLayer " << m_expectedChamberLayer);
125  for(unsigned int stripItr = 0 ; stripItr <=m_maxStripHash; stripItr++)
126  {
127 
128  IdentifierHash stripHash =stripItr;
129  Identifier stripId;
130  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
131  m_idHelperSvc->cscIdHelper().get_id(stripHash, stripId, &channelContext);
132 
133  int chamLayer = m_idHelperSvc->cscIdHelper().chamberLayer(stripId);
134  if(chamLayer == m_expectedChamberLayer) //Only second chamber layer exists
135  {
136  int stationEta = m_idHelperSvc->cscIdHelper().stationEta(stripId);
137  int stationPhi = m_idHelperSvc->cscIdHelper().stationPhi(stripId);
138  int stripNumber = m_idHelperSvc->cscIdHelper().strip(stripId);
139  int wireLayer = m_idHelperSvc->cscIdHelper().wireLayer(stripId);
140  char orientation = m_idHelperSvc->cscIdHelper().measuresPhi(stripId) ? 'Y':'X';
141 
142 
143  char name[30],titleSeed[600];
144  TH1I* hist = nullptr;
145 
146  int stationName = m_idHelperSvc->cscIdHelper().stationName(stripId);
147  //Amplitude histogram
148  sprintf(name, "ampHist%u",stripItr);
149  sprintf(titleSeed, "Amplitude Histogram for eta %d, sector %d, layer %d%c, strip %d",
150  stationEta,(2*stationPhi+50 - stationName),wireLayer,orientation,stripNumber);
151  std::string title = m_titlePrefix + titleSeed + m_titlePostfix;
152 
155  hist->GetXaxis()->SetTitle("Amplitude (ADC value)");
156  hist->GetYaxis()->SetTitle("Counts");
158 
159  if(m_doSampleHists) {
161  for(int cnt = 0; cnt < m_numSamplesExpected ; cnt++) {
162  sprintf(name, "sampHist%u_%d",stripItr,cnt);
163  sprintf(titleSeed, "Amplitude Histogram for eta %d, sector %d, layer %d%c, strip %d, sample %d",
164  stationEta,(2*stationPhi+50 - stationName),wireLayer,orientation,stripNumber,cnt);
165 
168  tempVect->push_back(hist);
169 
170  }
171  m_sampHists->push_back(tempVect);
172  }
173 
174  if(m_bitHists)
175  {
176  //Bit histogram (for looking for stuck-bits)
177  sprintf(name, "bitHist%u",stripItr);
178  sprintf(titleSeed, "Bit histogram for eta %d, sector %d, layer %d%c strip %d",
179  stationEta,(2*stationPhi+50 - stationName),wireLayer,orientation,stripNumber);
180  title = m_titlePrefix + titleSeed + m_titlePostfix;
181  hist = new TH1I(name, title.c_str(), m_numBits, 0, m_numBits); //12 bits
182  hist->GetXaxis()->SetTitle("Bit");
183  hist->GetYaxis()->SetTitle("Counts");
185  if(m_doCorrelation) {
186  (*m_bitProds)[stripItr] = new TH2F(TString::Format("bitProds%d",stripItr),"Bit products", m_numBits,0,m_numBits, m_numBits, 0, m_numBits);
187 
188  }
189  }
190  }
191  else
192  {
193  m_ampHists->push_back(nullptr);
194  if(m_bitHists) m_bitHists->push_back(nullptr);
195  if(m_doSampleHists) m_sampHists->push_back(nullptr);
196  }
197  }//end strip loop
198 
199  //Setup result collections. These will be passed to storegate for any monitoring later
200  m_peds = new CscCalibResultCollection("ped");
201  m_noises = new CscCalibResultCollection("noise");
202  m_rmses = new CscCalibResultCollection("rms");
203  if(m_doF001){
204  ATH_MSG_DEBUG("Doing f001");
205  //For f001 values
206  m_f001s = new CscCalibResultCollection("f001");
207 
208  //Initializing for comparing new values to an online database file
209  if(m_doOnlineDbFile){
210 
211  //How many samples failed the online threshold test of f001 +2*RMS
212  //(f001 and RMS read from a file from online configuration db)
213  m_onlineTHoldBreaches = new CscCalibResultCollection("OnlTHoldBreaches");
214 
215 
216 
217  //Vector we use to count the online thresholds
219 
220  //Retrieve current online thresholds
222  std::ifstream ifile; ifile.open(m_onlineDbFile.c_str());
223  if(!ifile.is_open()){
224  ATH_MSG_FATAL("Failed to open online database file " << m_onlineDbFile);
225  return StatusCode::FAILURE;
226  }
227  std::string buf;
228  ifile >> buf; // skip 32 at start of file
229  unsigned int onlineId;
230  unsigned int hashId;
231  double rms;
232  double f001;
233 
234  if(!ifile){
235  ATH_MSG_FATAL("Problem with file after one word read in.");
236  return StatusCode::FAILURE;
237  }
238 
239 
240  ATH_MSG_DEBUG("Reading in online thresholds from file " << m_onlineDbFile);
241  ATH_MSG_DEBUG("First (junk) word: " << buf);
242  int chanCnt = 0;
243  while(ifile >> std::hex >> onlineId >> std::dec) {
244  chanCnt++;
245  onlineToOfflineHashId(onlineId,hashId);
246 
247  ifile >> buf >> buf >> buf >> buf >> rms >> buf >> f001;
248  double thold = f001 + 2*rms;
249  ATH_MSG_VERBOSE("onlid: " << std::hex << onlineId << std::dec << " hash: " << hashId << " rms: " << rms << " f001: " << f001 << " thold: " << thold);
250  m_onlineThresholds.at(hashId) = thold;
251  if(!ifile)
252  ATH_MSG_VERBOSE("input file is done, ready to close!");
253  else
254  ATH_MSG_VERBOSE("Input file still good!");
255 
256 
257  }
258  if(chanCnt != 30720){
259  ATH_MSG_FATAL("Did not retrieve expected 30720 channels from online database! Retrieved: " << chanCnt);
260  ATH_MSG_FATAL("Last onlineId read: " << std::hex << onlineId << std::dec);
261  return StatusCode::FAILURE;
262  }
263 
264  }//if m_doOnlineDBFile
265  }//db file
266 
267  ATH_MSG_INFO("highest strip hash id is " << m_maxStripHash);
268 
269  //If we're doing correlation plots, set up the product histogram array
270  if(m_doCorrelation){
273  }
274 
275 
276 
277 
278 
279  ATH_MSG_INFO("m_prods value: " << m_bitProds << "\ndoCorrelation" << m_doCorrelation);
280  return StatusCode::SUCCESS;
281  }

◆ 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.

◆ makeBitCorrelation()

DataVector< TH2F > * MuonCalib::CscCalcPed::makeBitCorrelation ( )
private

Definition at line 859 of file CscCalcPed.cxx.

859  {
860 
861  if(!m_bitProds || !m_bitHists)
862  return nullptr;
863 
865  correlations->resize(m_maxStripHash +1);
866 
867  for(unsigned int hashItr =0; hashItr <= m_maxStripHash; hashItr++) {
868  IdentifierHash stripHash =hashItr;
869  Identifier stripId;
870  IdContext channelContext = m_idHelperSvc->cscIdHelper().channel_context();
871  m_idHelperSvc->cscIdHelper().get_id(stripHash, stripId, &channelContext);
872 
873  int chamLayer = m_idHelperSvc->cscIdHelper().chamberLayer(stripId);
874  if(chamLayer == m_expectedChamberLayer) //Only second chamber layer exists
875  {
876  int stationName = m_idHelperSvc->cscIdHelper().stationName(stripId);
877  //int stationEta = m_idHelperSvc->cscIdHelper().stationEta(stripId);
878  int stationPhi = m_idHelperSvc->cscIdHelper().stationPhi(stripId);
879  int stripNumber = m_idHelperSvc->cscIdHelper().strip(stripId);
880  int wireLayer = m_idHelperSvc->cscIdHelper().wireLayer(stripId);
881  char orientation = m_idHelperSvc->cscIdHelper().measuresPhi(stripId) ? 'Y':'X';
882 
883  int sector = 2*stationPhi + 50 - stationName;
884 
885  std::stringstream name;
886  name << "h_bitCorr_sector_" << std::setfill('0') << std::setw(2) << sector <<
887  "_lay_" << wireLayer << orientation << "_strip_" << std::setw(3) << stripNumber;
888  std::stringstream title;
889  title << "h_bitCorr_sector_" << std::setfill('0') << std::setw(2) << sector <<
890  "_lay_" << wireLayer << orientation << "_strip_" << std::setw(3) << stripNumber;
891 
892  TH2F* correlationHist = new TH2F(
893  name.str().c_str(),
894  title.str().c_str(),
895  m_numBits, 0, m_numBits,
896  m_numBits, 0, m_numBits
897  );
898  (*correlations)[hashItr] = correlationHist;
899 
900  //each amphis is filled exaclty the number of times the bits are sampled,
901  //so its a good place to get n
902  double n = (*m_ampHists)[hashItr]->GetEntries();
903  TH1I * bitHist = (*m_bitHists)[hashItr];
904  TH2F * bitProds = (*m_bitProds)[hashItr];
905  for(unsigned int bit1 = 1; bit1 <=m_numBits; bit1++){
906  for(unsigned int bit2 = 1; bit2 <=bit1; bit2++){
907 
908  float xy = bitProds->GetBinContent(bit1,bit2);
909  float x = bitHist->GetBinContent(bit1);
910  float y = bitHist->GetBinContent(bit2);
911 
912  float r;
913  float denom = (n*x-x*x)*(n*y-y*y);
914  if(denom <= 0 )
915  r= 0;
916  else
917  r = (n*xy - x*y)/std::sqrt(denom);
918 
919  //Pearson r
920  correlationHist->SetBinContent(bit1,bit2,r);
921  if(bit1!=bit2)
922  correlationHist->SetBinContent(bit2,bit1,r);
923 
924 
925  }
926  }
927  }
928  }
929  return correlations;
930  }//end makeBitCorrelations

◆ 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  }

◆ onlineToOfflineHashId()

void MuonCalib::CscCalcPed::onlineToOfflineHashId ( const unsigned int &  onlineId,
unsigned int &  hashId 
) const
private

Definition at line 933 of file CscCalcPed.cxx.

934  {
935  int stationName = ((onlineId >> 16)&0x1) + 50;
936  int phi = ((onlineId >> 13)&0x7)+1;
937  int eta = ((((onlineId >> 12)&0x1) == 1) ? 1:-1);
938  int chamLay = ((onlineId>>11)&0x1) +1;
939  int wireLay = ((onlineId>>9)&0x3) +1;
940  int measuresPhi = ((onlineId >> 8)&0x1);
941  int strip;
942 
943  // Online and offline phi ids are flipped on A wheel
944  if( measuresPhi && eta == 1){
945  strip = 48 - ((onlineId)&0xff) ; //equivalent: 49 -( onlineId&0xff +1)
946  }
947  else {
948  strip = ((onlineId)&0xff) +1;
949  }
950 
951  Identifier chanId = m_idHelperSvc->cscIdHelper().channelID(stationName,eta,phi,chamLay,wireLay,measuresPhi,strip);
952 
953  IdentifierHash chanHash;
954  m_idHelperSvc->cscIdHelper().get_channel_hash(chanId, chanHash);
955 
956  hashId = (unsigned int)chanHash;
957 
958  }

◆ 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::CscCalcPed::outputParameter3 ( const CscCalibResultCollection results,
std::ofstream &  out 
)
private

Definition at line 770 of file CscCalcPed.cxx.

770  {
771 
773  const CscCondDbData* readCdo{*readHandle};
774 
775  out << "\n";
776  out << "<NEW_PAR> " << results.parName() << "\n";
777  std::string idString;
778 
781  for(; resItr != resEnd; ++resItr){
782  unsigned int hashId = (*resItr)->hashId();
783  double value = (*resItr)->value();
784  std::string idString;
785 
786  readCdo->indexToStringId(&m_idHelperSvc->cscIdHelper(), hashId, "CHANNEL", idString).ignore();
787 
788  out << idString << " " << value << "\n";
789  }
790 
791  out << "<END_PAR>" ;
792  }

◆ 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::CscCalcPed::storeGateRecord ( )
private

Definition at line 798 of file CscCalcPed.cxx.

799  {
800  StatusCode sc = StatusCode::SUCCESS;
801 
802  bool thereIsAnError = false;
803 
804  std::string histKey = "cscPedCalibReport";
805  ATH_MSG_DEBUG("Recording pedestal amplitude histograms to TDS with key " << histKey);
806 
807  //CscCalibReport has extraraneous monitoring information
808  CscCalibReportPed * report = new CscCalibReportPed("pedAmps");
809  report->setPedAmpHists(m_ampHists); //report now has ownership of the DataVector
810  report->setBitHists(m_bitHists); //report now has ownership of the DataVector
811  if(m_doSampleHists){
812  report->setSampHists(m_sampHists);
813  }
814  if(m_bitProds){
815  report->setBitCorrelation( makeBitCorrelation());
816  }
817 
818  CscCalibReportContainer * repCont = new CscCalibReportContainer(histKey);
819  repCont->push_back(report);
820 
821  sc = evtStore()->record(repCont, histKey);
822  if(!sc.isSuccess())
823  {
824  ATH_MSG_ERROR("Failed to record CscCalibReportPed to storegate");
825  thereIsAnError = true;
826  delete repCont;
827  }
828 
829 
830  //CscCalibResult contains the actual parameters that we recorded, mostly things that should be entered
831  //into cool
832  std::string key = "CscCalibResultPed";
833  ATH_MSG_DEBUG("Recording calibration results to TDS with key " << key);
834 
835  CscCalibResultContainer * calibResults
836  = new CscCalibResultContainer("CscCalibResultPed");
837  calibResults->push_back(m_peds);
838  calibResults->push_back(m_noises);
839  calibResults->push_back(m_rmses);
840  calibResults->push_back(m_f001s);
841  if(m_doOnlineDbFile)
842  calibResults->push_back(m_onlineTHoldBreaches);
843 
844  sc = evtStore()->record(calibResults,key);
845  if(!sc.isSuccess())
846  {
847  ATH_MSG_ERROR("Failed to record data to storegate");
848  thereIsAnError = true;
849  delete calibResults;
850  }
851 
852  if(thereIsAnError)
853  return StatusCode::RECOVERABLE;
854 
855  return StatusCode::SUCCESS;
856  }

◆ 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::CscCalcPed::writeCalibrationFile ( )
private

Definition at line 582 of file CscCalcPed.cxx.

583  {
584  Chrono chrono(m_chronoSvc,"writeFile");
585  //***Take conditions data held in summary histograms and print to the calibration file***//
586  ATH_MSG_INFO("Parameters calculated, preparing to output to file: " << m_outputFileName << " Types 1 and " << m_calOutputVersion);
587 
588  ATH_CHECK( calOutput1() );
589 
590  if(m_calOutputVersion == "00-00"){
591  return calOutput0();
592  }
593  else if(m_calOutputVersion == "03-00") {
594  return calOutput3();
595  }
596  else{
597  ATH_MSG_WARNING("Don't know how to write calibration file version " << m_calOutputVersion);
598  return StatusCode::RECOVERABLE;
599  }
600  // this part of the code cannot be reached since one of the if statements before already exits the code
601  // return StatusCode::SUCCESS;
602  }

Member Data Documentation

◆ m_ampHistHighBound

unsigned int MuonCalib::CscCalcPed::m_ampHistHighBound
private

Definition at line 105 of file CscCalcPed.h.

◆ m_ampHistLowBound

unsigned int MuonCalib::CscCalcPed::m_ampHistLowBound
private

Definition at line 105 of file CscCalcPed.h.

◆ m_ampHistNumBins

unsigned int MuonCalib::CscCalcPed::m_ampHistNumBins
private

Definition at line 105 of file CscCalcPed.h.

◆ m_ampHists

DataVector<TH1I>* MuonCalib::CscCalcPed::m_ampHists
private

Definition at line 116 of file CscCalcPed.h.

◆ m_bitCorrelation

DataVector<TH1F>* MuonCalib::CscCalcPed::m_bitCorrelation
private

Definition at line 120 of file CscCalcPed.h.

◆ m_bitHists

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

Definition at line 118 of file CscCalcPed.h.

◆ m_bitProds

DataVector<TH2F>* MuonCalib::CscCalcPed::m_bitProds
private

Definition at line 119 of file CscCalcPed.h.

◆ m_calOutputVersion

std::string MuonCalib::CscCalcPed::m_calOutputVersion
private

Definition at line 92 of file CscCalcPed.h.

◆ m_chronoSvc

IChronoStatSvc* MuonCalib::CscCalcPed::m_chronoSvc
private

Definition at line 84 of file CscCalcPed.h.

◆ m_cmt_parameter

std::string MuonCalib::CscCalcPed::m_cmt_parameter
private

Definition at line 132 of file CscCalcPed.h.

◆ m_crossTalkFix

double* MuonCalib::CscCalcPed::m_crossTalkFix
private

Definition at line 129 of file CscCalcPed.h.

◆ m_cscRdoDecoderTool

ToolHandle<Muon::ICSC_RDO_Decoder> MuonCalib::CscCalcPed::m_cscRdoDecoderTool {this,"CscRdoDecoderTool","Muon::CscRDO_Decoder"}
private

Definition at line 85 of file CscCalcPed.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_doBitHists

bool MuonCalib::CscCalcPed::m_doBitHists
private

Definition at line 109 of file CscCalcPed.h.

◆ m_doCorrelation

bool MuonCalib::CscCalcPed::m_doCorrelation
private

Definition at line 93 of file CscCalcPed.h.

◆ m_doF001

bool MuonCalib::CscCalcPed::m_doF001
private

Definition at line 114 of file CscCalcPed.h.

◆ m_doOnlineDbFile

bool MuonCalib::CscCalcPed::m_doOnlineDbFile
private

Definition at line 134 of file CscCalcPed.h.

◆ m_doSampleHists

bool MuonCalib::CscCalcPed::m_doSampleHists
private

Definition at line 110 of file CscCalcPed.h.

◆ m_eventCnt

int MuonCalib::CscCalcPed::m_eventCnt
private

Definition at line 128 of file CscCalcPed.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::CscCalcPed::m_expectedChamberLayer
private

Definition at line 98 of file CscCalcPed.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_f001s

CscCalibResultCollection* MuonCalib::CscCalcPed::m_f001s
private

Definition at line 126 of file CscCalcPed.h.

◆ m_idHelperSvc

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

Services and tools.

Definition at line 83 of file CscCalcPed.h.

◆ m_maxStripHash

unsigned int MuonCalib::CscCalcPed::m_maxStripHash
private

Internally global variables.

Definition at line 103 of file CscCalcPed.h.

◆ m_noises

CscCalibResultCollection* MuonCalib::CscCalcPed::m_noises
private

Definition at line 124 of file CscCalcPed.h.

◆ m_numBits

const unsigned int MuonCalib::CscCalcPed::m_numBits
private

Definition at line 107 of file CscCalcPed.h.

◆ m_numSamplesExpected

int MuonCalib::CscCalcPed::m_numSamplesExpected
private

Definition at line 112 of file CscCalcPed.h.

◆ m_onlineDbFile

std::string MuonCalib::CscCalcPed::m_onlineDbFile
private

filename for file with online database information

Definition at line 100 of file CscCalcPed.h.

◆ m_onlineTHoldBreaches

CscCalibResultCollection* MuonCalib::CscCalcPed::m_onlineTHoldBreaches
private

Definition at line 127 of file CscCalcPed.h.

◆ m_onlineThresholdFailureCount

std::vector<int> MuonCalib::CscCalcPed::m_onlineThresholdFailureCount
private

Definition at line 122 of file CscCalcPed.h.

◆ m_onlineThresholds

std::vector<int> MuonCalib::CscCalcPed::m_onlineThresholds
private

Definition at line 121 of file CscCalcPed.h.

◆ m_outputFileName

std::string MuonCalib::CscCalcPed::m_outputFileName
private

Parameters input through joboptions.

Definition at line 90 of file CscCalcPed.h.

◆ m_peds

CscCalibResultCollection* MuonCalib::CscCalcPed::m_peds
private

Definition at line 123 of file CscCalcPed.h.

◆ m_readKey

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

Definition at line 86 of file CscCalcPed.h.

◆ m_rmses

CscCalibResultCollection* MuonCalib::CscCalcPed::m_rmses
private

Definition at line 125 of file CscCalcPed.h.

◆ m_sampHists

DataVector< DataVector<TH1I> >* MuonCalib::CscCalcPed::m_sampHists
private

Definition at line 117 of file CscCalcPed.h.

◆ m_thresholdMultiplier

float MuonCalib::CscCalcPed::m_thresholdMultiplier
private

Definition at line 97 of file CscCalcPed.h.

◆ m_titlePostfix

std::string MuonCalib::CscCalcPed::m_titlePostfix
private

Definition at line 91 of file CscCalcPed.h.

◆ m_titlePrefix

std::string MuonCalib::CscCalcPed::m_titlePrefix
private

Definition at line 91 of file CscCalcPed.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:
MuonCalib::CscCalcPed::onlineToOfflineHashId
void onlineToOfflineHashId(const unsigned int &onlineId, unsigned int &hashId) const
Definition: CscCalcPed.cxx:933
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
TestSUSYToolsAlg.ifile
ifile
Definition: TestSUSYToolsAlg.py:92
beamspotman.r
def r
Definition: beamspotman.py:676
MuonCalib::CscCalcPed::m_chronoSvc
IChronoStatSvc * m_chronoSvc
Definition: CscCalcPed.h:84
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:129
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
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
MuonCalib::CscCalcPed::m_doSampleHists
bool m_doSampleHists
Definition: CscCalcPed.h:110
get_generator_info.result
result
Definition: get_generator_info.py:21
SiliconTech::strip
@ strip
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
MuonCalib::CscCalcPed::m_ampHists
DataVector< TH1I > * m_ampHists
Definition: CscCalcPed.h:116
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MuonCalib::CscCalcPed::m_eventCnt
int m_eventCnt
Definition: CscCalcPed.h:128
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MuonCalib::CscCalcPed::m_cscRdoDecoderTool
ToolHandle< Muon::ICSC_RDO_Decoder > m_cscRdoDecoderTool
Definition: CscCalcPed.h:85
MuonCalib::CscCalcPed::m_doF001
bool m_doF001
Definition: CscCalcPed.h:114
TH1I
Definition: rootspy.cxx:332
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
TH2F
Definition: rootspy.cxx:420
MuonCalib::CscCalcPed::m_thresholdMultiplier
float m_thresholdMultiplier
Definition: CscCalcPed.h:97
CscCalibResult
Definition: CscCalibResult.h:19
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
plotmaker.hist
hist
Definition: plotmaker.py:148
StateLessPT_NewConfig.Format
Format
Definition: StateLessPT_NewConfig.py:146
MuonCalib::CscCalcPed::m_readKey
SG::ReadCondHandleKey< CscCondDbData > m_readKey
Definition: CscCalcPed.h:86
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
IdentifiableContainerMT::size
size_t size() const
Duplicate of fullSize for backwards compatability.
Definition: IdentifiableContainerMT.h:209
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
checkTP.report
report
Definition: checkTP.py:127
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
MuonCalib::CscCalcPed::m_crossTalkFix
double * m_crossTalkFix
Definition: CscCalcPed.h:129
MuonCalib::CscCalcPed::m_ampHistNumBins
unsigned int m_ampHistNumBins
Definition: CscCalcPed.h:105
MuonCalib::CscCalcPed::fillBitHist
StatusCode fillBitHist(TH1I *bitHist, const uint16_t &val, TH2F *bitProds)
Definition: CscCalcPed.h:139
MuonCalib::CscCalcPed::calculateParameters
StatusCode calculateParameters()
Finalize functions.
Definition: CscCalcPed.cxx:498
athena.value
value
Definition: athena.py:122
CscCalibReportContainer
Definition: CscCalibReportContainer.h:25
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonCalib::CscCalcPed::m_onlineThresholds
std::vector< int > m_onlineThresholds
Definition: CscCalcPed.h:121
MuonCalib::CscCalcPed::m_numBits
const unsigned int m_numBits
Definition: CscCalcPed.h:107
MuonCalib::CscCalcPed::m_bitProds
DataVector< TH2F > * m_bitProds
Definition: CscCalcPed.h:119
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
x
#define x
MuonCalib::CscCalcPed::collectEventInfo
StatusCode collectEventInfo()
event loop functions
Definition: CscCalcPed.cxx:346
MuonCalib::CscCalcPed::calOutput3
StatusCode calOutput3()
Definition: CscCalcPed.cxx:747
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonCalib::CscCalcPed::m_outputFileName
std::string m_outputFileName
Parameters input through joboptions.
Definition: CscCalcPed.h:90
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
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
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
MuonCalib::CscCalcPed::m_f001s
CscCalibResultCollection * m_f001s
Definition: CscCalcPed.h:126
MuonCalib::CscCalcPed::calOutput1
StatusCode calOutput1()
Definition: CscCalcPed.cxx:667
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
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
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
covarianceTool.title
title
Definition: covarianceTool.py:542
MuonCalib::CscCalcPed::m_bitCorrelation
DataVector< TH1F > * m_bitCorrelation
Definition: CscCalcPed.h:120
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
MuonCalib::CscCalcPed::m_ampHistLowBound
unsigned int m_ampHistLowBound
Definition: CscCalcPed.h:105
MuonCalib::CscCalcPed::m_titlePrefix
std::string m_titlePrefix
Definition: CscCalcPed.h:91
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
MuonCalib::CscCalcPed::m_doOnlineDbFile
bool m_doOnlineDbFile
Definition: CscCalcPed.h:134
MuonCalib::CscCalcPed::m_noises
CscCalibResultCollection * m_noises
Definition: CscCalcPed.h:124
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
DataVector< TH1I >
TH2F::GetBinContent
double GetBinContent(int) const
Definition: rootspy.cxx:425
CscCalibResultContainer
Definition: CscCalibResultContainer.h:22
compute_lumi.denom
denom
Definition: compute_lumi.py:76
MuonCalib::CscCalcPed::m_onlineDbFile
std::string m_onlineDbFile
filename for file with online database information
Definition: CscCalcPed.h:100
TH2F::SetBinContent
void SetBinContent(int, double)
Definition: rootspy.cxx:426
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
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
MuonCalib::CscCalcPed::m_titlePostfix
std::string m_titlePostfix
Definition: CscCalcPed.h:91
MuonCalib::CscCalcPed::m_rmses
CscCalibResultCollection * m_rmses
Definition: CscCalcPed.h:125
DataVector::resize
void resize(size_type sz)
Resizes the collection to the specified number of elements.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
MuonCalib::CscCalcPed::m_onlineTHoldBreaches
CscCalibResultCollection * m_onlineTHoldBreaches
Definition: CscCalcPed.h:127
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
threshold
Definition: chainparser.cxx:74
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
python.ami.results
def results
Definition: ami.py:386
MuonCalib::CscCalcPed::m_maxStripHash
unsigned int m_maxStripHash
Internally global variables.
Definition: CscCalcPed.h:103
MuonCalib::CscCalcPed::m_doCorrelation
bool m_doCorrelation
Definition: CscCalcPed.h:93
Example_ReadSampleNoise.ped
ped
Definition: Example_ReadSampleNoise.py:45
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
MuonCalib::CscCalcPed::m_sampHists
DataVector< DataVector< TH1I > > * m_sampHists
Definition: CscCalcPed.h:117
MuonCalib::CscCalcPed::writeCalibrationFile
StatusCode writeCalibrationFile()
Definition: CscCalcPed.cxx:582
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
y
#define y
h
CscCalibResultCollection
Definition: CscCalibResultCollection.h:24
trigbs_pickEvents.cnt
cnt
Definition: trigbs_pickEvents.py:71
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
CscRawDataContainer
This container provides access to collections of CSC RDOs and a mechanism for recording them.
Definition: CscRawDataContainer.h:23
beamspotnt.rms
rms
Definition: bin/beamspotnt.py:1266
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
MuonCalib::CscCalcPed::m_expectedChamberLayer
int m_expectedChamberLayer
Definition: CscCalcPed.h:98
MuonCalib::CscCalcPed::m_doBitHists
bool m_doBitHists
Definition: CscCalcPed.h:109
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
MuonCalib::CscCalcPed::m_ampHistHighBound
unsigned int m_ampHistHighBound
Definition: CscCalcPed.h:105
MuonCalib::CscCalcPed::calOutput0
StatusCode calOutput0()
Definition: CscCalcPed.cxx:604
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
TH1I::GetBinContent
double GetBinContent(int) const
Definition: rootspy.cxx:337
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
MuonCalib::CscCalcPed::outputParameter3
void outputParameter3(const CscCalibResultCollection &results, std::ofstream &out)
Definition: CscCalcPed.cxx:770
MuonCalib::CscCalcPed::makeBitCorrelation
DataVector< TH2F > * makeBitCorrelation()
Definition: CscCalcPed.cxx:859
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:127
MuonCalib::CscCalcPed::m_calOutputVersion
std::string m_calOutputVersion
Definition: CscCalcPed.h:92
IdentifierHash
Definition: IdentifierHash.h:38
MuonCalib::CscCalcPed::m_peds
CscCalibResultCollection * m_peds
Definition: CscCalcPed.h:123
MuonCalib::CscCalcPed::m_numSamplesExpected
int m_numSamplesExpected
Definition: CscCalcPed.h:112
CscCalibReportPed
Definition: CscCalibReportPed.h:25
IdContext
class IdContext
Definition: IdContext.h:34
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
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::CscCalcPed::m_bitHists
DataVector< TH1I > * m_bitHists
Definition: CscCalcPed.h:118
MuonCalib::CscCalcPed::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Services and tools.
Definition: CscCalcPed.h:83
MuonCalib::CscCalcPed::storeGateRecord
StatusCode storeGateRecord()
Definition: CscCalcPed.cxx:798
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
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
MuonCalib::CscCalcPed::m_onlineThresholdFailureCount
std::vector< int > m_onlineThresholdFailureCount
Definition: CscCalcPed.h:122
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37