ATLAS Offline Software
L1CaloPprPhos4ShapeMaker.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "TH2F.h"
8 #include "TStyle.h"
9 #include "TFile.h"
10 
11 L1CaloPprPhos4ShapeMaker::L1CaloPprPhos4ShapeMaker(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator),
12  m_signalShapes(0),
13  m_histTool("TrigT1CaloLWHistogramTool"),
14  m_currentDatabaseMapsFilled(false),
15  m_l1aFadcSlice(0),
16  m_triggerTowers(0),
17  m_rodHeader(0),
18  m_runNumber(0),
19  m_attrList(0),
20  m_l1CaloTTIdTools("LVL1::L1CaloTTIdTools/L1CaloTTIdTools"),
21  m_caloMgr(0),
22  m_ttSvc(0),
23  m_ttOnlineIdHelper(0),
24  m_lvl1Helper(0),
25  m_signalProfiles(0),
26  m_firstEvent(true),
27  m_minSignalHeight(0),
28  m_isTile(false),
29  m_isLAr(false)
30 {
31 
32 // declareProperty("UseTile",m_useTile = false);
33  declareProperty("outputDirectory",m_outputDirectory = ".");
34  declareProperty("minimumSignalSizeInAdcCounts",m_minSignalHeight = 30);
35  declareProperty("selectedCoolIds",m_selectedCoolIds);
36 
37  SetAtlasStyle();
38 }
39 
41  StatusCode sc;
42 
43  // The MsgStream is the athena replacement for std::cout and std::endl
44  // You can specify the level of output in your python jobOptions.py file
45  // Options are DEBUG, INFO, WARNING, ERROR, FATAL
46  // You can still use std::cout and std::endl, but I guess it's considered bad form.
47  ATH_MSG_INFO("In Initialize()");
48 
49 
50  // create selected histograms
51  for(unsigned int i=0;i<m_selectedCoolIds.size()&&i<m_maxSelectedCoolIds;++i){
52  char name[500];
53  sprintf(name,"selected_%08x",m_selectedCoolIds[i]);
54  TH2F *histo = new TH2F(name,name,15*25,0,15*25,1024,0,1024);
56  ATH_MSG_INFO("creating select histogram for: "<< std::hex << m_selectedCoolIds[i] << std::dec );
57  }
58 
59 
60 // m_l1CaloTTIdTools = 0;
61  m_caloMgr = 0;
62  m_ttSvc = 0;
63 // m_ttOnlineIdHelper = 0;
64  m_lvl1Helper = 0;
65 // m_cells2tt = 0;
66 
67  m_runNumber = 0;
68  m_attrList = 0;
69  m_pprChanCalibFolderName = "/TRIGGER/L1Calo/V1/Calibration/Calib1/PprChanCalib";
70  m_readoutConfigFolderName = "/TRIGGER/L1Calo/V1/Configuration/ReadoutConfig";
71  m_ppmDeadChannelsFolderName = "/TRIGGER/L1Calo/V1/Calibration/PpmDeadChannels";
72  m_l1caloDerivedRunParsFolderName = "/TRIGGER/L1Calo/V1/Conditions/DerivedRunPars";
73  m_l1caloRunParametersFolderName = "/TRIGGER/L1Calo/V1/Conditions/RunParameters";
74 
76  m_fullDataDelayName = "FullDelayData";
78  m_pedValueName = "PedValue";
79  m_currentPedValueMap.clear();
80  m_l1aFadcSliceName = "l1aFadcSlice";
81  m_l1aFadcSlice = 0;
82  m_errorCodeName = "ErrorCode";
83  m_timingRegimeName = "timingRegime";
84  m_timingRegime.clear();
85  m_ttcConfigurationName = "ttcConfiguration";
86  m_ttcConfiguration.clear();
87 
89 
91  ATH_MSG_INFO( "outputdir: " << m_outputDirectory );
93  ATH_MSG_INFO( "min signal height: " << m_minSignalHeight );
94 
95  // Setup all the Athena Services
96  sc = this->loadAthenaObjects();if(sc.isFailure()){return sc;}
97 
99 
100  m_firstEvent = true;
101 
102  return StatusCode::SUCCESS;
103 }
104 
106  // This section is for code that is run for each event.
107 
108  ATH_MSG_INFO("In execute()");
109  const EventContext& ctx = Gaudi::Hive::currentContext();
110 
111  if(m_runNumber == 0){
112  m_runNumber = ctx.eventID().run_number();
113 
114  ATH_MSG_INFO("Run Number: " << m_runNumber );
116  }
117 
118  uint64_t eventNum = ctx.eventID().event_number();
119 
120  // Retrieve the Database parameters.
121  // Only need to do this once because they do not change from event to event.
123 
124  ATH_MSG_INFO( "Getting database handle for folder " << m_readoutConfigFolderName );
125 
126 
127 
128  // first open the ReadoutConfig folder so I can see in which bunch
129  // the peak should be located.
130 
132  if(sc.isFailure()){
133  ATH_MSG_INFO( "Failed to retrieve database handle: " << m_readoutConfigFolderName );
134  return sc;
135  }
136 
137  // should really only be one entry, but still will catch everything
139 
140  for(;attrListCollItr != m_attrList->end();++attrListCollItr){
141  const coral::AttributeList* attrList = &(attrListCollItr->second);
142 
143  m_l1aFadcSlice = (*attrList)[m_l1aFadcSliceName].data<unsigned int>();
144  // look at the next loop to find where I fill this value into the
145  // collection
146 
147  } // end for(attrList)
148 
149  // now retreive the timingRegime from the DerivedRunPars folder
150  ATH_MSG_INFO( "Getting database handle for folder " << m_l1caloDerivedRunParsFolderName );
151 
153  if(sc.isFailure()){
154  ATH_MSG_INFO( "Failed to retrieve database handle: " << m_l1caloDerivedRunParsFolderName );
155  return sc;
156  }
157 
158  // should really only be one entry, but still will catch everything
159  attrListCollItr = m_attrList->begin();
160 
161  for(;attrListCollItr != m_attrList->end();++attrListCollItr){
162  const coral::AttributeList* attrList = &(attrListCollItr->second);
163 
164  m_timingRegime = (*attrList)[m_timingRegimeName].data<std::string>();
165 
166  } // end for(attrList)
167  // set timingRegime for SignalShapeCollection and databases
169 
170  // now retreive the ttcConfiguration from the RunParameters folder
171  // this allows to check if LAr or Tile is being used.
172  ATH_MSG_INFO( "Getting database handle for folder " << m_l1caloRunParametersFolderName );
173 
175  if(sc.isFailure()){
176  ATH_MSG_INFO( "Failed to retrieve database handle: " << m_l1caloRunParametersFolderName );
177  return sc;
178  }
179 
180  // should really only be one entry, but still will catch everything
181  attrListCollItr = m_attrList->begin();
182 
183  for(;attrListCollItr != m_attrList->end();++attrListCollItr){
184  const coral::AttributeList* attrList = &(attrListCollItr->second);
185 
186  m_ttcConfiguration = (*attrList)[m_ttcConfigurationName].data<std::string>();
187 
188  if(m_ttcConfiguration.find("LAr") != std::string::npos){
189  ATH_MSG_INFO( " This is a LAr run." );
190  m_isLAr = true;
191  m_isTile = false;
192  m_signalShapes->SetLArRun(true);
193  }
194  else if(m_ttcConfiguration.find("Tile") != std::string::npos){
195  ATH_MSG_INFO( " This is a Tile run." );
196  m_isLAr = false;
197  m_isTile = true;
198  m_signalShapes->SetTileRun(true);
199  }
200  else{
201  ATH_MSG_INFO( " Could not determine Tile or LAr so all channels will be processed." );
202  m_isLAr = false;
203  m_isTile = false;
204  }
205 
206  } // end for(attrList)
207 
208 
209 
210  ATH_MSG_INFO( "Getting database handle for folder " << m_pprChanCalibFolderName );
211  // now retrieve the PprChanCalib folder so I can
212  // get the FullDelayData and the pedestal value
213 
215  if(sc.isFailure()){
216  ATH_MSG_INFO( "Failed to retrieve database handle." );
217  return sc;
218  }
219 
220  attrListCollItr = m_attrList->begin();
221 
222  for(;attrListCollItr != m_attrList->end();++attrListCollItr){
223 
224  const unsigned int coolId = attrListCollItr->first;
225 
226  const coral::AttributeList* attrList = &(attrListCollItr->second);
227 
228  unsigned int tempFullDelayData = (*attrList)[m_fullDataDelayName].data<unsigned int>();
229  m_currentFullDelayDataMap[coolId] = tempFullDelayData;
230 
231  sc = m_signalShapes->SetCurrentFullDelayData(coolId,tempFullDelayData);
232  if(sc.isFailure()){
233  ATH_MSG_INFO( "Failed to set FullDelayData from database to channel 0x" << std::hex << coolId << std::dec );
234  }
235 
236  unsigned int tempPedValue = (*attrList)[m_pedValueName].data<unsigned int>();
237  m_currentPedValueMap[coolId] = tempPedValue;
238 
239  sc = m_signalShapes->SetPedValue(coolId,tempPedValue);
240  if(sc.isFailure()){
241  ATH_MSG_INFO( "Failed to set PedValue from database to channel 0x" << std::hex << coolId << std::dec );
242  }
243 
244  // utilize this loop over the cool channel id's in order to set the l1aFadcSlice
245  // which is the same for all channels.
247  if(sc.isFailure()){
248  ATH_MSG_INFO( "Failed to set L1aFadcSlice from database to channel 0x" << std::hex << coolId << std::dec );
249  }
250 
251  // want to check that this channel is a valid channel
252  bool isValid = false;
253  L1CaloCoolChannelId id(coolId);
254  isValid = IsCoolIdValid(id);
256  if(sc.isFailure()){
257  ATH_MSG_INFO( "Failed to set ValidChannel from database to channel 0x" << std::hex << coolId << std::dec );
258  }
259 
260  } // end for(attrList)
261 
262  // now retrieve the PprDeadChannels folder
263  // want to book the dead channels so I can add this info to the tree
265  if(sc.isFailure()){
266  ATH_MSG_INFO( "Failed to retrieve database handle." );
267  return sc;
268  }
269 
270  attrListCollItr = m_attrList->begin();
271 
272  for(;attrListCollItr != m_attrList->end();++attrListCollItr){
273  const unsigned int coolId = attrListCollItr->first;
274 
275  const coral::AttributeList* attrList = &(attrListCollItr->second);
276 
277  unsigned int tempErrorCode = (*attrList)[m_errorCodeName].data<unsigned int>();
278  bool enabled = true;
279  if(tempErrorCode & 0xf) enabled = false;
280 
281  sc = m_signalShapes->SetChannelEnabled(coolId,enabled);
282  if(sc.isFailure()){
283  ATH_MSG_INFO( "Failed to set ChannelEnabled from database to channel 0x" << std::hex << coolId << std::dec );
284  }
285 
286  } // end for(attrList)
287 
288 
289  ATH_MSG_INFO( "Finished database initialization." );
291  }
292 
293 
294  ATH_MSG_INFO("Event Number: " << eventNum );
295 
296  if (eventNum == 0 && m_isTile){
297  return StatusCode::SUCCESS;
298  }
299 
300 
302  if(sc.isFailure()){
303  ATH_MSG_FATAL( "Failed to get the trigger tower collection so stopping." );
304  return StatusCode::FAILURE;
305  }
306 
307  sc = GetRODHeader();
308  if(sc.isFailure()){
309  ATH_MSG_FATAL( "Failed to get the ROD Header so stopping." );
310  return StatusCode::FAILURE;
311  }
312 
313  ATH_MSG_INFO( "Filling trigger tower pusles." );
314 
315  Itr_tt towerItr = m_triggerTowers->begin();
316  Itr_tt towerEnd = m_triggerTowers->end();
317 
318  ATH_MSG_INFO( "Trigger Tower Collection Size: " << m_triggerTowers->size() );
319 
320  // Loop over the trigger tower collection
321  for(;towerItr != towerEnd;++towerItr){
322 
323  // need to read the scan step counter which counts the steps taken during
324  // the run and can be used to determine the phos4 setting
326  const unsigned int scanStepNumber = (unsigned int)(*rodItr)->stepNumber();
327  // FYI: As of 27/10/2009 for historic reasons this value runs from 0 to 49
328  // but we are only interested in the modulo of this step with respect to
329  // 25
330  const unsigned int phos4step = scanStepNumber % 25; // 0 to 24
331 
332 
333  // get the eta/phi
334  double eta = (*towerItr)->eta();
335  double phi = (*towerItr)->phi();
336 
337  // add the EM trigger tower to the collection
338  {
339  // get cool id
340  unsigned int layer = 0; // 0 == EM Layer; 1 == HAD Layer
342 
343  const std::vector<int> adcs = (*towerItr)->emADC();
344 
345  sc = m_signalShapes->Fill(coolId.id(),phos4step,adcs);
346  if(sc.isFailure()){
347  ATH_MSG_WARNING( " [EM] Failed to fill signal shape collection." );
348  }
349 
350  // fill selected channel histograms
351  for(unsigned int i=0;i<m_selectedCoolIds.size();++i){
352  if(m_selectedCoolIds[i] == coolId.id()){
354  if(itr == m_histosForSelectedCoolIds.end()) continue;
355 
356  for(unsigned int j=0;j<adcs.size();++j)
357  itr->second->Fill(phos4step+j*25,adcs[j]);
358  break;
359  }
360  }
361 
362 
363  // need to set the triggered time slice in the signal shapes:
364  if(m_firstEvent){
365  sc = m_signalShapes->SetL1aFadcSlice(coolId.id(),(*towerItr)->emADCPeak());
366  if(sc.isFailure()){
367  ATH_MSG_WARNING( "Failed to set L1aFadcSlice from Em data to channel 0x" << std::hex << coolId << std::dec );
368  }
370  ATH_MSG_WARNING( "Failed to set ChannelEtaPhiLayer from Em data to channel 0x" << std::hex << coolId << std::dec );
371  }
372  }
373 
374  }
375 
376  // add the HAD trigger tower to the collection
377  {
378  // get cool id
379  unsigned int layer = 1; // 0 == EM Layer; 1 == HAD Layer
381 
382  const std::vector<int> adcs = (*towerItr)->hadADC();
383 
384  sc = m_signalShapes->Fill(coolId.id(),phos4step,adcs);
385  if(sc.isFailure()){
386  ATH_MSG_WARNING( " [HAD] Failed to fill signal shape collection." );
387  }
388 
389 
390  // fill selected channel histograms
391  for(unsigned int i=0;i<m_selectedCoolIds.size();++i){
392  if(m_selectedCoolIds[i] == coolId.id()){
394  if(itr == m_histosForSelectedCoolIds.end()) continue;
395 
396  for(unsigned int j=0;j<adcs.size();++j){
397  itr->second->Fill(phos4step+j*25,adcs[j]);
398  }
399 
400  break;
401  }
402  }
403 
404 
405  // need to set the triggered time slice in the signal shapes:
406  if(m_firstEvent){
407  sc = m_signalShapes->SetL1aFadcSlice(coolId.id(),(*towerItr)->hadADCPeak());
408  if(sc.isFailure()){
409  ATH_MSG_WARNING( "Failed to set L1aFadcSlice from HAD data to channel 0x" << std::hex << coolId << std::dec );
410  }
412  ATH_MSG_WARNING( "Failed to set ChannelEtaPhiLayer from HAD data to channel 0x" << std::hex << coolId << std::dec );
413  }
414  }
415  }
416 
417  if(m_firstEvent && m_l1aFadcSlice == 0)
418  m_l1aFadcSlice = (*towerItr)->emADCPeak();
419 
420  }// end for(towerItr)
421 
422  m_firstEvent = false;
423 
424  return StatusCode::SUCCESS;
425 }
426 
428  // Place your post-event-loop code here
429  ATH_MSG_INFO("In finalize()");
430 
431  StatusCode sc = m_signalShapes->Finalize();
432  if(sc.isFailure()){
433  ATH_MSG_WARNING(" PHOS4 Signal Shapes did not Finalize correctly." );
434  return sc;
435  }
436 
437 
438  // Write selected Cool ID plots to disk
439 
440  if(m_selectedCoolIds.size() > 0){
441  char temp[50];
442  std::string filename = "selectedCoodIds";
443  if(m_runNumber != 0){
444  sprintf(temp,"%08u",m_runNumber);
445  filename += "_";
446  filename += temp;
447  }
448  filename += ".root";
449 
450  std::string filePath = m_outputDirectory + filename;
451  TFile outputFile(filePath.c_str(),"RECREATE");
452 
453  for(unsigned int i=0;i<m_selectedCoolIds.size();++i){
454  std::map<unsigned int,TH2F*>::iterator itr = m_histosForSelectedCoolIds.find(m_selectedCoolIds[i]);
455  if(itr == m_histosForSelectedCoolIds.end()) continue;
456 
457  itr->second->Write();
458 
459  }
460 
461  outputFile.Close();
462  }
463 
464 
465  return StatusCode::SUCCESS;
466 }
467 
468 
470 
471  StatusCode sc;
472  sc = detStore()->retrieve(m_caloMgr);
473  if (sc.isFailure()) {
474  ATH_MSG_ERROR("Unable to retrieve CaloIdManager from DetectorStore");
475  return StatusCode::FAILURE;
476  }
477  else
478  ATH_MSG_INFO( "CaloIdManager retrieved successfully." );
479 
481  if (!m_ttOnlineIdHelper) {
482  ATH_MSG_ERROR( "Could not access TTOnlineId helper" );
483  return StatusCode::FAILURE;
484  }
485  else
486  ATH_MSG_INFO( "TTOnlineId retrieved successfully." );
487 
489  if (!m_lvl1Helper) {
490  ATH_MSG_ERROR( "Could not access CaloLVL1_ID helper" );
491  return StatusCode::FAILURE;
492  }
493  else
494  ATH_MSG_INFO( "CaloLVL1_ID retrieved successfully." );
495 
496  sc = m_histTool.retrieve();
497  if (sc.isFailure()) {
498  ATH_MSG_ERROR( "Could not retrieve TrigT1CaloLWHistogramTool" );
499  return StatusCode::FAILURE;
500  }
501  else
502  ATH_MSG_INFO( "TrigT1CaloLWHistogramTool retrieved successfully." );
503 
504 
505  sc = m_l1CaloTTIdTools.retrieve();
506  if(sc.isFailure()){
507  ATH_MSG_WARNING( "Cannot get L1CaloTTIdTools !" );
508  }
509 
510  IToolSvc* toolSvc;
511  sc = service( "ToolSvc",toolSvc );
512  if(sc.isSuccess()){
513 // IAlgTool *algtool;
514 
515 // sc = toolSvc->retrieveTool("L1CaloTTIdTools", algtool);
516 // ATH_MSG_DEBUG("L1CaloTTIdTools retrieved");
517 // if (sc.isFailure()) {
518 // ATH_MSG_WARNING( " Cannot get L1CaloTTIdTools !" );
519 // }
520 // m_l1CaloTTIdTools = dynamic_cast<L1CaloTTIdTools*> (algtool);
521 
522  sc = toolSvc->retrieveTool("CaloTriggerTowerService",m_ttSvc);
523  if(sc.isFailure()){
524  ATH_MSG_WARNING( "Could not retrieve CaloTriggerTowerService Tool" );
525  }
526 
527  } // End of IToolSvc initialization.
528 
529 
530 
531  return StatusCode::SUCCESS;
532 }
533 
535 
536  // Load in Trigger Towers. I'm not going to comment the rest, should be obvious.
537  StatusCode sc = evtStore()->retrieve(m_triggerTowers, "TriggerTowers");
538  if(sc.isFailure()){
539  ATH_MSG_INFO("Failed to load TriggerTowers");
540  return StatusCode::FAILURE;
541  }
542 
543  return StatusCode::SUCCESS;
544 }
545 
547 
548  StatusCode sc = evtStore()->retrieve(m_rodHeader, "RODHeaders");
549  if(sc.isFailure()){
550  ATH_MSG_INFO("Failed to load ROD Headers");
551  return StatusCode::FAILURE;
552  }
553  return StatusCode::SUCCESS;
554 }
555 
557 
558  StatusCode sc = evtStore()->retrieve(m_attrList,folderName.c_str());
559  //ATH_MSG_INFO( detStore()->dump() );
560  if(sc.isFailure()){
561  ATH_MSG_INFO("Failed to retrieve database handle");
562  return StatusCode::FAILURE;
563  }
564  return StatusCode::SUCCESS;
565 }
566 
567 // Get Cool ID from Athena stuff
568 L1CaloCoolChannelId L1CaloPprPhos4ShapeMaker::GetCoolId(const double eta,const double phi,const unsigned int layer){
570  layer,
571  m_l1CaloTTIdTools->regionIndex(eta),
572  m_l1CaloTTIdTools->etaIndex(eta),
573  m_l1CaloTTIdTools->phiIndex(eta,phi));
576  return coolId;
577 }
578 
580 
581  try{
582  const unsigned int crate = coolId.crate();
583  const unsigned int moduleSlot = coolId.module() + 5;
584  const unsigned int subModule = coolId.subModule();
585  const unsigned int channel = coolId.channel();
586  m_ttOnlineIdHelper->channelId(crate,moduleSlot,subModule,channel);
587  }
588  catch(const CaloID_Exception&) {
589  return false;
590  }
591 
592  return true;
593 }
594 
595 void L1CaloPprPhos4ShapeMaker::SetTimingRegime(const std::string& regime){
596 
597  // Regime should be "Physics", "Calib1", or "Calib2"
598  if(regime != "Physics" && regime != "Calib1" && regime != "Calib2"){
599  ATH_MSG_WARNING( "Timing Regime is expected to be Physics, Calib1, or Calib2, but is actually: " << regime << ", using Calib1 as default." );
600  m_timingRegime = "Calib1";
601  }
602 
603  // set local variable
604  m_timingRegime = regime;
605 
606  // set signal shapes collection
608 
609  // build database name for PprChanCalib folder
610 
611  m_pprChanCalibFolderName = "/TRIGGER/L1Calo/V1/Calibration/";
613  m_pprChanCalibFolderName += "/PprChanCalib";
614 
615 }
616 
618  TStyle* atlasStyle = new TStyle("atlasStyle", "ATLAS Style");
619 
620 // Colors
621 
622 //set the background color to white
623  atlasStyle->SetFillColor(10);
624  atlasStyle->SetFrameFillColor(10);
625  atlasStyle->SetFrameFillStyle(0);
626  atlasStyle->SetFillStyle(0);
627  atlasStyle->SetCanvasColor(10);
628  atlasStyle->SetPadColor(10);
629  atlasStyle->SetTitleFillColor(0);
630  atlasStyle->SetStatColor(10);
631 
632 //dont put a colored frame around the plots
633  atlasStyle->SetFrameBorderMode(0);
634  atlasStyle->SetCanvasBorderMode(0);
635  atlasStyle->SetPadBorderMode(0);
636 
637 //use the primary color palette
638  atlasStyle->SetPalette(1,0);
639 
640 //set the default line color for a histogram to be black
641  atlasStyle->SetHistLineColor(kBlack);
642 
643 //set the default line color for a fit function to be red
644  atlasStyle->SetFuncColor(kRed);
645 
646 //make the axis labels black
647  atlasStyle->SetLabelColor(kBlack,"xyz");
648 
649 //set the default title color to be black
650  atlasStyle->SetTitleColor(kBlack);
651 
652 // Sizes
653 
654 //set the margins
655 //atlasStyle->SetPadBottomMargin(0.2);
656 //atlasStyle->SetPadTopMargin(0.075);
657 //atlasStyle->SetPadLeftMargin(0.15);
658 
659 //set axis label and title text sizes
660  atlasStyle->SetLabelSize(0.03,"xyz");
661  atlasStyle->SetTitleSize(0.05,"xyz");
662 //atlasStyle->SetTitleOffset(0.9,"x");
663  atlasStyle->SetTitleOffset(1.0,"xyz");
664 //atlasStyle->SetStatFontSize(0.07);
665 //atlasStyle->SetTextSize(0.08);
666  atlasStyle->SetTitleBorderSize(0);
667 
668  // Histogram title position
669  atlasStyle->SetTitleX(0.1);
670  atlasStyle->SetTitleFontSize(0.11);
671 
672 //set line widths
673  atlasStyle->SetHistLineWidth(2);
674  atlasStyle->SetFrameLineWidth(2);
675  atlasStyle->SetFuncWidth(2);
676 
677 // Misc
678 
679 //align the titles to be centered
680  atlasStyle->SetTextAlign(22);
681 
682 //set the number of divisions to show
683 //atlasStyle->SetNdivisions(506, "xy");
684 
685 //turn off xy grids
686 //atlasStyle->SetPadGridX(0);
687 //atlasStyle->SetPadGridY(0);
688 
689 //set the tick mark style
690 //atlasStyle->SetPadTickX(1);
691 //atlasStyle->SetPadTickY(1);
692 
693  // Set Pad Margins
694  //atlasStyle->SetPadBottomMargin(0.);
695  //atlasStyle->SetPadTopMargin (0.);
696  //atlasStyle->SetPadLeftMargin (0.);
697  //atlasStyle->SetPadRightMargin (0.);
698 
699 //show the fit parameters in a box
700 //atlasStyle->SetOptFit(1111);
701 
702 //turn off all other stats
703  atlasStyle->SetOptStat(0);
704 
705 //marker settings
706  atlasStyle->SetMarkerStyle(8);
707  atlasStyle->SetMarkerSize(0.25);
708 
709 // Fonts
710 //atlasStyle->SetStatFont(42);
711 //atlasStyle->SetLabelFont(42,"xyz");
712 //atlasStyle->SetTitleFont(42,"xyz");
713 //atlasStyle->SetTextFont(42);
714 
715 //done
716  atlasStyle->cd();
717 
718 //gROOT->ForceStyle();
719 // gStyle->ls();
720 }
721 
722 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
L1CaloPprPhos4ShapeCollection::SetTileRun
void SetTileRun(bool value=true)
Definition: L1CaloPprPhos4ShapeCollection.h:143
L1CaloPprPhos4ShapeCollection::SetPedValue
StatusCode SetPedValue(const L1CaloCoolChannelId &coolId, unsigned int value)
Definition: L1CaloPprPhos4ShapeCollection.cxx:1396
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
L1CaloPprPhos4ShapeMaker::m_currentFullDelayDataMap
std::map< unsigned int, unsigned int > m_currentFullDelayDataMap
Definition: L1CaloPprPhos4ShapeMaker.h:94
L1CaloPprPhos4ShapeMaker::m_outputDirectory
std::string m_outputDirectory
Definition: L1CaloPprPhos4ShapeMaker.h:140
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
L1CaloPprPhos4ShapeCollection::SetChannelEtaPhiLayer
bool SetChannelEtaPhiLayer(const L1CaloCoolChannelId &coolId, const float eta, const float phi, const L1CaloPprPhos4Shape::CaloLayer layer)
Definition: L1CaloPprPhos4ShapeCollection.cxx:1371
L1CaloPprPhos4ShapeMaker::m_caloMgr
const CaloIdManager * m_caloMgr
Definition: L1CaloPprPhos4ShapeMaker.h:127
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
CaloID_Exception
Exception class for Calo Identifiers.
Definition: CaloID_Exception.h:20
L1CaloPprPhos4ShapeMaker::GetRODHeader
StatusCode GetRODHeader()
Definition: L1CaloPprPhos4ShapeMaker.cxx:546
L1CaloPprPhos4ShapeMaker::m_l1aFadcSliceName
std::string m_l1aFadcSliceName
Definition: L1CaloPprPhos4ShapeMaker.h:97
TH2F
Definition: rootspy.cxx:420
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
L1CaloPprPhos4ShapeCollection
Definition: L1CaloPprPhos4ShapeCollection.h:81
L1CaloPprPhos4ShapeCollection::SetTimingRegime
void SetTimingRegime(const std::string &regime)
Definition: L1CaloPprPhos4ShapeCollection.h:91
L1CaloPprPhos4ShapeMaker::m_l1CaloTTIdTools
ToolHandle< LVL1::IL1CaloTTIdTools > m_l1CaloTTIdTools
Definition: L1CaloPprPhos4ShapeMaker.h:126
atlasStyleMacro.atlasStyle
atlasStyle
Definition: atlasStyleMacro.py:8
L1CaloPprPhos4ShapeMaker::m_timingRegime
std::string m_timingRegime
Definition: L1CaloPprPhos4ShapeMaker.h:101
L1CaloPprPhos4ShapeMaker::GetDatabaseHandle
StatusCode GetDatabaseHandle(const std::string &folderName)
Definition: L1CaloPprPhos4ShapeMaker.cxx:556
L1CaloPprPhos4ShapeMaker::m_signalShapes
L1CaloPprPhos4ShapeCollection * m_signalShapes
Definition: L1CaloPprPhos4ShapeMaker.h:82
L1CaloPprPhos4ShapeCollection::SetMinimumSignalHeight
void SetMinimumSignalHeight(const unsigned int min)
Definition: L1CaloPprPhos4ShapeCollection.h:88
ATLAS_NOT_THREAD_SAFE
StatusCode L1CaloPprPhos4ShapeMaker::finalize ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
Definition: L1CaloPprPhos4ShapeMaker.cxx:427
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
L1CaloPprPhos4ShapeCollection::SetHistogramTool
void SetHistogramTool(ToolHandle< LVL1::TrigT1CaloLWHistogramTool > &histTool)
Definition: L1CaloPprPhos4ShapeCollection.h:94
L1CaloCoolChannelId::crate
unsigned int crate() const
Definition: L1CaloCoolChannelId.h:25
L1CaloPprPhos4ShapeMaker::m_firstEvent
bool m_firstEvent
Definition: L1CaloPprPhos4ShapeMaker.h:137
L1CaloPprPhos4ShapeCollection::SetChannelEnabled
StatusCode SetChannelEnabled(const L1CaloCoolChannelId &coolId, bool enabled)
Definition: L1CaloPprPhos4ShapeCollection.cxx:1432
L1CaloPprPhos4ShapeMaker::m_isLAr
bool m_isLAr
Definition: L1CaloPprPhos4ShapeMaker.h:151
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
HWIdentifier
Definition: HWIdentifier.h:13
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
L1CaloPprPhos4ShapeMaker::IsCoolIdValid
bool IsCoolIdValid(const L1CaloCoolChannelId coolId)
Definition: L1CaloPprPhos4ShapeMaker.cxx:579
L1CaloPprPhos4ShapeMaker::m_timingRegimeName
std::string m_timingRegimeName
Definition: L1CaloPprPhos4ShapeMaker.h:100
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
L1CaloPprPhos4ShapeMaker::SetAtlasStyle
void SetAtlasStyle(void)
Definition: L1CaloPprPhos4ShapeMaker.cxx:617
CaloTriggerTowerService::createTTChannelID
HWIdentifier createTTChannelID(const Identifier &id, bool bQuiet=false) const
create a TT HWIdentifier from a TT Identifier
Definition: CaloTriggerTowerService.cxx:122
L1CaloPprPhos4ShapeMaker::m_runNumber
unsigned int m_runNumber
Definition: L1CaloPprPhos4ShapeMaker.h:111
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
L1CaloPprPhos4ShapeMaker::m_ppmDeadChannelsFolderName
std::string m_ppmDeadChannelsFolderName
Definition: L1CaloPprPhos4ShapeMaker.h:115
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
L1CaloPprPhos4ShapeMaker::m_l1aFadcSlice
unsigned int m_l1aFadcSlice
Definition: L1CaloPprPhos4ShapeMaker.h:98
L1CaloPprPhos4Shape::HAD
@ HAD
Definition: L1CaloPprPhos4Shape.h:95
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
L1CaloPprPhos4ShapeCollection::SetL1aFadcSlice
StatusCode SetL1aFadcSlice(const L1CaloCoolChannelId &coolId, unsigned int slice)
Definition: L1CaloPprPhos4ShapeCollection.cxx:1408
L1CaloPprPhos4ShapeMaker::m_rodHeader
const DataVector< LVL1::RODHeader > * m_rodHeader
Definition: L1CaloPprPhos4ShapeMaker.h:109
L1CaloPprPhos4ShapeMaker::m_minSignalHeight
unsigned int m_minSignalHeight
Definition: L1CaloPprPhos4ShapeMaker.h:141
L1CaloCoolChannelId::channel
unsigned int channel() const
Definition: L1CaloCoolChannelId.h:30
L1CaloPprPhos4ShapeMaker::SetTimingRegime
void SetTimingRegime(const std::string &regime)
Definition: L1CaloPprPhos4ShapeMaker.cxx:595
lumiFormat.i
int i
Definition: lumiFormat.py:92
L1CaloPprPhos4ShapeMaker::execute
virtual StatusCode execute() override
Definition: L1CaloPprPhos4ShapeMaker.cxx:105
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
L1CaloPprPhos4ShapeCollection::SetValidChannel
StatusCode SetValidChannel(const L1CaloCoolChannelId &coolId, bool validity)
Definition: L1CaloPprPhos4ShapeCollection.cxx:1420
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
L1CaloPprPhos4ShapeMaker::m_attrList
const CondAttrListCollection * m_attrList
Definition: L1CaloPprPhos4ShapeMaker.h:112
L1CaloPprPhos4ShapeMaker::GetCoolId
L1CaloCoolChannelId GetCoolId(const double eta, const double phi, const unsigned int layer)
Definition: L1CaloPprPhos4ShapeMaker.cxx:568
L1CaloCoolChannelId::id
unsigned int id() const
Definition: L1CaloCoolChannelId.h:32
L1CaloPprPhos4ShapeMaker::m_currentPedValueMap
std::map< unsigned int, unsigned int > m_currentPedValueMap
Definition: L1CaloPprPhos4ShapeMaker.h:96
CaloIdManager::getLVL1_ID
const CaloLVL1_ID * getLVL1_ID(void) const
Definition: CaloIdManager.cxx:75
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
L1CaloPprPhos4ShapeMaker::m_currentDatabaseMapsFilled
bool m_currentDatabaseMapsFilled
Definition: L1CaloPprPhos4ShapeMaker.h:92
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
L1CaloPprPhos4ShapeMaker::m_pprChanCalibFolderName
std::string m_pprChanCalibFolderName
Definition: L1CaloPprPhos4ShapeMaker.h:113
L1CaloPprPhos4ShapeCollection::SetLArRun
void SetLArRun(bool value=true)
Definition: L1CaloPprPhos4ShapeCollection.h:146
AthAlgorithm
Definition: AthAlgorithm.h:47
L1CaloPprPhos4ShapeMaker::m_ttSvc
CaloTriggerTowerService * m_ttSvc
Definition: L1CaloPprPhos4ShapeMaker.h:128
L1CaloPprPhos4ShapeMaker::m_isTile
bool m_isTile
Definition: L1CaloPprPhos4ShapeMaker.h:150
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
L1CaloPprPhos4ShapeMaker::m_errorCodeName
std::string m_errorCodeName
Definition: L1CaloPprPhos4ShapeMaker.h:99
hancool.filePath
string filePath
Definition: hancool.py:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
L1CaloPprPhos4ShapeMaker::m_selectedCoolIds
std::vector< unsigned int > m_selectedCoolIds
Definition: L1CaloPprPhos4ShapeMaker.h:143
L1CaloPprPhos4Shape::EM
@ EM
Definition: L1CaloPprPhos4Shape.h:94
L1CaloPprPhos4ShapeMaker::loadAthenaObjects
StatusCode loadAthenaObjects()
Definition: L1CaloPprPhos4ShapeMaker.cxx:469
L1CaloPprPhos4ShapeCollection::SetCurrentFullDelayData
StatusCode SetCurrentFullDelayData(const L1CaloCoolChannelId &coolId, unsigned int delay)
Definition: L1CaloPprPhos4ShapeCollection.cxx:1383
L1CaloPprPhos4ShapeMaker::m_l1caloRunParametersFolderName
std::string m_l1caloRunParametersFolderName
Definition: L1CaloPprPhos4ShapeMaker.h:117
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
L1CaloCoolChannelId
Definition: L1CaloCoolChannelId.h:10
L1CaloPprPhos4ShapeCollection::SetOutputDirectoryName
void SetOutputDirectoryName(const std::string &name)
Definition: L1CaloPprPhos4ShapeCollection.h:140
L1CaloPprPhos4ShapeMaker::m_readoutConfigFolderName
std::string m_readoutConfigFolderName
Definition: L1CaloPprPhos4ShapeMaker.h:114
L1CaloPprPhos4ShapeMaker::m_histTool
ToolHandle< LVL1::TrigT1CaloLWHistogramTool > m_histTool
Definition: L1CaloPprPhos4ShapeMaker.h:85
L1CaloPprPhos4ShapeCollection::SetRunNumber
void SetRunNumber(const unsigned int runNumber)
Definition: L1CaloPprPhos4ShapeCollection.h:137
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
L1CaloPprPhos4ShapeCollection::Fill
StatusCode Fill(const L1CaloCoolChannelId &coolId, const unsigned int ns_step, const unsigned int adc)
Definition: L1CaloPprPhos4ShapeCollection.cxx:197
CaloTriggerTowerService::createL1CoolChannelId
L1CaloCoolChannelId createL1CoolChannelId(const HWIdentifier &id) const
create a CoolChannelId (used by TDAQ framework) from a HWIdentifier
Definition: CaloTriggerTowerService.cxx:292
L1CaloPprPhos4ShapeMaker::initialize
virtual StatusCode initialize() override
Definition: L1CaloPprPhos4ShapeMaker.cxx:40
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
TTOnlineID::channelId
HWIdentifier channelId(int crate, int module, int submodule, int channel) const
(1) create towerId from fields
Definition: TTOnlineID.h:398
L1CaloPprPhos4ShapeMaker::m_triggerTowers
const TriggerTowerCollection * m_triggerTowers
Definition: L1CaloPprPhos4ShapeMaker.h:106
CaloIdManager::getTTOnlineID
const TTOnlineID * getTTOnlineID(void) const
Definition: CaloIdManager.cxx:105
L1CaloPprPhos4ShapeMaker::m_ttcConfigurationName
std::string m_ttcConfigurationName
Definition: L1CaloPprPhos4ShapeMaker.h:102
L1CaloPprPhos4ShapeMaker::m_lvl1Helper
const CaloLVL1_ID * m_lvl1Helper
Definition: L1CaloPprPhos4ShapeMaker.h:130
L1CaloPprPhos4ShapeMaker::m_fullDataDelayName
std::string m_fullDataDelayName
Definition: L1CaloPprPhos4ShapeMaker.h:93
L1CaloPprPhos4ShapeMaker::m_ttcConfiguration
std::string m_ttcConfiguration
Definition: L1CaloPprPhos4ShapeMaker.h:103
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
L1CaloPprPhos4ShapeMaker.h
CaloLVL1_ID::tower_id
Identifier tower_id(int pos_neg_z, int sampling, int region, int eta, int phi) const
build a tower identifier
Definition: CaloLVL1_ID.h:429
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
L1CaloPprPhos4ShapeMaker::m_l1caloDerivedRunParsFolderName
std::string m_l1caloDerivedRunParsFolderName
Definition: L1CaloPprPhos4ShapeMaker.h:116
L1CaloPprPhos4ShapeMaker::m_ttOnlineIdHelper
const TTOnlineID * m_ttOnlineIdHelper
Definition: L1CaloPprPhos4ShapeMaker.h:129
L1CaloPprPhos4ShapeMaker::m_histosForSelectedCoolIds
std::map< unsigned int, TH2F * > m_histosForSelectedCoolIds
Definition: L1CaloPprPhos4ShapeMaker.h:144
L1CaloCoolChannelId::subModule
unsigned int subModule() const
Definition: L1CaloCoolChannelId.h:29
L1CaloPprPhos4ShapeMaker::GetTriggerTowers
StatusCode GetTriggerTowers()
Definition: L1CaloPprPhos4ShapeMaker.cxx:534
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
L1CaloPprPhos4ShapeMaker::m_maxSelectedCoolIds
static const unsigned short int m_maxSelectedCoolIds
Definition: L1CaloPprPhos4ShapeMaker.h:145
L1CaloPprPhos4ShapeMaker::m_pedValueName
std::string m_pedValueName
Definition: L1CaloPprPhos4ShapeMaker.h:95
L1CaloCoolChannelId::module
unsigned int module(bool logical=true) const
L1CaloPprPhos4ShapeMaker::L1CaloPprPhos4ShapeMaker
L1CaloPprPhos4ShapeMaker()