ATLAS Offline Software
Loading...
Searching...
No Matches
LArCellsEmptyMonitoring.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
10
11#ifndef LArSamples_LArCellsEmptyMonitoring_H
12#define LArSamples_LArCellsEmptyMonitoring_H
13
15#include "TString.h"
17#include <vector>
18#include <memory>
19#include <string>
20
21namespace LArSamples {
22
24 {
25
26 public:
27
32 void Run(const TString& inputfile);
33 void Run(const char* inputfile){ TString str(inputfile); Run(str); } // wrapper
34 void TestRun(const TString& inputfile);
35 void TestRun(const char* inputfile){ TString str(inputfile); Run(str); } // wrapper
36
37 void GetLimits_EqLB(const char* inputfile, int& lbmin, int& lbmax, int& emin, int& emax, int& qmin, int& qmax, int& runNumber, const std::vector<int, std::allocator<int> >& BadLBList);
38 std::vector<int, std::allocator<int> > ReadBadLBList(const TString& LBfile);
39 std::vector<int, std::allocator<int> > GetBadLBList(const char* inputfile, int lbmin, int lbmax, double nsigma, int nlb, const std::vector<int, std::allocator<int> >& DQLBList);
40 bool CheckBadLBList(int lumiBlock, const std::vector<int, std::allocator<int> >& BadLBList);
41 void GetMeanCellHits(const char* inputfile, int nlb, int lbmin, int lbmax, int nsigma, const std::vector<int, std::allocator<int> >& BadLBList, double& MeanHits, double& rmsHits, int& nlb_corr);
42 bool CheckEventSelectionCriteria(int lumiBlock, int nsigma, double energy, Float_t noise, int lbmin, int lbmax);
43 int CheckCellSelectionCriteria(int EventCount, int nsigmaHits, double MeanHits, double rmsHits, int nEvents_E_gt_ecut, double EventEnergySum, int nBadLBs, int nlb) const;
44 bool CheckForPresamplerCells(int index);
45 bool CheckPartition(int index) const;
46
47
48 // setters
49 void ReadDefectLBList(bool ReadList, const TString& LBfile);
50
51 void SetSaveRootFile(bool flag=false){ m_SaveRootFile = flag; }
52 void SetSaveRootTree(bool flag=false){ m_SaveRootTree = flag; }
53 void SetSaveTextFile(bool flag=false){ m_SaveTextFile = flag; }
55 void SetAlgo(int algoindex = 2){ m_Algo = algoindex; }
56 void SetNsigmaHitsFromMean(double nsigmahits = 10.){ m_nsigmaHits = nsigmahits; }
57 void SetLumiblockRange(bool inputRange=false, int input_lbmin = 0, int input_lbmax = 0){
58 m_SetLumiblockRange = inputRange;
59 m_input_lbmin = input_lbmin;
60 m_input_lbmax = input_lbmax;
61 }
62 void SetBadLBRemovalOption(bool removeLB=true){ m_RemoveBadLB = removeLB; }
63 void SetQthreshold(int qvalue = 4000){ m_Qthreshold = qvalue; }
64 void SetNoiseNsigma(double nsig = 10.){ m_nsigma = nsig; }
65 void SetEnergyCountThresholds(double ecut = 1., int counts1 = 250, double enecell1 = 1.5, int counts2 = 25, double enecell2 = 30){
66 m_Ethreshold = ecut;
67 m_UpperCountThreshold = counts1;
68 m_LowerCountThreshold = counts2;
71 }
72 void SetPresamplerMask(bool PS = false){ m_MaskPresampler = PS; }
73 void SetCaloMask(bool calo = false){ m_MaskCalo = calo; }
74 void SetPartition(bool setpart, const std::string& partname );
75 std::string GetCryostat(int calo);
76
77 // satellite functions that do not affect the main Run() functionalities
78 void ScanOnlids(const TString& inputfile);
79 void DoEtaPhiMonitoring(const char* inputfile,const char* optionplot,const char* optionsave);
80 void TriggerEfficiency(const char* inputfile,float fractionInPS=0.8);
81
82 private:
83
84 std::unique_ptr<LArIdTranslatorHelper> m_LarIdTranslator; // LArIdTranslator object
85
87
88 // int m_PrintLevel; // controls the level of printouts
89 bool m_SaveRootFile; // whether to save output root histos
90 bool m_SaveRootTree; // whether to save output root tree
91 bool m_SaveTextFile; // whether to save output text file
92 int m_Algo; // which algorithm to run
93 bool m_SetLumiblockRange; // allows user to input LB range
96 bool m_RemoveBadLB; // whether to remove bad LBs
98 double m_nsigma;
105 bool m_MaskPresampler = false; // whether to mask the EMBPS
106 bool m_MaskCalo = false; // whether to mask everything but the EMBPS
107 bool m_SelectRecurringBadCells; // whether to only select channels flagged by both algorithms
110 std::string m_PartitionName;
111 double m_Mean_checkBadLBs = 0.0;
112 double m_RMS_checkBadLBs = 0.0;
113 bool m_ReadDefectLBList = false;
114 TString m_LBfile;
115
116 };
117}
118
119#endif
120
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
LArCellsEmptyMonitoring(const LArCellsEmptyMonitoring &)=delete
std::unique_ptr< LArIdTranslatorHelper > m_LarIdTranslator
void SetNsigmaHitsFromMean(double nsigmahits=10.)
void SetLumiblockRange(bool inputRange=false, int input_lbmin=0, int input_lbmax=0)
void SetEnergyCountThresholds(double ecut=1., int counts1=250, double enecell1=1.5, int counts2=25, double enecell2=30)
Definition index.py:1