 |
Belle II Software
release-05-02-19
|
12 #include <arich/calibration/ARICHCalibrationChecker.h>
15 #include <arich/utility/ARICHChannelHist.h>
16 #include <arich/dbobjects/ARICHChannelMask.h>
19 #include <framework/database/Database.h>
20 #include <framework/database/DBStore.h>
21 #include <framework/database/Configuration.h>
22 #include <framework/datastore/DataStore.h>
72 B2FATAL(
"Setting both testing payload and Global Tag or setting no one of them.");
85 if (modID <= 42)
return 1;
86 if (modID <= 90)
return 2;
87 if (modID <= 144)
return 3;
88 if (modID <= 204)
return 4;
89 if (modID <= 270)
return 5;
90 if (modID <= 342)
return 6;
91 if (modID <= 420)
return 7;
97 if (
getRing(modID) == 1)
return (modID - 1) / 7 + 1;
98 if (
getRing(modID) == 2)
return (modID - 43) / 8 + 1;
99 if (
getRing(modID) == 3)
return (modID - 91) / 9 + 1;
100 if (
getRing(modID) == 4)
return (modID - 145) / 10 + 1;
101 if (
getRing(modID) == 5)
return (modID - 205) / 11 + 1;
102 if (
getRing(modID) == 6)
return (modID - 271) / 12 + 1;
103 if (
getRing(modID) == 7)
return (modID - 343) / 13 + 1;
114 B2FATAL(
"ARICHChannelMask is not valid.");
118 float frac_masked_sector[6] = {0.};
119 float frac_masked = 0.;
120 TFile* channelMaskResults =
122 TTree* maskTree =
new TTree(
"arich_masked",
"ARICH channel masking");
123 maskTree->Branch(
"experiment", &
m_experiment,
"experiment/I");
124 maskTree->Branch(
"run", &
m_run,
"run/I");
125 maskTree->Branch(
"frac_masked_sector", &frac_masked_sector,
"frac_masked_sector[6]/F");
126 maskTree->Branch(
"frac_masked", &frac_masked,
"frac_masked/F");
128 for (
int mod = 1; mod < 421; mod++) {
130 for (
int chn = 0; chn < 144; chn++) {
131 if (!channelMask->isActive(mod, chn)) { frac_masked_sector[sector - 1]++; frac_masked++;}
135 for (
int sec = 0; sec < 6; sec++) frac_masked_sector[sec] /= 10080.;
136 frac_masked /= 60480.;
141 delete channelMaskResults;
static DataStore & Instance()
Instance of singleton Store.
void setInitializeActive(bool active)
Setter for m_initializeActive.
std::string m_GlobalTagName
Global Tag name.
void reset(bool keepEntries=false)
Invalidate all payloads.
void setExperimentRun(int experiment, int run)
Set experiment and run numbers.
StoreObjPtr< EventMetaData > m_EventMetaData
Event metadata.
static void reset(bool keepConfig=false)
Reset the database instance.
std::string m_testingPayloadName
Testing payload location.
Class for accessing objects in the database.
void reset(EDurability durability)
Frees memory occupied by data store items and removes all objects from the map.
void resetDatabase()
Reset the database.
void checkChannelMask()
Check channel mask.
Singleton class to cache database objects.
static Configuration & getInstance()
Get a reference to the instance which will be used when the Database is initialized.
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
~ARICHCalibrationChecker()
Destructor.
static DBStore & Instance()
Instance of a singleton DBStore.
void initializeDatabase()
Initialize the database.
int getSector(int modID)
Get HAPD sector number.
int m_experiment
Experiment number.
void updateEvent()
Updates all intra-run dependent objects.
ARICHCalibrationChecker()
Constructor.
bool isValid() const
Check whether a valid object was obtained from the database.
static Database & Instance()
Instance of a singleton Database.
void printPayloadInformation(DBObjPtr< T > &dbObject)
Print payload information.
std::string m_channelMaskResultsFile
Output file for channel mask results.
void update()
Updates all objects that are outside their interval of validity.
int getRing(int modID)
Get HAPD ring number.