diff --git a/Control/CalypsoConfiguration/python/DetectorConfigFlags.py b/Control/CalypsoConfiguration/python/DetectorConfigFlags.py index 763f1176951ecef9e3ecb3a57d7b8a607d449bbb..1cd75d9c11a5eeb5c94c57aee362369ffd631d1f 100644 --- a/Control/CalypsoConfiguration/python/DetectorConfigFlags.py +++ b/Control/CalypsoConfiguration/python/DetectorConfigFlags.py @@ -7,13 +7,13 @@ from CalypsoConfiguration.AutoConfigFlags import DetDescrInfo, getDefaultDetecto allDetectors = [ - 'Emulsion', 'Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Ecal', 'Dipole', + 'Emulsion', 'Veto', 'Trigger', 'Preshower', 'VetoNu', 'FaserSCT', 'Ecal', 'Dipole', ] allGroups = { 'Neutrino' : [ 'Emulsion' ], 'Tracker' : ['SCT'], - 'Scintillator' : ['Veto', 'Trigger', 'Preshower'], + 'Scintillator' : ['Veto', 'Trigger', 'Preshower', 'VetoNu'], 'FaserCalo' : ['Ecal'], 'Magnet' : ['Dipole'] } @@ -32,9 +32,11 @@ def createDetectorConfigFlags(): dcf.addFlag('Detector.GeometryVeto', False) dcf.addFlag('Detector.GeometryTrigger', False) dcf.addFlag('Detector.GeometryPreshower', False) + dcf.addFlag('Detector.GeometryVetoNu', False) dcf.addFlag('Detector.GeometryScintillator', lambda prevFlags : (prevFlags.Detector.GeometryVeto or prevFlags.Detector.GeometryTrigger or - prevFlags.Detector.GeometryPreshower)) + prevFlags.Detector.GeometryPreshower or + prevFlags.Detector.GeometryVetoNu)) dcf.addFlag('Detector.GeometryFaserSCT', False) dcf.addFlag('Detector.GeometryTracker', lambda prevFlags : prevFlags.Detector.GeometryFaserSCT ) @@ -66,9 +68,11 @@ def createDetectorConfigFlags(): dcf.addFlag('Detector.EnableVeto', lambda prevFlags : 'Veto' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) dcf.addFlag('Detector.EnableTrigger', lambda prevFlags : 'Trigger' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) dcf.addFlag('Detector.EnablePreshower', lambda prevFlags : 'Preshower' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) + dcf.addFlag('Detector.EnableVetoNu', lambda prevFlags : 'VetoNu' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) dcf.addFlag('Detector.EnableScintillator',lambda prevFlags : (prevFlags.Detector.EnableVeto or prevFlags.Detector.EnableTrigger or - prevFlags.Detector.EnablePreshower)) + prevFlags.Detector.EnablePreshower or + prevFlags.Detector.EnableVetoNu)) dcf.addFlag('Detector.EnableFaserSCT', lambda prevFlags : 'FaserSCT' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) dcf.addFlag('Detector.EnableTracker', lambda prevFlags : prevFlags.Detector.EnableFaserSCT ) dcf.addFlag('Detector.EnableEcal', lambda prevFlags : 'Ecal' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) @@ -86,8 +90,9 @@ def createDetectorConfigFlags(): dcf.addFlag('Detector.RecoTrigger', False) dcf.addFlag('Detector.RecoPreshower', False) dcf.addFlag('Detector.RecoEcal', False) + dcf.addFlag('Detector.RecoVetoNu', False) dcf.addFlag('Detector.RecoWaveform', lambda prevFlags : (prevFlags.Detector.RecoVeto or prevFlags.Detector.RecoTrigger or - prevFlags.Detector.RecoPreshower or prevFlags.Detector.RecoEcal)) + prevFlags.Detector.RecoPreshower or prevFlags.Detector.RecoVetoNu or prevFlags.Detector.RecoEcal)) dcf.addFlag('Detector.RecoFaserSCT', False) dcf.addFlag('Detector.RecoTracker', lambda prevFlags : (prevFlags.Detector.RecoFaserSCT)) diff --git a/Control/CalypsoConfiguration/python/testDetectorFlags.py b/Control/CalypsoConfiguration/python/testDetectorFlags.py index 9a555b4c637e5699aefd8516874286f1e127b51c..ab8c1e99cf6373e09dc02b94fd72d2560df187d2 100644 --- a/Control/CalypsoConfiguration/python/testDetectorFlags.py +++ b/Control/CalypsoConfiguration/python/testDetectorFlags.py @@ -54,11 +54,13 @@ assert flags.Detector.GeometryDipole assert not flags.Detector.EnableFaserSCT assert not flags.Detector.EnableEcal assert not flags.Detector.EnableVeto +assert not flags.Detector.EnableVetoNu assert not flags.Detector.EnableTrigger assert not flags.Detector.EnablePreshower assert not flags.Detector.GeometryFaserSCT assert not flags.Detector.GeometryEcal assert not flags.Detector.GeometryVeto +assert not flags.Detector.GeometryVetoNu assert not flags.Detector.GeometryTrigger assert not flags.Detector.GeometryPreshower print() diff --git a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx index 0865640503cfd4d2862f643acb6cbe38a7828dc4..8bbb0df463dd64420e248ef6b51361fc8c81db57 100644 --- a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx +++ b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx @@ -4,6 +4,7 @@ #include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "ScintReadoutGeometry/VetoDetectorManager.h" +#include "ScintReadoutGeometry/VetoNuDetectorManager.h" #include "ScintReadoutGeometry/TriggerDetectorManager.h" #include "ScintReadoutGeometry/PreshowerDetectorManager.h" #include "TrackerReadoutGeometry/SCT_DetectorManager.h" @@ -12,6 +13,7 @@ #include "TrackerReadoutGeometry/SiDetectorElement.h" #include "ScintIdentifier/VetoID.h" +#include "ScintIdentifier/VetoNuID.h" #include "ScintIdentifier/TriggerID.h" #include "ScintIdentifier/PreshowerID.h" #include "TrackerIdentifier/FaserSCT_ID.h" @@ -68,6 +70,8 @@ StatusCode GeoModelTestAlg::execute(const EventContext& ctx) const ATH_CHECK(testVeto()); + ATH_CHECK(testVetoNu()); + ATH_CHECK(testTrigger()); ATH_CHECK(testPreshower()); @@ -469,6 +473,160 @@ StatusCode GeoModelTestAlg::testSCT() const return StatusCode::SUCCESS; } +StatusCode GeoModelTestAlg::testVetoNu() const +{ + // Test retrieval of helper object directly from store + const VetoNuID* helper = nullptr; + ATH_CHECK(detStore()->retrieve(helper, "VetoNuID")); + if (helper != nullptr) + { + // Test neighbors with helper function + const IdContext& context = helper->plate_context(); + ATH_MSG_ALWAYS("Retrieved VetoNuID helper from DetStore."); + for (int iStation = 0; iStation < m_numVetoNuStations; iStation++) + { + for (int iPlate = 0; iPlate < m_numVetoNuPlatesPerStation; iPlate++) + { + Identifier thisId = helper->plate_id(iStation, iPlate, true); + IdentifierHash thisHash = helper->plate_hash(thisId); + IdentifierHash prevHash; + IdentifierHash nextHash; + Identifier prevId; + Identifier nextId; + int prevStation {-1}; + int prevPlate {-1}; + int nextStation {-1}; + int nextPlate {-1}; + int prevStat = helper->get_prev_in_z(thisHash, prevHash); + if (prevStat == 0) + { + IdentifierHash testHash; + int nextStat = helper->get_next_in_z(prevHash, testHash); + if (nextStat != 0 || testHash != thisHash) + { + ATH_MSG_FATAL("Next VetoNu plate (" << testHash << ") of previous (" << prevHash << ") is not the original (" << thisHash <<")" ); + return StatusCode::FAILURE; + } + prevStat = helper->get_id(prevHash, prevId, &context); + if (prevStat == 0) + { + prevStation = helper->station(prevId); + prevPlate = helper->plate(prevId); + } + } + int nextStat = helper->get_next_in_z(thisHash, nextHash); + if (nextStat == 0) + { + IdentifierHash testHash; + prevStat = helper->get_prev_in_z(nextHash, testHash); + if (prevStat != 0 || testHash != thisHash) + { + ATH_MSG_FATAL("Previous veto plate (" << testHash << ") of next (" << nextHash << ") is not the original (" << thisHash <<")" ); + return StatusCode::FAILURE; + } + nextStat = helper->get_id(nextHash, nextId, &context); + if (nextStat == 0) + { + nextStation = helper->station(nextId); + nextPlate = helper->plate(nextId); + } + } + ATH_MSG_ALWAYS("Station/Plate " << iStation << "/" << iPlate << + " (" << thisHash << ") " << + " : prev = " << prevStation << "/" << prevPlate << + " , next = " << nextStation << "/" << nextPlate ); + } + } + } + else + { + ATH_MSG_FATAL("Failed to retrieve VetoNuID helper from DetStore."); + return StatusCode::FAILURE; + } + + // Test direct retrieval of typed managers from DetStore + const ScintDD::VetoNuDetectorManager* vetoMgr = nullptr; + ATH_CHECK(detStore()->retrieve(vetoMgr, "VetoNu")); + if (vetoMgr != nullptr) + { + ATH_MSG_ALWAYS("Retrieved (typed) VetoNu detector manager with " << vetoMgr->getNumTreeTops() << " treetops directly from DetStore."); + // Compare numerology with the "right" answers from our properties + if (vetoMgr->numerology().numStations() != m_numVetoNuStations) + { + ATH_MSG_FATAL("Disagreement in number of veto stations."); + return StatusCode::FAILURE; + } + if (m_numVetoNuStations > 0 && vetoMgr->numerology().numPlatesPerStation() != m_numVetoNuPlatesPerStation) + { + ATH_MSG_FATAL("Disagreement in number of plates per veto station."); + return StatusCode::FAILURE; + } + if (m_numVetoNuStations > 0 && m_numVetoNuPlatesPerStation > 0 && vetoMgr->numerology().numPmtsPerPlate() != m_numVetoNuPmtsPerPlate) + { + ATH_MSG_FATAL("Disagreement in number of pmts per veto plate."); + return StatusCode::FAILURE; + } + // Test detector elements + const ScintDD::ScintDetectorElementCollection* elements = vetoMgr->getDetectorElementCollection(); + for (int station = 0; station < m_numVetoNuStations; station++) + { + for (int plate = 0; plate < m_numVetoNuPlatesPerStation; plate++) + { + Identifier id = helper->plate_id(station, plate, true); + if (!vetoMgr->identifierBelongs(id)) + { + ATH_MSG_FATAL("Valid VetoNu identifier does not pass identifierBelongs."); + return StatusCode::FAILURE; + } + IdentifierHash hash = helper->plate_hash(id); + ScintDD::ScintDetectorElement* elementByLevels = vetoMgr->getDetectorElement(station, plate); + ScintDD::ScintDetectorElement* elementById = vetoMgr->getDetectorElement(id); + ScintDD::ScintDetectorElement* elementByHash = vetoMgr->getDetectorElement(hash); + ScintDD::ScintDetectorElement* element = (*elements)[hash]; + if (elementByLevels != element || elementById != element || elementByHash != element) + { + ATH_MSG_FATAL("Inconsistent retrieval of VetoNu detector elements"); + return StatusCode::FAILURE; + } + ATH_MSG_ALWAYS("Found VetoNu plate (" << station << ", " << plate << ") with global center at (" << + element->center().x() << ", " << + element->center().y() << ", " << + element->center().z() << ")." + ); + const ScintDD::ScintDetectorElement* next = element->nextInZ(); + if (next != nullptr) + { + if (next->prevInZ() != element) + { + ATH_MSG_FATAL("Previous neighbor of next VetoNu element is not this element."); + return StatusCode::FAILURE; + } + } + const ScintDD::ScintDetectorElement* prev = element->prevInZ(); + if (prev != nullptr) + { + if (prev->nextInZ() != element) + { + ATH_MSG_FATAL("Next neighbor of previous VetoNu element is not this element."); + return StatusCode::FAILURE; + } + } + if (next == nullptr && prev == nullptr && m_numVetoPlatesPerStation > 1) + { + ATH_MSG_FATAL("Veto element " << hash << " has no previous OR next neighbor."); + return StatusCode::FAILURE; + } + } + } + } + else + { + ATH_MSG_FATAL("Failed to retrieve (typed) Veto detector manager directly from DetStore."); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; +} + StatusCode GeoModelTestAlg::testVeto() const { // Test retrieval of helper object directly from store @@ -623,6 +781,10 @@ StatusCode GeoModelTestAlg::testVeto() const return StatusCode::SUCCESS; } + + + + StatusCode GeoModelTestAlg::testTrigger() const { // Test retrieval of helper object directly from store diff --git a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.h b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.h index 010be38c93980f6bb9db5f3f4779b5bc6144b559..9fe9ab00f3ca5fc31ca2208b2f5ae72024829636 100644 --- a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.h +++ b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.h @@ -26,6 +26,7 @@ class GeoModelTestAlg : public AthReentrantAlgorithm private: StatusCode testVeto() const; + StatusCode testVetoNu() const; StatusCode testTrigger() const; StatusCode testPreshower() const; StatusCode testSCT() const; @@ -45,6 +46,10 @@ class GeoModelTestAlg : public AthReentrantAlgorithm Gaudi::Property<int> m_numPreshowerPlatesPerStation {this, "NumPreshowerPlatesPerStation", 2, "Number of plates per station in the Preshower detector"}; Gaudi::Property<int> m_numPreshowerPmtsPerPlate {this, "NumPreshowerPmtsPerPlate", 1, "Number of pmts per plate in the Preshower detector"}; + Gaudi::Property<int> m_numVetoNuStations {this, "NumVetoNuStations", 1, "Number of stations in the VetoNu detector"}; + Gaudi::Property<int> m_numVetoNuPlatesPerStation {this, "NumVetoNuPlatesPerStation", 2, "Number of plates per station in the VetoNu detector"}; + Gaudi::Property<int> m_numVetoNuPmtsPerPlate {this, "NumVetoNuPmtsPerPlate", 1, "Number of pmts per plate in the VetoNu detector"}; + Gaudi::Property<int> m_firstSctStation {this, "FirstSCTStation", 1, "Identifier of the first SCT station (0 w/FaserNu, 1 otherwise)"}; Gaudi::Property<int> m_lastSctStation {this, "LastSCTStation", 3, "Identifier of the last SCT station (normally 3)"}; Gaudi::Property<int> m_numSctPlanesPerStation {this, "NumSCTPlanesPerStation", 3, "Number of planes per station in the SCT detector"}; diff --git a/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.h b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.h index b64fe128eac2531f3a4c44b98dbb2e19f2f9d301..3b212bbd59e5503dd7a6f14b55cc805fb6f22bb1 100644 --- a/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.h +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.h @@ -20,10 +20,12 @@ class ScintHit; class VetoID; class TriggerID; class PreshowerID; +class VetoNuID; namespace ScintDD { class VetoDetectorManager; class TriggerDetectorManager; class PreshowerDetectorManager; + class VetoNuDetectorManager; } class GeoScintHit { @@ -41,7 +43,7 @@ class GeoScintHit { // Is this hit ok? - operator bool () const { return s_veto || s_trigger || s_preshower; } + operator bool () const { return s_veto || s_trigger || s_preshower || s_vetonu; } private: @@ -49,9 +51,11 @@ class GeoScintHit { const ScintHit *m_hit; static const ScintDD::VetoDetectorManager *s_veto; + static const ScintDD::VetoNuDetectorManager *s_vetonu; static const ScintDD::TriggerDetectorManager *s_trigger; static const ScintDD::PreshowerDetectorManager *s_preshower; static const VetoID *s_vID; + static const VetoNuID *s_vnID; static const TriggerID *s_tID; static const PreshowerID *s_pID; }; diff --git a/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.icc b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.icc index 47610f91a19cded0a84bb7e6c3c955d3bf4faaa9..ce5f695001bf3ae2693bac3e85704c16cc856739 100644 --- a/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.icc +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.icc @@ -5,11 +5,13 @@ #include "ScintSimEvent/ScintHit.h" #include "ScintReadoutGeometry/ScintDetectorElement.h" #include "ScintReadoutGeometry/VetoDetectorManager.h" +#include "ScintReadoutGeometry/VetoNuDetectorManager.h" #include "ScintReadoutGeometry/TriggerDetectorManager.h" #include "ScintReadoutGeometry/PreshowerDetectorManager.h" #include "StoreGate/StoreGateSvc.h" #include "StoreGate/StoreGateSvc.h" #include "ScintIdentifier/VetoID.h" +#include "ScintIdentifier/VetoNuID.h" #include "ScintIdentifier/TriggerID.h" #include "ScintIdentifier/PreshowerID.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" @@ -20,12 +22,16 @@ inline void GeoScintHit::init() { if (detStore.retrieve().isSuccess()) { if(detStore->retrieve(s_veto,"Veto").isFailure()) s_veto = 0; + if(detStore->retrieve(s_veto,"VetoNu").isFailure()) + s_vetonu = 0; if(detStore->retrieve(s_trigger,"Trigger").isFailure()) s_trigger = 0; if(detStore->retrieve(s_preshower,"Preshower").isFailure()) s_preshower = 0; if(detStore->retrieve(s_vID,"VetoID").isFailure()) s_vID = 0; + if(detStore->retrieve(s_vID,"VetoNuID").isFailure()) + s_vnID = 0; if(detStore->retrieve(s_tID,"TriggerID").isFailure()) s_tID = 0; if(detStore->retrieve(s_pID,"PreshowerID").isFailure()) @@ -35,7 +41,7 @@ inline void GeoScintHit::init() { inline GeoScintHit::GeoScintHit (const ScintHit & h) { m_hit = &h; - if (!s_veto || ! s_trigger || ! s_preshower ) init(); + if (!s_veto || ! s_trigger || ! s_preshower || ! s_vetonu) init(); } inline HepGeom::Point3D<double> GeoScintHit::getGlobalPosition() const { @@ -48,6 +54,11 @@ inline HepGeom::Point3D<double> GeoScintHit::getGlobalPosition() const { m_hit->getPlate()); geoelement = s_veto->getDetectorElement(id); } + else if (m_hit->isVetoNu()) { + id = s_vnID->plate_id(Station, + m_hit->getPlate()); + geoelement = s_vetonu->getDetectorElement(id); + } else if (m_hit->isTrigger()) { id = s_tID->plate_id(Station, m_hit->getPlate()); diff --git a/DetectorDescription/GeoModel/FaserGeoAdaptors/src/statics.cxx b/DetectorDescription/GeoModel/FaserGeoAdaptors/src/statics.cxx index ca6dd213cbe3a3782bbe5a45500b9a09e48eee09..ab41b1e48be0304a68b0a79e846096bbd60f2acd 100644 --- a/DetectorDescription/GeoModel/FaserGeoAdaptors/src/statics.cxx +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/src/statics.cxx @@ -9,12 +9,14 @@ const NeutrinoDD::EmulsionDetectorManager *GeoNeutrinoHit::s_emulsion = 0; const ScintDD::VetoDetectorManager *GeoScintHit::s_veto = 0; +const ScintDD::VetoNuDetectorManager *GeoScintHit::s_vetonu = 0; const ScintDD::TriggerDetectorManager *GeoScintHit::s_trigger = 0; const ScintDD::PreshowerDetectorManager *GeoScintHit::s_preshower = 0; const TrackerDD::SCT_DetectorManager *GeoFaserSiHit::s_sct; const CaloDD::EcalDetectorManager *GeoFaserCaloHit::s_ecal = 0; const EmulsionID *GeoNeutrinoHit::s_nID = 0; const VetoID *GeoScintHit::s_vID = 0; +const VetoNuID *GeoScintHit::s_vnID = 0; const TriggerID *GeoScintHit::s_tID = 0; const PreshowerID *GeoScintHit::s_pID = 0; const FaserSCT_ID *GeoFaserSiHit::s_sID = 0; diff --git a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql index 91da60701ed83465bd8a3ef50b6f4d11073c424d..11cc87563304b922c0bcd22c3f7f6775c8eb8fb9 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql +++ b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql @@ -269,6 +269,75 @@ CREATE TABLE IF NOT EXISTS "VETORADIATORGENERAL_DATA2TAG" ( "VETORADIATORGENERAL_DATA_ID" SLONGLONG ); -- +-- Tables for describing VetoNu scintillator plates (and passive radiators) +-- +DROP TABLE IF EXISTS "VETONUTOPLEVEL_DATA"; +CREATE TABLE IF NOT EXISTS "VETONUTOPLEVEL_DATA" ( + "VETONUTOPLEVEL_DATA_ID" SLONGLONG UNIQUE, + "POSX" DOUBLE, + "POSY" DOUBLE, + "POSZ" DOUBLE, + "ROTX" DOUBLE, + "ROTY" DOUBLE, + "ROTZ" DOUBLE, + "ROTORDER" INT, + "LABEL" TEXT +); +-- +-- The DATA2TAG tables associate specific rows of the corresponding +-- _DATA table with the referenced tag (from the HVS_TAG2NODE table). +-- This is a many-to-many relationship: each row may belong to +-- several tags, and each tag may apply to several rows. +DROP TABLE IF EXISTS "VETONUTOPLEVEL_DATA2TAG"; +CREATE TABLE IF NOT EXISTS "VETONUTOPLEVEL_DATA2TAG" ( + "VETONUTOPLEVEL_TAG_ID" SLONGLONG, + "VETONUTOPLEVEL_DATA_ID" SLONGLONG +); +-- +DROP TABLE IF EXISTS "VETONUSTATIONGENERAL_DATA"; +CREATE TABLE IF NOT EXISTS "VETONUSTATIONGENERAL_DATA" ( + "VETONUSTATIONGENERAL_DATA_ID" SLONGLONG UNIQUE, + "NUMPLATES" INT, + "PLATEPITCH" DOUBLE +); +-- +DROP TABLE IF EXISTS "VETONUSTATIONGENERAL_DATA2TAG"; +CREATE TABLE IF NOT EXISTS "VETONUSTATIONGENERAL_DATA2TAG" ( + "VETONUSTATIONGENERAL_TAG_ID" SLONGLONG, + "VETONUSTATIONGENERAL_DATA_ID" SLONGLONG +); +-- +DROP TABLE IF EXISTS "VETONUPLATEGENERAL_DATA"; +CREATE TABLE IF NOT EXISTS "VETONUPLATEGENERAL_DATA" ( + "VETONUPLATEGENERAL_DATA_ID" SLONGLONG UNIQUE, + "NUMPMTS" INT, + "WIDTH" DOUBLE, + "LENGTH" DOUBLE, + "THICKNESS" DOUBLE, + "MATERIAL" TEXT +); +-- +DROP TABLE IF EXISTS "VETONUPLATEGENERAL_DATA2TAG"; +CREATE TABLE IF NOT EXISTS "VETONUPLATEGENERAL_DATA2TAG" ( + "VETONUPLATEGENERAL_TAG_ID" SLONGLONG, + "VETONUPLATEGENERAL_DATA_ID" SLONGLONG +); +-- +DROP TABLE IF EXISTS "VETONURADIATORGENERAL_DATA"; +CREATE TABLE IF NOT EXISTS "VETONURADIATORGENERAL_DATA" ( + "VETONURADIATORGENERAL_DATA_ID" SLONGLONG UNIQUE, + "WIDTH" DOUBLE, + "LENGTH" DOUBLE, + "THICKNESS" DOUBLE, + "MATERIAL" TEXT +); +-- +DROP TABLE IF EXISTS "VETONURADIATORGENERAL_DATA2TAG"; +CREATE TABLE IF NOT EXISTS "VETONURADIATORGENERAL_DATA2TAG" ( + "VETONURADIATORGENERAL_TAG_ID" SLONGLONG, + "VETONURADIATORGENERAL_DATA_ID" SLONGLONG +); +-- -- Tables for describing Trigger scintillator plates (and passive radiators) -- DROP TABLE IF EXISTS "TRIGGERTOPLEVEL_DATA"; @@ -602,6 +671,22 @@ CREATE TABLE IF NOT EXISTS "VETOSWITCHES_DATA2TAG" ( "VETOSWITCHES_DATA_ID" SLONGLONG ); -- +DROP TABLE IF EXISTS "VETONUSWITCHES_DATA"; +CREATE TABLE IF NOT EXISTS "VETONUSWITCHES_DATA" ( + "VETONUSWITCHES_DATA_ID" SLONGLONG UNIQUE, + "DETECTORNAME" TEXT , + "USEMAGFIELDSVC" INT , + "COSMICLAYOUT" INT , + "VERSIONNAME" TEXT , + "LAYOUT" TEXT , + "DESCRIPTION" TEXT +); +DROP TABLE IF EXISTS "VETONUSWITCHES_DATA2TAG"; +CREATE TABLE IF NOT EXISTS "VETONUSWITCHES_DATA2TAG" ( + "VETONUSWITCHES_TAG_ID" SLONGLONG, + "VETONUSWITCHES_DATA_ID" SLONGLONG +); +-- DROP TABLE IF EXISTS "TRIGGERSWITCHES_DATA"; CREATE TABLE IF NOT EXISTS "TRIGGERSWITCHES_DATA" ( "TRIGGERSWITCHES_DATA_ID" SLONGLONG UNIQUE, @@ -745,6 +830,12 @@ INSERT INTO "HVS_NODE" VALUES (232, "PreshowerPlateGeneral", 23, 0, NULL); INSERT INTO "HVS_NODE" VALUES (234, "PreshowerSwitches", 23, 0, NULL ); INSERT INTO "HVS_NODE" VALUES (235, "PreshowerRadiatorGeneral", 23, 0, NULL); INSERT INTO "HVS_NODE" VALUES (236, "PreshowerAbsorberGeneral", 23, 0, NULL); +INSERT INTO "HVS_NODE" VALUES (24, "VetoNu", 2, 1, NULL); +INSERT INTO "HVS_NODE" VALUES (240, "VetoNuTopLevel", 24, 0, NULL); +INSERT INTO "HVS_NODE" VALUES (241, "VetoNuStationGeneral", 24, 0, NULL); +INSERT INTO "HVS_NODE" VALUES (242, "VetoNuPlateGeneral", 24, 0, NULL); +INSERT INTO "HVS_NODE" VALUES (244, "VetoNuSwitches", 24, 0, NULL ); +INSERT INTO "HVS_NODE" VALUES (245, "VetoNuRadiatorGeneral", 24, 0, NULL); INSERT INTO "HVS_NODE" VALUES (3, "Tracker", 0, 1, NULL); INSERT INTO "HVS_NODE" VALUES (3003, "TrackerMaterials", 3, 0, NULL); INSERT INTO "HVS_NODE" VALUES (3004, "TrackerMatComponents", 3, 0, NULL); @@ -806,6 +897,7 @@ INSERT INTO "HVS_TAG2NODE" VALUES (2, "Scintillator-00", 100001, NULL, 0, 0, 154 INSERT INTO "HVS_TAG2NODE" VALUES (2, "Scintillator-01", 100042, NULL, 0, 0, 1590796800000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (2, "Scintillator-02", 107789, NULL, 0, 0, 1619222400000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (2, "Scintillator-TB00", 107814, NULL, 0, 0, 1627862400000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (2, "Scintillator-03", 107843, NULL, 0, 0, 1652054400000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (3, "Tracker-00", 100002, NULL, 0, 0, 1549238400000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (3, "Tracker-01", 100038, NULL, 0, 0, 1590796800000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (3, "Tracker-CR", 107783, NULL, 0, 0, 1598400000000000000, NULL, 22); @@ -884,6 +976,12 @@ INSERT INTO "HVS_TAG2NODE" VALUES (231, "PreshowerStationGeneral-01", 100052, N INSERT INTO "HVS_TAG2NODE" VALUES (232, "PreshowerPlateGeneral-00", 120025, NULL, 0, 0, 1581292800000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (235, "PreshowerRadatorGeneral-00", 107808, NULL, 0, 0, 1627776000000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (236, "PreshowerAbsorberGeneral-00", 107809, NULL, 0, 0, 1627776000000000000, NULL, 22); + +INSERT INTO "HVS_TAG2NODE" VALUES (240, "VetoNuTopLevel-00", 107845, NULL, 0, 0, 1652054400000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (241, "VetoNuStationGeneral-00", 107846, NULL, 0, 0, 1652054400000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (242, "VetoNuPlateGeneral-00", 107847, NULL, 0, 0, 1652054400000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (245, "VetoNuRadiatorGeneral-00", 107849, NULL, 0, 0, 1652054400000000000, NULL, 22); + INSERT INTO "HVS_TAG2NODE" VALUES (1003, "NeutrinoMaterials-00", 100032, NULL, 0, 0, 1582416000000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (1004, "NeutrinoMatComponents-00", 100033, NULL, 0, 0, 1582416000000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (2003, "ScintMaterials-00", 100011, NULL, 0, 0, 1549238400000000000, NULL, 22); @@ -895,6 +993,7 @@ INSERT INTO "HVS_TAG2NODE" VALUES (4004, "CaloMatComponents-00", 100024, NULL, 0 INSERT INTO "HVS_TAG2NODE" VALUES (214, "VetoSwitches-00", 100014, NULL, 0, 0, 1550361600000000000 ,NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (224, "TriggerSwitches-00", 110014, NULL, 0, 0, 1581292800000000000 ,NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (234, "PreshowerSwitches-00", 120014, NULL, 0, 0, 1550361600000000000 ,NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (244, "VetoNuSwitches-00", 107848, NULL, 0, 0, 1550361600000000000 ,NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (21, "Veto-00", 100015, NULL, 0, 0, 1550448000000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (22, "Trigger-00", 100019, NULL, 0, 0, 1550448000000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (23, "Preshower-00", 100020, NULL, 0, 0, 1550448000000000000, NULL, 22); @@ -907,6 +1006,8 @@ INSERT INTO "HVS_TAG2NODE" VALUES (23, "Preshower-02", 107803, NULL, 0, 0, 16192 INSERT INTO "HVS_TAG2NODE" VALUES (21, "Veto-TB00", 107826, NULL, 0, 0, 1627862400000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (22, "Trigger-TB00", 107827, NULL, 0, 0, 1627862400000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (23, "Preshower-TB00", 107828, NULL, 0, 0, 1627862400000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (24, "VetoNu-00", 107844, NULL, 0, 0, 1652054400000000000, NULL, 22); + INSERT INTO "HVS_TAG2NODE" VALUES (1005, "NeutrinoIdentifier-00", 100030, NULL, 0, 0, 1582416000000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (2005, "ScintIdentifier-00", 100016, NULL, 0, 0, 1550448000000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (2005, "ScintIdentifier-TB00", 107832, NULL, 0, 0, 1627862400000000000, NULL, 22); @@ -926,7 +1027,7 @@ INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107784, 2, 100042); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107788, 2, 107789); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107804, 2, 107789); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107834, 2, 107814); -INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107835, 2, 107789); +INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107835, 2, 107843); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100000, 3, 100002); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100039, 3, 100038); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107784, 3, 107783); @@ -997,6 +1098,10 @@ INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107789, 23, 107803); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107814, 21, 107826); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107814, 22, 107827); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107814, 23, 107828); +INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107843, 21, 107801); +INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107843, 22, 107802); +INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107843, 23, 107803); +INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107843, 24, 107844); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 100001, 2003, 100011); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 100001, 2004, 100012); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 100001, 2005, 100016); @@ -1009,6 +1114,9 @@ INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107789, 2005, 100016); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107814, 2003, 100011); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107814, 2004, 100012); INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107814, 2005, 100016); +INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107843, 2003, 100011); +INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107843, 2004, 100012); +INSERT INTO "HVS_LTAG2LTAG" VALUES (2, 107843, 2005, 100016); INSERT INTO "HVS_LTAG2LTAG" VALUES (21, 100015, 210, 100009); INSERT INTO "HVS_LTAG2LTAG" VALUES (21, 100043, 210, 100046); INSERT INTO "HVS_LTAG2LTAG" VALUES (21, 107801, 210, 100046); @@ -1025,6 +1133,7 @@ INSERT INTO "HVS_LTAG2LTAG" VALUES (21, 100015, 214, 100014); INSERT INTO "HVS_LTAG2LTAG" VALUES (21, 100043, 214, 100014); INSERT INTO "HVS_LTAG2LTAG" VALUES (21, 107801, 214, 100014); INSERT INTO "HVS_LTAG2LTAG" VALUES (21, 107826, 214, 100014); +INSERT INTO "HVS_LTAG2LTAG" VALUES (21, 107801, 215, 107810); INSERT INTO "HVS_LTAG2LTAG" VALUES (22, 100019, 220, 110009); INSERT INTO "HVS_LTAG2LTAG" VALUES (22, 100044, 220, 100047); INSERT INTO "HVS_LTAG2LTAG" VALUES (22, 107802, 220, 100047); @@ -1057,6 +1166,13 @@ INSERT INTO "HVS_LTAG2LTAG" VALUES (23, 100020, 234, 120014); INSERT INTO "HVS_LTAG2LTAG" VALUES (23, 100045, 234, 120014); INSERT INTO "HVS_LTAG2LTAG" VALUES (23, 107803, 234, 120014); INSERT INTO "HVS_LTAG2LTAG" VALUES (23, 107828, 234, 120014); +INSERT INTO "HVS_LTAG2LTAG" VALUES (23, 107803, 235, 107808); +INSERT INTO "HVS_LTAG2LTAG" VALUES (23, 107803, 236, 107809); +INSERT INTO "HVS_LTAG2LTAG" VALUES (24, 107844, 240, 107845); +INSERT INTO "HVS_LTAG2LTAG" VALUES (24, 107844, 241, 107846); +INSERT INTO "HVS_LTAG2LTAG" VALUES (24, 107844, 242, 107847); +INSERT INTO "HVS_LTAG2LTAG" VALUES (24, 107844, 244, 107848); +INSERT INTO "HVS_LTAG2LTAG" VALUES (24, 107844, 245, 107849); INSERT INTO "HVS_LTAG2LTAG" VALUES (3, 100002, 31, 100026); INSERT INTO "HVS_LTAG2LTAG" VALUES (3, 100038, 31, 100037); INSERT INTO "HVS_LTAG2LTAG" VALUES (3, 107783, 31, 107781); @@ -1561,7 +1677,7 @@ INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "EmulsionFilm", "Emulsion INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "EmulsionPlates", "EmulsionPlates-00", 107807); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "EmulsionSwitches", "EmulsionSwitches-00", 100036); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "EmulsionSupport", "EmulsionSupport-00", 107842); -INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "Scintillator", "Scintillator-02", 107789); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "Scintillator", "Scintillator-03", 107843); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "Tracker", "Tracker-03", 107836); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "SCT", "SCT-02", 107791); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "SctTopLevel", "SCTTopLevel-02", 107793); @@ -1588,6 +1704,10 @@ INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoTopLevel", "VetoTopL INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoStationGeneral", "VetoStationGeneral-01", 100049); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoPlateGeneral", "VetoPlateGeneral-01", 100050); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoRadiatorGeneral", "VetoRadiatorGeneral-00", 107810); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoNuTopLevel", "VetoNuTopLevel-00", 107845); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoNuStationGeneral", "VetoNuStationGeneral-00", 107846); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoNuPlateGeneral", "VetoNuPlateGeneral-00", 107847); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoNuRadiatorGeneral","VetoNuRadiatorGeneral-00", 107849); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "TriggerTopLevel", "TriggerTopLevel-02", 107799); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "TriggerStationGeneral", "TriggerStationGeneral-01", 100051); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "TriggerPlateGeneral", "TriggerPlateGeneral-00", 110025); @@ -1607,9 +1727,11 @@ INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "CaloMatComponents", "CaloMatCo INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoSwitches", "VetoSwitches-00", 100014); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "TriggerSwitches", "TriggerSwitches-00", 110014); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "PreshowerSwitches", "PreshowerSwitches-00", 120014); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoNuSwitches", "VetoNuSwitches-00", 107848); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "Veto", "Veto-02", 107801); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "Trigger", "Trigger-02", 107802); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "Preshower", "Preshower-02", 107803); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "VetoNu", "VetoNu-00", 107844); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "NeutrinoIdentifier", "NeutrinoIdentifier-00", 100030); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "ScintIdentifier", "ScintIdentifier-00", 100016); INSERT INTO "HVS_TAGCACHE" VALUES ("FASERNU-03", "TrackerIdentifier", "TrackerIdentifier-02", 107787); @@ -2257,6 +2379,19 @@ INSERT INTO "VETORADIATORGENERAL_DATA" VALUES (0, 400.0, 350.0, 100.0, "std::Lea INSERT INTO "VETORADIATORGENERAL_DATA2TAG" VALUES (107810, 0); -- -- +INSERT INTO "VETONUTOPLEVEL_DATA" VALUES (0, 10.0, -21.0, -3115.0, 0.0, 0.0, 0.0, 321, "VetoNu"); +INSERT INTO "VETONUTOPLEVEL_DATA" VALUES (1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 321, "StationA"); +INSERT INTO "VETONUTOPLEVEL_DATA2TAG" VALUES (107845, 0); +INSERT INTO "VETONUTOPLEVEL_DATA2TAG" VALUES (107845, 1); +-- +INSERT INTO "VETONUSTATIONGENERAL_DATA" VALUES (0, 2, 21.0); +INSERT INTO "VETONUSTATIONGENERAL_DATA2TAG" VALUES (107846, 0); +-- +-- +INSERT INTO "VETONUPLATEGENERAL_DATA" VALUES (0, 1, 300.0, 350.0, 20.0, "scint::Scintillator"); +INSERT INTO "VETONUPLATEGENERAL_DATA2TAG" VALUES (107847, 0); +-- +-- INSERT INTO "TRIGGERTOPLEVEL_DATA" VALUES (0, 0.0, 0.0, 187.0, 0.0, 0.0, 0.0, 321, "Trigger"); INSERT INTO "TRIGGERTOPLEVEL_DATA" VALUES (1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 321, "StationA"); INSERT INTO "TRIGGERTOPLEVEL_DATA" VALUES (2, 0.0, -5.0, -28.9, 0.0, 0.0, 0.0, 321, "Trigger"); @@ -2362,6 +2497,10 @@ INSERT INTO "VETOSWITCHES_DATA" VALUES (0, "Veto", 1, 0, "GEO", "Development", INSERT INTO "VETOSWITCHES_DATA2TAG" VALUES (100014, 0); -- -- +INSERT INTO "VETONUSWITCHES_DATA" VALUES (0, "VetoNu", 1, 0, "GEO", "Development", "Baseline geometry"); +INSERT INTO "VETONUSWITCHES_DATA2TAG" VALUES (107848, 0); +-- +-- INSERT INTO "TRIGGERSWITCHES_DATA" VALUES (0, "Trigger", 1, 0, "GEO", "Development", "Baseline geometry"); INSERT INTO "TRIGGERSWITCHES_DATA2TAG" VALUES (110014, 0); -- diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelInit.py b/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelInit.py index 0911c1db4ec3b16c8720abf755edf2c2568db721..f44e353335ceba79e26bf46da3f31d7cc484ce7f 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelInit.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelInit.py @@ -47,6 +47,16 @@ def _setupGeoModel(): emulsionDetectorTool = EmulsionDetectorTool(DetectorName = "Emulsion", Alignable = True, RDBAccessSvc = "RDBAccessSvc", GeometryDBSvc = "NeutrinoGeometryDBSvc", GeoDbTagSvc = "GeoDbTagSvc") geoModelSvc.DetectorTools += [ emulsionDetectorTool ] + if "FASERNU-03" in DDversion: + from VetoGeoNuModel.VetoNuGeoModelConf import VetoNuDetectorTool + vetoNuDetectorTool = VetoNuDetectorTool( DetectorName = "VetoNu", + Alignable = True, + RDBAccessSvc = "RDBAccessSvc", + GeometryDBSvc = "ScintGeometryDBSvc", + GeoDbTagSvc = "GeoDbTagSvc") + + geoModelSvc.DetectorTools += [ vetoNuDetectorTool ] + from VetoGeoModel.VetoGeoModelConf import VetoDetectorTool vetoDetectorTool = VetoDetectorTool( DetectorName = "Veto", Alignable = True, diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/ScintGMConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/ScintGMConfig.py index 93c42c057852c8b24ac4760ea70a612941c04855..039b5155efd0d9b69278f79cd6a0cbc2fdf69ccc 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/ScintGMConfig.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/ScintGMConfig.py @@ -6,6 +6,10 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator def ScintGeometryCfg (flags): acc = ComponentAccumulator() + + from VetoNuGeoModel.VetoNuGeoModelConfig import VetoNuGeometryCfg + acc.merge(VetoNuGeometryCfg( flags )) + from VetoGeoModel.VetoGeoModelConfig import VetoGeometryCfg acc.merge(VetoGeometryCfg( flags )) diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/DecodeFaserVersionKey.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/DecodeFaserVersionKey.cxx index a913211431b395745ecb18e14b537351ec81a7d9..e6ac208bc92ea81ca153ddf34e20387c40f8d7c0 100644 --- a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/DecodeFaserVersionKey.cxx +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/DecodeFaserVersionKey.cxx @@ -37,6 +37,7 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) std::string trackerOverrideTag; std::string caloOverrideTag; std::string neutrinoOverrideTag; + std::cout << "node = " << node << " version = " << svc->faserVersion() << std::endl; if (node == "FASER") { nodeOverrideTag = ""; } else if (node == "Neutrino") { @@ -49,6 +50,9 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) } else if (node == "Veto") { scintOverrideTag = svc->scintVersionOverride(); nodeOverrideTag = svc->vetoVersionOverride(); + } else if (node == "VetoNu") { + scintOverrideTag = svc->scintVersionOverride(); + nodeOverrideTag = svc->vetoNuVersionOverride(); } else if (node == "Trigger") { scintOverrideTag = svc->scintVersionOverride(); nodeOverrideTag = svc->triggerVersionOverride(); @@ -64,15 +68,24 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) nodeOverrideTag = svc->dipoleVersionOverride(); trackerOverrideTag = svc->trackerVersionOverride(); } else if (node == "Calorimeter") { + std::cout << "calling caloVersionOverride()" << std::endl; + const T* service = dynamic_cast<const T*>(svc); + std::cout << (service == nullptr ? " service is null" : "service is ok") << std::endl; nodeOverrideTag = svc->caloVersionOverride(); + std::cout << "nodeOverrideTag: " << nodeOverrideTag << std::endl; } else if (node == "Ecal") { + std::cout << "calling caloVersionOverride()" << std::endl; + const T* service = dynamic_cast<const T*>(svc); + std::cout << (service == nullptr ? " service is null" : "service is ok") << std::endl; caloOverrideTag = svc->caloVersionOverride(); + std::cout << "caloOverrideTag: " << caloOverrideTag << std::endl; nodeOverrideTag = svc->ecalVersionOverride(); + std::cout << "nodeOverrideTag: " << nodeOverrideTag << std::endl; } else { std::cout << "DecodeFaserVersionKey passed an unknown node:" << node << std::endl; nodeOverrideTag = ""; } - + std::cout << "Decode 1" << std::endl; // Default to faser version m_tag = svc->faserVersion(); m_node = "FASER"; @@ -89,6 +102,7 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) m_tag = neutrinoTag; m_node = "Neutrino"; } + std::cout << "Decode 2" << std::endl; // If scintOverrideTag is specified (and is not just "CUSTOM") then override with the scint tag. std::string scintTag; @@ -102,6 +116,7 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) m_tag = scintTag; m_node = "Scintillator"; } + std::cout << "Decode 3" << std::endl; // If trackerOverrideTag is specified (and is not just "CUSTOM") then override with the tracker tag. std::string trackerTag; @@ -115,6 +130,7 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) m_tag = trackerTag; m_node = "Tracker"; } + std::cout << "Decode 4" << std::endl; // If caloOverrideTag is specified (and is not just "CUSTOM") then override with the calo tag. std::string caloTag; @@ -128,6 +144,7 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) m_tag = caloTag; m_node = "Calorimeter"; } + std::cout << "Decode 5" << std::endl; // Finally if subsystem tag is overriden then use that. std::string outputTag; @@ -137,6 +154,8 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) m_tag = outputTag; m_node = node; } + std::cout << "Decode 6" << std::endl; + } const std::string & diff --git a/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoDbTagSvc.h b/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoDbTagSvc.h index ecb285ff291c3c6b7584d137f07de5d38f970c3d..0214fac2ff066ea2831e27fc3ad3472852a506d8 100644 --- a/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoDbTagSvc.h +++ b/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoDbTagSvc.h @@ -32,6 +32,7 @@ class IGeoDbTagSvc : virtual public IInterface { virtual const std::string & emulsionVersion() const =0; virtual const std::string & scintVersion() const =0; virtual const std::string & vetoVersion() const =0; + virtual const std::string & vetoNuVersion() const =0; virtual const std::string & triggerVersion() const =0; virtual const std::string & preshowerVersion() const =0; virtual const std::string & trackerVersion() const =0; @@ -46,6 +47,7 @@ class IGeoDbTagSvc : virtual public IInterface { virtual const std::string & emulsionVersionOverride() const =0; virtual const std::string & scintVersionOverride() const =0; virtual const std::string & vetoVersionOverride() const =0; + virtual const std::string & vetoNuVersionOverride() const =0; virtual const std::string & triggerVersionOverride() const =0; virtual const std::string & preshowerVersionOverride() const =0; virtual const std::string & trackerVersionOverride() const =0; diff --git a/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoModelSvc.h b/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoModelSvc.h index 2268f87fb1f490b135f04aa8ed6c9d7ccb114763..ec6c2f560d554489c350cf76c6bd051020d55358 100644 --- a/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoModelSvc.h +++ b/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoModelSvc.h @@ -30,6 +30,7 @@ public: virtual const std::string & emulsionVersion() const =0; virtual const std::string & scintVersion() const =0; virtual const std::string & vetoVersion() const =0; + virtual const std::string & vetoNuVersion() const =0; virtual const std::string & triggerVersion() const =0; virtual const std::string & preshowerVersion() const =0; virtual const std::string & trackerVersion() const =0; @@ -44,6 +45,7 @@ public: virtual const std::string & emulsionVersionOverride() const =0; virtual const std::string & scintVersionOverride() const =0; virtual const std::string & vetoVersionOverride() const =0; + virtual const std::string & vetoNuVersionOverride() const =0; virtual const std::string & triggerVersionOverride() const =0; virtual const std::string & preshowerVersionOverride() const =0; virtual const std::string & trackerVersionOverride() const =0; diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx index f329c0f6d3b599c5a1971cc53ad1f52331c7aba2..99ba2a02030d0a61968bd1d6c71f59016da8a353 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx @@ -84,6 +84,10 @@ StatusCode GeoDbTagSvc::setupTags() ? rdbAccessSvc->getChildTag("Veto", m_ScintVersion, "Scintillator", "FASERDD") : m_VetoVersionOverride); + m_VetoNuVersion = (m_VetoNuVersionOverride.empty() + ? rdbAccessSvc->getChildTag("VetoNu", m_ScintVersion, "Scintillator", "FASERDD") + : m_VetoNuVersionOverride); + m_TriggerVersion = (m_TriggerVersionOverride.empty() ? rdbAccessSvc->getChildTag("Trigger", m_ScintVersion, "Scintillator", "FASERDD") : m_TriggerVersionOverride); diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.h b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.h index c7ed5637321b3e6a4124e39d40c72d8e3091a207..9804e9beb28d8884095d99704a6f871a762ee61c 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.h +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.h @@ -32,6 +32,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc void setEmulsionVersionOverride(const std::string& tag) { m_EmulsionVersionOverride=tag; } void setScintVersionOverride(const std::string& tag) { m_ScintVersionOverride=tag; } void setVetoVersionOverride(const std::string& tag) { m_VetoVersionOverride=tag; } + void setVetoNuVersionOverride(const std::string& tag) { m_VetoNuVersionOverride=tag; } void setTriggerVersionOverride(const std::string& tag) { m_TriggerVersionOverride=tag; } void setPreshowerVersionOverride(const std::string& tag) { m_PreshowerVersionOverride=tag; } void setTrackerVersionOverride(const std::string& tag) { m_TrackerVersionOverride=tag; } @@ -51,6 +52,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc const std::string & emulsionVersionOverride() const { return m_EmulsionVersionOverride; } const std::string & scintVersionOverride() const { return m_ScintVersionOverride; } const std::string & vetoVersionOverride() const { return m_VetoVersionOverride; } + const std::string & vetoNuVersionOverride() const { return m_VetoNuVersionOverride; } const std::string & triggerVersionOverride() const { return m_TriggerVersionOverride; } const std::string & preshowerVersionOverride() const { return m_PreshowerVersionOverride; } const std::string & trackerVersionOverride() const { return m_TrackerVersionOverride; } @@ -65,6 +67,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc const std::string & emulsionVersion() const { return m_EmulsionVersion; } const std::string & scintVersion() const { return m_ScintVersion; } const std::string & vetoVersion() const { return m_VetoVersion; } + const std::string & vetoNuVersion() const { return m_VetoNuVersion; } const std::string & triggerVersion() const { return m_TriggerVersion; } const std::string & preshowerVersion() const { return m_PreshowerVersion; } const std::string & trackerVersion() const { return m_TrackerVersion; } @@ -84,6 +87,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc std::string m_EmulsionVersion; std::string m_ScintVersion; std::string m_VetoVersion; + std::string m_VetoNuVersion; std::string m_TriggerVersion; std::string m_PreshowerVersion; std::string m_TrackerVersion; @@ -98,6 +102,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc std::string m_EmulsionVersionOverride; std::string m_ScintVersionOverride; std::string m_VetoVersionOverride; + std::string m_VetoNuVersionOverride; std::string m_TriggerVersionOverride; std::string m_PreshowerVersionOverride; std::string m_TrackerVersionOverride; diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx index 4f728d36e0d6a1798d262c10cc4267b8f4d9089b..6296518fad176d4ed09043136686deb7dad7c6b6 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx @@ -56,6 +56,7 @@ GeoModelSvc::GeoModelSvc(const std::string& name,ISvcLocator* svc) declareProperty( "EmulsionVersionOverride", m_EmulsionVersionOverride); declareProperty( "ScintVersionOverride", m_ScintVersionOverride); declareProperty( "VetoVersionOverride", m_VetoVersionOverride); + declareProperty( "VetoNuVersionOverride", m_VetoNuVersionOverride); declareProperty( "TriggerVersionOverride", m_TriggerVersionOverride); declareProperty( "PreshowerVersionOverride", m_PreshowerVersionOverride); declareProperty( "TrackerVersionOverride", m_TrackerVersionOverride); @@ -189,6 +190,7 @@ StatusCode GeoModelSvc::geoInit() ATH_MSG_DEBUG("* Emulsion tag: " << m_EmulsionVersionOverride); ATH_MSG_DEBUG("* Scint tag: " << m_ScintVersionOverride); ATH_MSG_DEBUG("* Veto tag: " << m_VetoVersionOverride); + ATH_MSG_DEBUG("* VetoNu tag: " << m_VetoNuVersionOverride); ATH_MSG_DEBUG("* Trigger tag: " << m_TriggerVersionOverride); ATH_MSG_DEBUG("* Preshower tag: " << m_PreshowerVersionOverride); ATH_MSG_DEBUG("* Tracker tag: " << m_TrackerVersionOverride); @@ -261,6 +263,7 @@ StatusCode GeoModelSvc::geoInit() dbTagSvc->setEmulsionVersionOverride(m_EmulsionVersionOverride); dbTagSvc->setScintVersionOverride(m_ScintVersionOverride); dbTagSvc->setVetoVersionOverride(m_VetoVersionOverride); + dbTagSvc->setVetoNuVersionOverride(m_VetoNuVersionOverride); dbTagSvc->setTriggerVersionOverride(m_TriggerVersionOverride); dbTagSvc->setPreshowerVersionOverride(m_PreshowerVersionOverride); dbTagSvc->setTrackerVersionOverride(m_TrackerVersionOverride); @@ -431,6 +434,8 @@ StatusCode GeoModelSvc::compareTags() tagsMatch = m_ScintVersionOverride == pair.second; else if(tagPairName=="GeoVeto") tagsMatch = m_VetoVersionOverride == pair.second; + else if(tagPairName=="GeoVetoNu") + tagsMatch = m_VetoNuVersionOverride == pair.second; else if(tagPairName=="GeoTrigger") tagsMatch = m_TriggerVersionOverride == pair.second; else if(tagPairName=="GeoPreshower") @@ -458,6 +463,7 @@ StatusCode GeoModelSvc::compareTags() ATH_MSG_INFO("* Emulsion tag: " << m_EmulsionVersionOverride); ATH_MSG_INFO("* Scint tag: " << m_ScintVersionOverride); ATH_MSG_INFO("* Veto tag: " << m_VetoVersionOverride); + ATH_MSG_INFO("* VetoNu tag: " << m_VetoNuVersionOverride); ATH_MSG_INFO("* Trigger tag: " << m_TriggerVersionOverride); ATH_MSG_INFO("* Preshower tag: " << m_PreshowerVersionOverride); ATH_MSG_INFO("* Tracker tag: " << m_TrackerVersionOverride); @@ -480,6 +486,8 @@ StatusCode GeoModelSvc::compareTags() ATH_MSG_INFO("*Scint tag: " << pair.second); else if(tagPairName=="GeoVeto") ATH_MSG_INFO("*Veto tag: " << pair.second); + else if(tagPairName=="GeoVetoNu") + ATH_MSG_INFO("*VetoNu tag: " << pair.second); else if(tagPairName=="GeoTrigger") ATH_MSG_INFO("*Trigger tag: " << pair.second); else if(tagPairName=="GeoPreshower") @@ -554,6 +562,13 @@ StatusCode GeoModelSvc::fillTagInfo() const } } + if(m_VetoNuVersionOverride != "") { + if(m_tagInfoMgr->addTag("GeoVetoNu",m_VetoNuVersionOverride).isFailure()) { + ATH_MSG_ERROR("GeoModelSvc VetoNu tag: " << m_VetoNuVersionOverride << " not added to TagInfo " ); + return StatusCode::FAILURE; + } + } + if(m_TriggerVersionOverride != "") { if(m_tagInfoMgr->addTag("GeoTrigger",m_TriggerVersionOverride).isFailure()) { ATH_MSG_ERROR("GeoModelSvc Trigger tag: " << m_TriggerVersionOverride << " not added to TagInfo " ); diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h index e3880ced363400cb05ff949091346511d5c90c86..9da66beb0061b3e94eefbd0518f4ba9795043552 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h @@ -79,6 +79,7 @@ private: std::string m_EmulsionVersionOverride; std::string m_ScintVersionOverride; std::string m_VetoVersionOverride; + std::string m_VetoNuVersionOverride; std::string m_TriggerVersionOverride; std::string m_PreshowerVersionOverride; std::string m_TrackerVersionOverride; @@ -105,6 +106,7 @@ private: const std::string & emulsionVersionOverride() const {return m_EmulsionVersionOverride; } const std::string & scintVersionOverride() const {return m_ScintVersionOverride; } const std::string & vetoVersionOverride() const {return m_VetoVersionOverride; } + const std::string & vetoNuVersionOverride() const {return m_VetoNuVersionOverride; } const std::string & triggerVersionOverride() const {return m_TriggerVersionOverride ;} const std::string & preshowerVersionOverride() const {return m_PreshowerVersionOverride ;} const std::string & trackerVersionOverride() const {return m_TrackerVersionOverride ;} @@ -119,6 +121,7 @@ private: const std::string & emulsionVersion() const {return m_geoDbTagSvc->emulsionVersion(); } const std::string & scintVersion() const {return m_geoDbTagSvc->scintVersion(); } const std::string & vetoVersion() const {return m_geoDbTagSvc->vetoVersion(); } + const std::string & vetoNuVersion() const {return m_geoDbTagSvc->vetoNuVersion(); } const std::string & triggerVersion() const {return m_geoDbTagSvc->triggerVersion(); } const std::string & preshowerVersion() const {return m_geoDbTagSvc->preshowerVersion(); } const std::string & trackerVersion() const {return m_geoDbTagSvc->trackerVersion(); } diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx index dd440226fdff6abfc3e609d4f705e92884edd61e..988191de12501bf2105e9045baa3e468d234a0f5 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx @@ -215,35 +215,37 @@ StatusCode RDBMaterialManager::readMaterialsFromDB(ISvcLocator* pSvcLocator) log << MSG::WARNING << " Getting SCTMaterials with default tag" <<endmsg; m_trackermaterials = iAccessSvc->getRecordsetPtr("SCTMaterials","SCTMaterials-00", "", "FASERDD"); } + // TrackerMatComponents and TrackerMaterials tables in DB are empty // --- Tracker materials - DecodeFaserVersionKey keyTracker(iGeoModel, "Tracker"); - m_trackermatcomponents = iAccessSvc->getRecordsetPtr("TrackerMatComponents",keyTracker.tag(),keyTracker.node(),"FASERDD"); - if(m_trackermatcomponents->size()==0) { - if(log.level()<=MSG::WARNING) - log << MSG::WARNING << " Getting TrackerMatComponents with default tag" <<endmsg; - m_trackermatcomponents = iAccessSvc->getRecordsetPtr("TrackerMatComponents","TrackerMatComponents-00", "", "FASERDD"); - } - m_trackermaterials = iAccessSvc->getRecordsetPtr("TrackerMaterials",keyTracker.tag(),keyTracker.node(), "FASERDD"); - if(m_trackermaterials->size()==0) { - if(log.level()<=MSG::WARNING) - log << MSG::WARNING << " Getting TrackerMaterials with default tag" <<endmsg; - m_trackermaterials = iAccessSvc->getRecordsetPtr("TrackerMaterials","TrackerMaterials-00", "", "FASERDD"); - } - - // --- Tracker materials - DecodeFaserVersionKey keyCalorimeter(iGeoModel, "Calorimeter"); - m_calomatcomponents = iAccessSvc->getRecordsetPtr("CaloMatComponents",keyCalorimeter.tag(),keyCalorimeter.node(),"FASERDD"); - if(m_calomatcomponents->size()==0) { - if(log.level()<=MSG::WARNING) - log << MSG::WARNING << " Getting CaloMatComponents with default tag" <<endmsg; - m_calomatcomponents = iAccessSvc->getRecordsetPtr("CaloMatComponents","CaloMatComponents-00", "", "FASERDD"); - } - m_calomaterials = iAccessSvc->getRecordsetPtr("CaloMaterials",keyCalorimeter.tag(),keyCalorimeter.node(), "FASERDD"); - if(m_calomaterials->size()==0) { - if(log.level()<=MSG::WARNING) - log << MSG::WARNING << " Getting CaloMaterials with default tag" <<endmsg; - m_calomaterials = iAccessSvc->getRecordsetPtr("CaloMaterials","CaloMaterials-00", "", "FASERDD"); - } + // DecodeFaserVersionKey keyTracker(iGeoModel, "Tracker"); + // m_trackermatcomponents = iAccessSvc->getRecordsetPtr("TrackerMatComponents",keyTracker.tag(),keyTracker.node(),"FASERDD"); + // if(m_trackermatcomponents->size()==0) { + // if(log.level()<=MSG::WARNING) + // log << MSG::WARNING << " Getting TrackerMatComponents with default tag" <<endmsg; + // m_trackermatcomponents = iAccessSvc->getRecordsetPtr("TrackerMatComponents","TrackerMatComponents-00", "", "FASERDD"); + // } + // m_trackermaterials = iAccessSvc->getRecordsetPtr("TrackerMaterials",keyTracker.tag(),keyTracker.node(), "FASERDD"); + // if(m_trackermaterials->size()==0) { + // if(log.level()<=MSG::WARNING) + // log << MSG::WARNING << " Getting TrackerMaterials with default tag" <<endmsg; + // m_trackermaterials = iAccessSvc->getRecordsetPtr("TrackerMaterials","TrackerMaterials-00", "", "FASERDD"); + // } + + // CaloMatComponents and CaloMaterials tables are also empty + // // --- Calorimeter materials + // DecodeFaserVersionKey keyCalorimeter(iGeoModel, "Calorimeter"); + // m_calomatcomponents = iAccessSvc->getRecordsetPtr("CaloMatComponents",keyCalorimeter.tag(),keyCalorimeter.node(),"FASERDD"); + // if(m_calomatcomponents->size()==0) { + // if(log.level()<=MSG::WARNING) + // log << MSG::WARNING << " Getting CaloMatComponents with default tag" <<endmsg; + // m_calomatcomponents = iAccessSvc->getRecordsetPtr("CaloMatComponents","CaloMatComponents-00", "", "FASERDD"); + // } + // m_calomaterials = iAccessSvc->getRecordsetPtr("CaloMaterials",keyCalorimeter.tag(),keyCalorimeter.node(), "FASERDD"); + // if(m_calomaterials->size()==0) { + // if(log.level()<=MSG::WARNING) + // log << MSG::WARNING << " Getting CaloMaterials with default tag" <<endmsg; + // m_calomaterials = iAccessSvc->getRecordsetPtr("CaloMaterials","CaloMaterials-00", "", "FASERDD"); + // } return StatusCode::SUCCESS; } diff --git a/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py b/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py index 82c35779d0225b979cf8d04c2f3b20bd17f5f930..e4b9721c03c8d697e101de48f9e279022051d7fb 100644 --- a/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py +++ b/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py @@ -125,6 +125,9 @@ def G4FaserAlgOutputCfg(ConfigFlags): if ConfigFlags.Detector.EnableVeto: ItemList += ["ScintHitCollection#VetoHits"] + if ConfigFlags.Detector.EnableVetoNu: + ItemList += ["ScintHitCollection#VetoNuHits"] + if ConfigFlags.Detector.EnableTrigger: ItemList += ["ScintHitCollection#TriggerHits"] diff --git a/Simulation/G4Faser/G4FaserAlg/test/G4FaserAlgConfigNew_Test.py b/Simulation/G4Faser/G4FaserAlg/test/G4FaserAlgConfigNew_Test.py index cdb48f7d3d8410e7c206fc1983f6c6a61a6bd5dc..883e1e8e31dc25ab740202669006391b810d4619 100644 --- a/Simulation/G4Faser/G4FaserAlg/test/G4FaserAlgConfigNew_Test.py +++ b/Simulation/G4Faser/G4FaserAlg/test/G4FaserAlgConfigNew_Test.py @@ -72,6 +72,8 @@ if __name__ == '__main__': detectors += ['Trigger', 'Dipole'] if ConfigFlags.GeoModel.FaserVersion.count("FASERNU") > 0 : detectors += ['Emulsion'] + if ConfigFlags.GeoModel.FaserVersion.count("FASERNU-03") > 0: + detectors += ['VetoNu'] # # Setup detector flags # diff --git a/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py index f4bb4333d7b62b77b377663d9181e30e64b9f2f8..8f01d6b15fca1ff7a591132160aed2a2e31ff283 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py @@ -50,6 +50,9 @@ def ScintSensitiveDetectorListCfg(ConfigFlags): if ConfigFlags.Detector.EnableVeto: from VetoG4_SD.VetoG4_SDToolConfig import VetoSensorSDCfg tools += [ result.popToolsAndMerge(VetoSensorSDCfg(ConfigFlags)) ] + if ConfigFlags.Detector.EnableVetoNu: + from VetoNuG4_SD.VetoNuG4_SDToolConfig import VetoNuSensorSDCfg + tools += [ result.popToolsAndMerge(VetoNuSensorSDCfg(ConfigFlags)) ] if ConfigFlags.Detector.EnableTrigger: from TriggerG4_SD.TriggerG4_SDToolConfig import TriggerSensorSDCfg tools += [ result.popToolsAndMerge(TriggerSensorSDCfg(ConfigFlags)) ] diff --git a/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py index 33d34f728c6e0b0d7f6b451b5e81464ecf9c5f5b..fc460d74d3f2b598a100fb604f0fdd3a502bc7a4 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py @@ -71,6 +71,15 @@ def VetoFieldManagerToolCfg(ConfigFlags, name='VetoFieldManager', **kwargs): kwargs.setdefault('MinimumEpsilonStep', 0.00001) return BasicDetectorFieldManagerToolCfg(ConfigFlags, name, **kwargs) +def VetoNuFieldManagerToolCfg(ConfigFlags, name='VetoNuFieldManager', **kwargs): + kwargs.setdefault("LogicalVolumes", ['VetoNu::VetoNu']) + #kwargs.setdefault('DeltaChord', 0.00001) + kwargs.setdefault('DeltaIntersection', 0.00001) + kwargs.setdefault('DeltaOneStep', 0.0001) + kwargs.setdefault('MaximumEpsilonStep', 0.001) + kwargs.setdefault('MinimumEpsilonStep', 0.00001) + return BasicDetectorFieldManagerToolCfg(ConfigFlags, name, **kwargs) + def TriggerFieldManagerToolCfg(ConfigFlags, name='TriggerFieldManager', **kwargs): kwargs.setdefault("LogicalVolumes", ['Trigger::TriggerStationA']) diff --git a/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py b/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py index 064cde911986868ace4708e37374a17e20a6de16..92a3cc968ebdb15b44e245b1dc751583e1083042 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py @@ -10,13 +10,14 @@ from AthenaCommon import Logging from G4FaserTools.G4PhysicsRegionConfigNew import NeutrinoPhysicsRegionToolCfg, TrackerPhysicsRegionToolCfg, ScintillatorPhysicsRegionToolCfg, EcalPhysicsRegionToolCfg #the field config tools -from G4FaserTools.G4FieldConfigNew import FASERFieldManagerToolCfg, EmulsionFieldManagerToolCfg, VetoFieldManagerToolCfg, TriggerFieldManagerToolCfg, PreshowerFieldManagerToolCfg, TrackerFieldManagerToolCfg, DipoleFieldManagerToolCfg, EcalFieldManagerToolCfg +from G4FaserTools.G4FieldConfigNew import FASERFieldManagerToolCfg, EmulsionFieldManagerToolCfg, VetoFieldManagerToolCfg, VetoNuFieldManagerToolCfg, TriggerFieldManagerToolCfg, PreshowerFieldManagerToolCfg, TrackerFieldManagerToolCfg, DipoleFieldManagerToolCfg, EcalFieldManagerToolCfg from G4FaserTools.G4FaserToolsConfigNew import SensitiveDetectorMasterToolCfg GeoDetectorTool=CompFactory.GeoDetectorTool from EmulsionGeoModel.EmulsionGeoModelConfig import EmulsionGeometryCfg from VetoGeoModel.VetoGeoModelConfig import VetoGeometryCfg +from VetoNuGeoModel.VetoNuGeoModelConfig import VetoNuGeometryCfg from TriggerGeoModel.TriggerGeoModelConfig import TriggerGeometryCfg from PreshowerGeoModel.PreshowerGeoModelConfig import PreshowerGeometryCfg from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg @@ -59,6 +60,16 @@ def VetoGeoDetectorToolCfg(ConfigFlags, name='Veto', **kwargs): result.setPrivateTools(GeoDetectorTool(name, **kwargs)) return result +def VetoNuGeoDetectorToolCfg(ConfigFlags, name='VetoNu', **kwargs): + #set up geometry + result=VetoNuGeometryCfg(ConfigFlags) + kwargs.setdefault("DetectorName", "VetoNu") + #add the GeometryNotifierSvc + result.addService(G4GeometryNotifierSvcCfg(ConfigFlags)) + kwargs.setdefault("GeometryNotifierSvc", result.getService("G4GeometryNotifierSvc")) + result.setPrivateTools(GeoDetectorTool(name, **kwargs)) + return result + def TriggerGeoDetectorToolCfg(ConfigFlags, name='Trigger', **kwargs): #set up geometry result=TriggerGeometryCfg(ConfigFlags) @@ -121,6 +132,10 @@ def generateSubDetectorList(ConfigFlags): toolVeto = result.popToolsAndMerge(VetoGeoDetectorToolCfg(ConfigFlags)) SubDetectorList += [ toolVeto ] + if ConfigFlags.Detector.GeometryVetoNu: + toolVetoNu = result.popToolsAndMerge(VetoNuGeoDetectorToolCfg(ConfigFlags)) + SubDetectorList += [ toolVetoNu ] + if ConfigFlags.Detector.GeometryTrigger: toolTrigger = result.popToolsAndMerge(TriggerGeoDetectorToolCfg(ConfigFlags)) SubDetectorList += [ toolTrigger ] @@ -217,6 +232,11 @@ def FASER_FieldMgrListCfg(ConfigFlags): tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] + if ConfigFlags.Detector.GeometryVetoNu: + acc = VetoNuFieldManagerToolCfg(ConfigFlags) + tool = result.popToolsAndMerge(acc) + fieldMgrList += [tool] + if ConfigFlags.Detector.GeometryTrigger: acc = TriggerFieldManagerToolCfg(ConfigFlags) tool = result.popToolsAndMerge(acc) diff --git a/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py index 040853dc2f46d08f0a92843d8b2f0dfef945ef11..c6ca63e4f1343d47374255dd0de79e98fe685cfe 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py @@ -16,7 +16,7 @@ def NeutrinoPhysicsRegionToolCfg(ConfigFlags, name="NeutrinoPhysicsRegionTool", def ScintillatorPhysicsRegionToolCfg(ConfigFlags, name='ScintillatorPhysicsRegionTool', **kwargs): kwargs.setdefault("RegionName", 'Scintillator') - volumeList = ['Veto::Plate' , 'Trigger::Plate', 'Preshower::Plate'] + volumeList = ['Veto::Plate' , 'Trigger::Plate', 'Preshower::Plate', 'VetoNu::Plate'] kwargs.setdefault("VolumeList", volumeList) kwargs.setdefault("ElectronCut", 0.05) kwargs.setdefault("PositronCut", 0.05) diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserGeoIDSvc.cxx b/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserGeoIDSvc.cxx index ed4a3370a690cd833e68a4a930fba0967df54541..89b57d8284ced7dd0b48522f381501dd8f13780c 100644 --- a/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserGeoIDSvc.cxx +++ b/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserGeoIDSvc.cxx @@ -123,7 +123,8 @@ FaserDetDescr::FaserRegion ISF::FaserGeoIDSvc::identifyGeoID(const Amg::Vector3D if (lvName == "Veto::Veto" || lvName == "Veto::VetoStationA" || lvName == "Trigger::Trigger" || lvName == "Trigger::TriggerStationA" || - lvName == "Preshower::Preshower" || lvName == "Preshower::PreshowerStationA") return FaserDetDescr::fFaserScintillator; + lvName == "Preshower::Preshower" || lvName == "Preshower::PreshowerStationA" || + lvName == "VetoNu::VetoNu" || lvName == "VetoNu::VetoNuStationA" ) return FaserDetDescr::fFaserScintillator; if (lvName == "Ecal::Ecal") return FaserDetDescr::fFaserCalorimeter; diff --git a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/FaserISF_Geant4Event/FaserISFG4GeoHelper.h b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/FaserISF_Geant4Event/FaserISFG4GeoHelper.h index 8dc36356a51a161846307e0a677eaf5fa861a24b..96cf70d316be5b74e858c6ffeecd97bed93d917c 100644 --- a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/FaserISF_Geant4Event/FaserISFG4GeoHelper.h +++ b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/FaserISF_Geant4Event/FaserISFG4GeoHelper.h @@ -21,7 +21,7 @@ class FaserISFG4GeoHelper static bool checkVolumeDepth(G4LogicalVolume* logicalVol, int volLevel, int depth=0); private: - static G4LogicalVolume *s_vetoLV, *s_triggerLV, *s_preshowerLV, *s_sctLV, *s_dipoleLV, *s_ecalLV, *s_emulsionLV; + static G4LogicalVolume *s_vetoLV, *s_triggerLV, *s_preshowerLV, *s_vetonuLV, *s_sctLV, *s_dipoleLV, *s_ecalLV, *s_emulsionLV; }; diff --git a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/src/FaserISFG4GeoHelper.cxx b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/src/FaserISFG4GeoHelper.cxx index 6697607742a1a4cb0cdebf08aa138ba1fca4ba6c..f5337083756488e4939979a5a5424e1cf7b0b04c 100644 --- a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/src/FaserISFG4GeoHelper.cxx +++ b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/src/FaserISFG4GeoHelper.cxx @@ -19,6 +19,7 @@ G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_sctLV = nullptr; G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_vetoLV = nullptr; +G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_vetonuLV = nullptr; G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_triggerLV = nullptr; G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_preshowerLV = nullptr; G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_ecalLV = nullptr; @@ -30,7 +31,7 @@ FaserDetDescr::FaserRegion iGeant4::FaserISFG4GeoHelper::nextGeoId(const G4Step* aStep, int truthVolLevel) { - if (s_sctLV == nullptr && s_vetoLV == nullptr && s_triggerLV == nullptr && s_preshowerLV == nullptr && s_ecalLV == nullptr && s_emulsionLV == nullptr && s_dipoleLV == nullptr) // Initialize + if (s_sctLV == nullptr && s_vetoLV == nullptr && s_triggerLV == nullptr && s_preshowerLV == nullptr && s_vetonuLV == nullptr && s_ecalLV == nullptr && s_emulsionLV == nullptr && s_dipoleLV == nullptr) // Initialize { G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance(); for (size_t i = 0; i < lvs->size(); ++i) { @@ -39,6 +40,7 @@ iGeant4::FaserISFG4GeoHelper::nextGeoId(const G4Step* aStep, int truthVolLevel) G4String thisName = thisLV->GetName(); if ( ( s_sctLV == nullptr && thisName == "SCT::Station" ) || thisName == "SCT::SCT" ) { s_sctLV = thisLV; } else if ( ( s_vetoLV == nullptr && thisName == "Veto::VetoStationA" ) || thisName == "Veto::Veto" ) { s_vetoLV = thisLV; } + else if ( ( s_vetonuLV == nullptr && thisName == "VetoNu::VetoNuStationA" ) || thisName == "VetoNu::VetoNu" ) { s_vetonuLV = thisLV; } else if ( ( s_triggerLV == nullptr && thisName == "Trigger::TriggerStationA" ) || thisName == "Trigger::Trigger" ) { s_triggerLV = thisLV; } else if ( ( s_preshowerLV == nullptr && thisName == "Preshower::PreshowerStationA" ) || thisName == "Preshower::Preshower" ) { s_preshowerLV = thisLV; } else if ( thisName == "Ecal::Ecal" ) { s_ecalLV = thisLV; } @@ -73,6 +75,7 @@ iGeant4::FaserISFG4GeoHelper::nextGeoId(const G4Step* aStep, int truthVolLevel) nextGeoID = FaserDetDescr::fFaserTracker; } else if ((s_vetoLV != nullptr && s_vetoLV == postStepVolume) || + (s_vetonuLV != nullptr && s_vetonuLV == postStepVolume) || (s_triggerLV != nullptr && s_triggerLV == postStepVolume) || (s_preshowerLV != nullptr && s_preshowerLV == postStepVolume)) { @@ -107,6 +110,7 @@ bool iGeant4::FaserISFG4GeoHelper::checkVolumeDepth(G4LogicalVolume* lv, int vol if ( ((s_sctLV != nullptr) && (lv->GetName() == s_sctLV->GetName())) || ((s_vetoLV != nullptr) && (lv->GetName() == s_vetoLV->GetName())) || + ((s_vetonuLV != nullptr) && (lv->GetName() == s_vetonuLV->GetName())) || ((s_triggerLV != nullptr) && (lv->GetName() == s_triggerLV->GetName())) || ((s_preshowerLV != nullptr) && (lv->GetName() == s_preshowerLV->GetName())) || ((s_dipoleLV != nullptr) && (lv->GetName() == s_dipoleLV->GetName())) ||