 |
Belle II Software
release-05-01-25
|
11 #ifndef ARICHDATABASEIMPORTER_H
12 #define ARICHDATABASEIMPORTER_H
18 #include <TTimeStamp.h>
24 #include <framework/database/IntervalOfValidity.h>
25 #include <arich/dbobjects/tessellatedSolidStr.h>
37 class ARICHDatabaseImporter {
49 ARICHDatabaseImporter(
const std::vector<std::string>& inputFilesHapdQA,
const std::vector<std::string>& inputFilesAsicRoot,
50 const std::vector<std::string>& inputFilesAsicTxt,
const std::vector<std::string>& inputFilesHapdQE,
51 const std::vector<std::string>& inputFilesFebTest);
62 void SetIOV(
int experimentLow,
int runLow,
int experimentHigh ,
int runHigh);
64 void setExperimentAndRun(
int experiment,
int run);
100 void setHAPDQE(
unsigned modID,
double qe = 0.27,
bool import =
false);
384 TTimeStamp
timedate(std::string enddate);
391 TTimeStamp
getAsicDate(
const std::string& asicSerial,
const std::string& type);
411 std::tuple<std::string, float, float, float>
getFebLVtestData(
int serial,
int lvRun);
432 std::pair<std::vector<float>, std::vector<float>>
getSlopes(
int serialNum,
const std::string& runSCAN);
437 std::vector<std::pair<float, float>>
getFwhm(
int serialNum,
const std::string& runSCAN);
442 std::vector<TH3F*>
getFebTestHistograms(
const std::string& dna,
const std::string& run,
int febposition);
447 TH2F*
getFebTestPulse(
const std::string& dna,
const std::string& run,
int febposition);
472 std::vector<int>
channelsListHapd(std::string chlist, std::string chipDelay);
491 TGraph*
getGraphGainCurrent(
const std::string& bomb_aval,
const std::string& g_i,
const std::string& chip_label,
int i,
float* HV,
492 float* gain_current);
501 TH2F*
getBiasGraph(
const std::string& chip_2d,
const std::string& voltage_current,
int* chipnum,
float* bias_v_i);
534 std::map<std::string, float>
getAerogelParams(
const std::string& aeroSerialNumber);
549 void importModuleTest(
const std::string& mypath,
const std::string& HVtest);
570 void exportSensorModuleMapInfo(
int number);
603 template <
typename Container_t>
604 inline auto printContainer(
const Container_t& rContainer, std::ostream& rStream = std::cout) noexcept ->
void
606 if (rContainer.empty())
609 rStream << rContainer.front();
610 for (
auto i = 1ul; i < rContainer.size(); ++i)
611 rStream <<
" - " << rContainer[i];
void dumpQEMap(bool simple=false)
Dumps 2D QE map of full detector surface from the database into root file (from ARICHModulesInfo)
A class that describes the interval of experiments/runs for which an object in the database is valid.
void importAeroRayleighScatteringFit(std::string commentSingleWord="")
Import optical information of aerogel tiles into database.
std::vector< std::string > m_inputFilesFebTest
Input root files from FEB test (coarse/fine offset settings, test pulse)
Structure which holds apexes of the tessellation volumes.
void importHapdChipInfo()
Import ARICH HAPD chip data in the database.
void importHvMappings()
Imports mappings of power supply to high voltage cables.
std::vector< int > channelsListHapd(std::string chlist, std::string chipDelay)
Get lists of problematic HAPD channels.
void printMirrorAlignment()
Prints mirror alignment constants.
TGraph * getGraphGainCurrent(const std::string &bomb_aval, const std::string &g_i, const std::string &chip_label, int i, float *HV, float *gain_current)
Get graphs for bombardment and avalanche gain and current.
void importMergerCoolingGeo()
Import Merger cooling bodies geometry.
void printGeometryConfig()
Prints geometry configuration parameters from the database.
TH2F * getBiasGraph(const std::string &chip_2d, const std::string &voltage_current, int *chipnum, float *bias_v_i)
Get histograms for bias voltage and current.
void printBiasVoltagesForHapdChip(const std::string &serialNumber)
Export ARICH HAPD chip info data from the database and calculate bias voltages for one HAPD.
std::vector< int > getDeadChFEB(const std::string &dna)
Returns list of dead channels on FEB.
void importFebTest()
Import ARICH FEB test data in the database.
void importSimulationParams()
Import simulation parameters from the xml file (QE curve, etc.)
void importFEMappings()
Imports mappings of FE electronics from the xml file (ARICH-FrontEndMapping.xml) to the database Mapp...
void printHapdPositionFromCrateSlot(int crate, int slot, int channelID)
Prints HAPD position (sector, ring, azimuth) and merger connection (merger, feb slot) from the databa...
void exportAerogelInfoEventDep()
Export intrarun dependant ARICH aerogel data from the database.
void importMirrorAlignment()
Import mirror alignment parameters from ARICH-MirrorAlignment.xml.
ARICHDatabaseImporter()
Default constructor.
void exportAsicInfo()
Export ARICH ASICs data from the database.
void printGlobalAlignment()
Prints global alignment constants.
void importModulesInfo()
Import HAPD modules info from the xml file and database (2D QE maps) Goes through the list of install...
void importAeroTilesInfo()
Import optical information of aerogel tiles into database.
void exportAerogelInfo(int verboseLevel=0)
Export ARICH aerogel data from the database.
void importAerogelInfo(TString coreNameSuffix="")
Import ARICH aerogel data in the database.
TH2F * getFebTestPulse(const std::string &dna, const std::string &run, int febposition)
Returns TH2F histogram of pulse test.
TTimeStamp timedate(std::string enddate)
Convert date (ASICs) to TTimeStamp.
void exportHapdQA()
Export ARICH HAPD QA data from the database.
void printMyParams(const std::string &aeroSerialNumber)
Example that shows how to use data from the database.
void importAsicInfo()
Import ARICH ASICs data in the database.
tessellatedSolidStr readTessellatedSolidVerticesFromDATfile(const std::string &inDATfile)
reads merger cooling bodies geometry from dat files
void printFEMappings()
Prints electronics mappings for all modules (merger ID + SN, merger port, copper, finnese)
void importHapdQE()
Import HAPD quantum efficiency in the database.
void importBiasMappings()
Imports mappings of power supply to bias cables and cables to HAPDs and nominal values of bias voltag...
std::vector< std::pair< float, float > > getFwhm(int serialNum, const std::string &runSCAN)
Returns lists of FWHM values&sigmas.
TTimeStamp timedate2(std::string time)
Convert date (FEB) to TTimeStamp.
void exportSensorModuleMap()
Export module sensor map and info classes from database.
void exportHapdQE()
Export HAPD quantum efficiency from the database.
void exportMagnetTest()
Export results of magnet test.
void exportAerogelMap()
Export ARICH aerogel map in the database.
void printAeroTileInfo()
Prints mapping of aerogel tiles and their optical properties.
void printMergerMapping()
Prints merger to FEB mappings from the database.
void dumpModuleNumbering()
Dumps module numbering scheme into root file (module position on the detector plane -> module number)
void exportFEBoardInfo()
Export module test results.
std::vector< std::string > m_inputFilesHapdQA
Input root files for HAPD QA.
void dumpMergerMapping(bool sn=true)
Dumps module - merger mapping into root file.
void printSimulationPar()
Print simulation parameters from the database (QE curve, etc.)
void importFEBoardInfo()
Import module test results.
void exportModuleTest(const std::string &HVtest)
Export module test results.
std::vector< std::string > m_inputFilesHapdQE
Input root files for HAPD quantum efficiency.
int getAeroTileRing(int slot)
Get aerogel ring number from global indetifier.
void setHAPDQE(unsigned modID, double qe=0.27, bool import=false)
Example function for importing HAPD QE to database class (ARICHModulesInfo)
void printReconstructionPar()
Prints reconstruction parameters.
std::vector< std::string > m_inputFilesAsicRoot
Input root files for ASICs.
std::map< std::string, float > getAerogelParams(const std::string &aeroSerialNumber)
Function that returns refractive index, thickness and transmission length of aerogel.
void printBiasMappings()
Prints mappings of power supply to bias cables and cables to HAPDs and nominal values of bias voltage...
Abstract base class for different kinds of events.
std::vector< int > channelsList(std::string badCH)
Get lists of problematic ASIC channels.
void dumpHvMappings()
Dumps detector map of HAPD modules to HV cable channels.
void importAeroTilesAlignment()
Import aerogel tiles alignment parameters from ARICH-AeroTilesAlignment.xml.
void printNominalBiasVoltageForChannel(std::vector< int > channel)
Prints nominal bias voltage for channel on power supply from the database.
std::tuple< std::string, float > getFebHVtestData(int serial, int hvRun)
Returns data from high voltage test.
virtual ~ARICHDatabaseImporter()
Destructor.
void dumpAerogelOpticalProperties(std::string outRootFileName="ARICH_AerogelOpticalProperties.root")
Dumps aerogel tile properties (aerogel optical properties - AOP) into root file with arich/utility/AR...
void importGlobalAlignment()
Import global alignment parameters from ARICH-GlobalAlignment.xml.
std::vector< TH3F * > getFebTestHistograms(const std::string &dna, const std::string &run, int febposition)
Returns TH3F histograms - offset settings.
void printCopperMapping()
Prints Copper to merger mappings from the database.
void printChannelMask(bool makeHist=false)
Print channel mask of all HAPD modules from the database (lightweight class for sim/rec)
void importCosmicTestGeometry()
Import parameters of the cosmic test geometry configuration.
void importGeometryConfig()
Import geometry configuration parameters to the database.
int getFebDaqSlot(unsigned febSlot)
Returns feb daq position from feb slot.
void importHapdInfo()
Import ARICH HAPD data in the database.
TTimeStamp getAsicDate(const std::string &asicSerial, const std::string &type)
Get date for ASIC measurement.
std::tuple< std::string, float, float, float > getFebLVtestData(int serial, int lvRun)
Returns data from low voltage test.
void exportHapdInfo()
Export ARICH HAPD info and chip info data from the database.
void importFebTestRoot()
Import large histograms from ARICH FEB test data in the database.
std::pair< std::vector< float >, std::vector< float > > getSlopes(int serialNum, const std::string &runSCAN)
Returns lists of slopes (fine & rough)
void importHapdQA()
Import ARICH HAPD QA data in the database.
void printHvMappings()
Prints mappings of power supply to HV cables and cables to HAPDs from the database.
void printModulesInfo()
Print HAPD modules info from the database (lightweight class for sim/rec=)
void importChannelMask()
Import channel mask for all HAPD modules from the database (list of dead channels) Goes through the l...
int getChannelPosition(const std::string &XY, const std::string &chip_2d, int chipnum)
Get position of channel on HAPD.
int getAeroTileColumn(int slot)
Get aerogel ring number from global indetifier.
void importAerogelMap()
Import ARICH aerogel map in the database.
void importAsicInfoRoot()
Import large histograms from ARICH ASICs data in the database.
void importAerogelInfoEventDep()
Import intrarun dependant ARICH aerogel data in the database.
std::vector< std::string > m_inputFilesAsicTxt
Input txt files for ASICs.
void importMagnetTest()
Import results of magnet test.
auto printContainer(const Container_t &rContainer, std::ostream &rStream=std::cout) noexcept -> void
printContainer used for debugging purposes...
void exportHapdChipInfo()
Export ARICH HAPD chip data from the database.
void importSensorModuleMap()
Import module sensor map classes.
void importChannelMapping()
Imports HAPD (asic) channel mappings from the xml file.
void printAeroTilesAlignment()
Prints aerogel tiles alignment constants.
void importSensorModuleInfo()
Import module sensor info classes.
void importModuleTest(const std::string &mypath, const std::string &HVtest)
Import module test results.
void importNominalBiasVoltages()
Imports mappings of nominal values of bias voltages.
void importReconstructionParams()
Import reconstruction parameters (for now only initializes "default" values and imports)
void exportFebTest()
Export ARICH FEB test data from the database.
void printChannelMapping()
Prints HAPD (asic) channel mapping from the database.
void printNominalBiasVoltages()
Prints mappings of nominal values of bias voltages from the database.
void exportAll()
Export all the data.