diff --git a/Control/CalypsoExample/GeoModelTest/python/TestBeamTestConfig.py b/Control/CalypsoExample/GeoModelTest/python/TestBeamTestConfig.py index 641c9a7558a39389d33e2c6f220b951af096f7dc..99f087cc7f8e8c4299042742081f35eff3d7ed66 100644 --- a/Control/CalypsoExample/GeoModelTest/python/TestBeamTestConfig.py +++ b/Control/CalypsoExample/GeoModelTest/python/TestBeamTestConfig.py @@ -26,6 +26,7 @@ def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs): NumVetoStations=1, NumVetoPlatesPerStation=2, NumTriggerStations=0, + PrintSctIDs=True, **kwargs)) return a diff --git a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx index 2deb292d34deba66b91761a7a9d95f10fdcbf0c1..0865640503cfd4d2862f643acb6cbe38a7828dc4 100644 --- a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx +++ b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx @@ -126,11 +126,13 @@ StatusCode GeoModelTestAlg::testSCT() const ATH_MSG_ALWAYS("Retrieved FaserSCT_ID helper from DetStore."); // Print list of identifiers - // for (FaserSCT_ID::const_id_iterator it = helper->wafer_begin(); it != helper->wafer_end(); ++it) - // { - // ATH_MSG_ALWAYS("Wafer ID: " << (it->get_compact() >>32)); - // } - + if (m_printSctIdentifiers) + { + for (FaserSCT_ID::const_id_iterator it = helper->wafer_begin(); it != helper->wafer_end(); ++it) + { + ATH_MSG_ALWAYS("Wafer ID: " << (it->get_compact() >>32)); + } + } for (int iStation = m_firstSctStation; iStation <= m_lastSctStation; iStation++) { // if (m_numSctStations%2 == 0 && iStation == 0) continue; diff --git a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.h b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.h index ff5244b175bfaeb49462fc5c1191dd42cbc8d9bd..010be38c93980f6bb9db5f3f4779b5bc6144b559 100644 --- a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.h +++ b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.h @@ -51,6 +51,7 @@ class GeoModelTestAlg : public AthReentrantAlgorithm Gaudi::Property<int> m_numSctRowsPerPlane {this, "NumSCTRowsPerPlane", 4, "Number of rows of modules per plane in the SCT detector"}; Gaudi::Property<int> m_numSctModulesPerRow {this, "NumSCTModulesPerRow", 2, "Number of modules per row in the SCT detector"}; Gaudi::Property<int> m_numSctStripsPerSensor {this, "NumSCTStripsPerSensor", 768,"Number of readout strips per sensor in the SCT detector"}; + Gaudi::Property<bool> m_printSctIdentifiers {this, "PrintSctIDs", false, "Flag to print raw wafer identifiers"}; int m_numSctStations; // ServiceHandle<MagField::IMagFieldSvc> m_field { this, "FieldService", "FaserFieldSvc" }; diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsData/data/SCT_Conditions.py b/Tracker/TrackerConditions/FaserSCT_ConditionsData/data/SCT_Conditions.py index 899f0037a6acca662e5c640946e504bdafaacec2..d68e69348629a624e4042046b65a51e7cdda37f5 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsData/data/SCT_Conditions.py +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsData/data/SCT_Conditions.py @@ -23,6 +23,10 @@ iftChannels = [ '2583691264', '2585788416', '2587885568', '2589982720', '2592079872', '2594177024', '2596274176', '2598371328', '2600468480', '2602565632', '2604662784', '2606759936', '2608857088', '2610954240', '2613051392', '2615148544', '2617245696', '2619342848', '2621440000', '2623537152', '2625634304', '2627731456', '2629828608', '2631925760', '2634022912', '2636120064', '2638217216', '2640314368', '2642411520', '2644508672', '2646605824', '2648702976' ] +tbChannels = [ + '2147483648', '2151677952', '2155872256', '2160066560', '2164260864', '2168455168', '2172649472', '2176843776', '2181038080', '2185232384', '2189426688', '2193620992', '2197815296', '2202009600', '2206203904', '2210398208', '2214592512', '2218786816', '2222981120', '2227175424', + '2231369728', '2235564032', '2239758336', '2243952640', '2248146944', '2252341248', '2256535552', '2260729856', '2264924160', '2269118464', '2273312768', '2277507072', '2281701376', '2285895680', '2290089984', '2294284288', '2298478592', '2302672896', '2306867200', '2311061504', + '2315255808', '2319450112', '2323644416', '2327838720', '2332033024', '2336227328', '2340421632', '2344615936' ] description = '<timeStamp>run-lumi</timeStamp><addrHeader><address_header clid="1238547719" service_type="71" /></addrHeader><typeName>CondAttrListCollection</typeName>' @@ -38,26 +42,29 @@ dbSvc.dropDatabase( connectString ) db = dbSvc.createDatabase( connectString ) tracker = db.createFolderSet("/Tracker") -# tracker_align = db.createFolderSet("/Tracker/Align") sct = db.createFolderSet("/SCT") sct_dcs = db.createFolderSet("/SCT/DCS") sct_daq = db.createFolderSet("/SCT/DAQ") sct_daq_calibration = db.createFolderSet("/SCT/DAQ/Calibration") -# tracker_align.createTagRelation("TRACKER-01", "TRACKER-ALIGN-01") tracker.createTagRelation("OFLCOND-FASER-01","TRACKER-01") sct_daq_calibration.createTagRelation("SCT-DAQ-01", "SCT-DAQ-Calibration-01") sct_daq.createTagRelation("SCT-01", "SCT-DAQ-01") sct_dcs.createTagRelation("SCT-01", "SCT-DCS-01") sct.createTagRelation("OFLCOND-FASER-01", "SCT-01") -# tracker_align.createTagRelation("TRACKER-02", "TRACKER-ALIGN-02") tracker.createTagRelation("OFLCOND-FASER-02","TRACKER-02") sct_daq_calibration.createTagRelation("SCT-DAQ-02", "SCT-DAQ-Calibration-02") sct_daq.createTagRelation("SCT-02", "SCT-DAQ-02") sct_dcs.createTagRelation("SCT-02", "SCT-DCS-02") sct.createTagRelation("OFLCOND-FASER-02", "SCT-02") +tracker.createTagRelation("OFLCOND-FASER-TB00","TRACKER-TB00") +sct_daq_calibration.createTagRelation("SCT-DAQ-TB00", "SCT-DAQ-Calibration-TB00") +sct_daq.createTagRelation("SCT-TB00", "SCT-DAQ-TB00") +sct_dcs.createTagRelation("SCT-TB00", "SCT-DCS-TB00") +sct.createTagRelation("OFLCOND-FASER-TB00", "SCT-TB00") + glob = db.createFolderSet("/GLOBAL") glob_bfield = db.createFolderSet("/GLOBAL/BField") @@ -67,6 +74,8 @@ glob.createTagRelation("OFLCOND-FASER-01", "GLOBAL-01") glob_bfield.createTagRelation("GLOBAL-02", "GLOBAL-BField-02") glob.createTagRelation("OFLCOND-FASER-02", "GLOBAL-02") +glob_bfield.createTagRelation("GLOBAL-TB00", "GLOBAL-BField-TB00") +glob.createTagRelation("OFLCOND-FASER-TB00", "GLOBAL-TB00") gainSpec = cool.RecordSpecification() gainSpec.extend( 'serialNumber' , cool.StorageType.UInt63 ) @@ -325,4 +334,133 @@ scaleRecord['value'] = 1.0 scaleFolder.storeObject( cool.ValidityKeyMin, cool.ValidityKeyMax, scaleRecord, 1, "GLOBAL-BField-Scale-02", True ) scaleFolder.createTagRelation("GLOBAL-BField-02", "GLOBAL-BField-Scale-02") +# Start of TestBeam + +gainSpec = cool.RecordSpecification() +gainSpec.extend( 'serialNumber' , cool.StorageType.UInt63 ) +gainSpec.extend( 'runNumber' , cool.StorageType.UInt32 ) +gainSpec.extend( 'scanNumber' , cool.StorageType.UInt32 ) +gainSpec.extend( 'gainByChip' , cool.StorageType.String4k ) +gainSpec.extend( 'gainRMSByChip' , cool.StorageType.String4k ) +gainSpec.extend( 'offsetByChip' , cool.StorageType.String4k ) +gainSpec.extend( 'offsetRMSByChip' , cool.StorageType.String4k ) +gainSpec.extend( 'noiseByChip' , cool.StorageType.String4k ) +gainSpec.extend( 'noiseRMSByChip' , cool.StorageType.String4k ) + +gainRecord = cool.Record(gainSpec) +gainRecord[ 'serialNumber' ] = 0 +gainRecord[ 'runNumber' ] = 0 +gainRecord[ 'scanNumber' ] = 0 +gainRecord[ 'gainByChip' ] = '52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0' +gainRecord[ 'gainRMSByChip' ] = '1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25' +gainRecord[ 'offsetByChip' ] = '45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0' +gainRecord[ 'offsetRMSByChip' ] = '1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75' +gainRecord[ 'noiseByChip' ] = '1600.0 1600.0 1600.0 1600.0 1600.0 1600.0 1600.0 1600.0 1600.0 1600.0 1600.0 1600.0' +gainRecord[ 'noiseRMSByChip' ] = '45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0' + +# gainFolderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, gainSpec) +# gainFolder = db.createFolder('/SCT/DAQ/Calibration/ChipGain', gainFolderSpec, description, True) + +for channel in tbChannels: + gainFolder.storeObject( cool.ValidityKeyMin, cool.ValidityKeyMax, gainRecord, int(channel), "SCT-DAQ-Calibration-ChipGain-TB00", True ) +gainFolder.createTagRelation("SCT-DAQ-Calibration-TB00", "SCT-DAQ-Calibration-ChipGain-TB00") + +noiseSpec = cool.RecordSpecification() +noiseSpec.extend( 'serialNumber' , cool.StorageType.UInt63 ) +noiseSpec.extend( 'runNumber' , cool.StorageType.UInt32 ) +noiseSpec.extend( 'scanNumber' , cool.StorageType.UInt32 ) +noiseSpec.extend( 'offsetByChip' , cool.StorageType.String4k ) +noiseSpec.extend( 'occupancyByChip' , cool.StorageType.String4k ) +noiseSpec.extend( 'occupancyRMSByChip' , cool.StorageType.String4k ) +noiseSpec.extend( 'noiseByChip' , cool.StorageType.String4k ) + +noiseRecord = cool.Record(noiseSpec) +noiseRecord[ 'serialNumber' ] = 0 +noiseRecord[ 'runNumber' ] = 0 +noiseRecord[ 'scanNumber' ] = 0 +noiseRecord[ 'offsetByChip' ] = '60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0' +noiseRecord[ 'occupancyByChip' ] = '3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05 3.50e-05' +noiseRecord[ 'occupancyRMSByChip' ] = '2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05 2.50e-05' + +# noiseFolderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, noiseSpec) +# noiseFolder = db.createFolder('/SCT/DAQ/Calibration/ChipNoise', noiseFolderSpec, description, True ) + +for channel in tbChannels: + noiseFolder.storeObject( cool.ValidityKeyMin, cool.ValidityKeyMax, noiseRecord, int(channel), "SCT-DAQ-Calibration-Noise-TB00", True ) +noiseFolder.createTagRelation("SCT-DAQ-Calibration-TB00", "SCT-DAQ-Calibration-Noise-TB00") + +chanstatSpec = cool.RecordSpecification() +chanstatSpec.extend( 'LVCHSTAT_RECV' , cool.StorageType.Int32 ) +chanstatSpec.extend( 'STATE' , cool.StorageType.UInt32 ) + +chanstatRecord = cool.Record(chanstatSpec) +chanstatRecord[ 'LVCHSTAT_RECV' ] = 209 +chanstatRecord[ 'STATE' ] = 17 + +# chanstatFolderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, chanstatSpec) +# chanstatFolder = db.createFolder('/SCT/DCS/CHANSTAT', chanstatFolderSpec, descriptionDCS, True ) + +for channel in tbChannels: + chanstatFolder.storeObject( cool.ValidityKeyMin, cool.ValidityKeyMax, chanstatRecord, int(channel), "SCT-DCS-Status-TB00", True ) +chanstatFolder.createTagRelation("SCT-DCS-TB00", "SCT-DCS-Status-TB00") + +hvSpec = cool.RecordSpecification() +hvSpec.extend( 'HVCHVOLT_RECV' , cool.StorageType.Float ) +hvSpec.extend( 'HVCHCURR_RECV' , cool.StorageType.Float ) + +hvRecord = cool.Record(hvSpec) +hvRecord[ 'HVCHVOLT_RECV' ] = 150.0 +hvRecord[ 'HVCHCURR_RECV' ] = 10.0 + +# hvFolderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, hvSpec) +# hvFolder = db.createFolder('/SCT/DCS/HV', hvFolderSpec, descriptionDCS, True ) + +for channel in tbChannels: + hvFolder.storeObject( cool.ValidityKeyMin, cool.ValidityKeyMax, hvRecord, int(channel), "SCT-DCS-HV-TB00", True ) +hvFolder.createTagRelation("SCT-DCS-TB00", "SCT-DCS-HV-TB00") + +modtempSpec = cool.RecordSpecification() +modtempSpec.extend( 'MOCH_TM0_RECV' , cool.StorageType.Float ) +modtempSpec.extend( 'MOCH_TM1_RECV' , cool.StorageType.Float ) + +modtempRecord = cool.Record(modtempSpec) +modtempRecord[ 'MOCH_TM0_RECV' ] = 7.0 +modtempRecord[ 'MOCH_TM1_RECV' ] = 7.0 + +# modtempFolderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, modtempSpec) +# modtempFolder = db.createFolder('/SCT/DCS/MODTEMP', modtempFolderSpec, descriptionDCS, True ) + +for channel in tbChannels: + modtempFolder.storeObject( cool.ValidityKeyMin, cool.ValidityKeyMax, modtempRecord, int(channel), "SCT-DCS-Temp-TB00", True ) +modtempFolder.createTagRelation("SCT-DCS-TB00", "SCT-DCS-Temp-TB00") + + +mapSpec = cool.RecordSpecification() +mapSpec.extend( 'FieldType', cool.StorageType.String4k ) +mapSpec.extend( 'MapFileName', cool.StorageType.String4k ) + +mapRecord = cool.Record(mapSpec) +mapRecord['FieldType'] = "GlobalMap" +mapRecord['MapFileName'] = "file:MagneticFieldMaps/FaserFieldTable.root" + +# mapFolderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, mapSpec) +# mapFolder = db.createFolder('/GLOBAL/BField/Maps', mapFolderSpec, descriptionDCS, True ) + +mapFolder.storeObject( cool.ValidityKeyMin, cool.ValidityKeyMax, mapRecord, 1, "GLOBAL-BField-Maps-TB00", True ) +mapFolder.createTagRelation("GLOBAL-BField-TB00", "GLOBAL-BField-Maps-TB00") + +scaleSpec = cool.RecordSpecification() +scaleSpec.extend( 'value', cool.StorageType.Float ) + +scaleRecord = cool.Record(scaleSpec) +scaleRecord['value'] = 0.0 + +# scaleFolderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, scaleSpec) +# scaleFolder = db.createFolder('/GLOBAL/BField/Scales', scaleFolderSpec, descriptionDCS, True ) + +# Channel names don't seem to be handled properly by Athena +# scaleFolder.createChannel( 1, "Dipole_Scale" ) +scaleFolder.storeObject( cool.ValidityKeyMin, cool.ValidityKeyMax, scaleRecord, 1, "GLOBAL-BField-Scale-TB00", True ) +scaleFolder.createTagRelation("GLOBAL-BField-TB00", "GLOBAL-BField-Scale-TB00") + db.closeDatabase()