Skip to content
Snippets Groups Projects
Commit 80e7be94 authored by Dave Casper's avatar Dave Casper
Browse files

Merge branch 'master-mdc-fasernu' into 'mdcTest'

Geometry refinements for MDC

See merge request faser/calypso!224
parents 1d960089 ab731629
No related branches found
No related tags found
No related merge requests found
Showing
with 639 additions and 21 deletions
......@@ -7,15 +7,16 @@ from CalypsoConfiguration.AutoConfigFlags import DetDescrInfo, getDefaultDetecto
allDetectors = [
'Emulsion', 'Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Ecal', 'Dipole',
'Emulsion', 'Veto', 'Trigger', 'Preshower', 'VetoNu', 'FaserSCT', 'Ecal', 'Dipole', 'Trench'
]
allGroups = {
'Neutrino' : [ 'Emulsion' ],
'Tracker' : ['SCT'],
'Scintillator' : ['Veto', 'Trigger', 'Preshower'],
'Scintillator' : ['Veto', 'Trigger', 'Preshower', 'VetoNu'],
'FaserCalo' : ['Ecal'],
'Magnet' : ['Dipole']
'Magnet' : ['Dipole'],
'Cavern' : ['Trench']
}
def createDetectorConfigFlags():
......@@ -32,17 +33,20 @@ 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 )
dcf.addFlag('Detector.GeometryEcal', False)
dcf.addFlag('Detector.GeometryFaserCalo', lambda prevFlags : prevFlags.Detector.GeometryEcal)
# Cavern (disabled by default)
# dcf.addFlag('Detector.GeometryCavern',False)
# Trench (disabled by default)
dcf.addFlag('Detector.GeometryTrench',False)
dcf.addFlag('Detector.GeometryFaserCavern', lambda prevFlags : (prevFlags.Detector.GeometryTrench ))
# dcf.addFlag('Detector.GeometryFaser', lambda prevFlags : (prevFlags.Detector.GeometryDecayVolume or
# prevFlags.Detector.GeometryScintillator or
......@@ -66,9 +70,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 +92,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))
......
......@@ -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()
......
......@@ -82,7 +82,7 @@ elif runtype == "TestBeamMC" :
# New TI12 geometry (ugh)
elif runtype == "TI12MC":
ConfigFlags.GeoModel.FaserVersion = "FASERNU-02"
ConfigFlags.GeoModel.FaserVersion = "FASERNU-03"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-02"
else:
......
......@@ -25,6 +25,11 @@ atlas_add_test( Faser02GeoCheck
PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
PROPERTIES TIMEOUT 300 )
atlas_add_test( Faser03GeoCheck
SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/Faser03TestConfig.py
PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
PROPERTIES TIMEOUT 300 )
atlas_add_test( TestBeamGeoCheck
SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/TestBeamTestConfig.py
......
......@@ -19,6 +19,7 @@ def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs):
GeoModelTestAlg = CompFactory.GeoModelTestAlg
a.addEventAlgo(GeoModelTestAlg(name, FirstSCTStation=1,
LastSCTStation=3,
NumVetoNuStations=0,
**kwargs))
return a
......
......@@ -19,6 +19,7 @@ def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs):
GeoModelTestAlg = CompFactory.GeoModelTestAlg
a.addEventAlgo(GeoModelTestAlg(name, FirstSCTStation=0,
LastSCTStation=3,
NumVetoNuStations=0,
PrintSctIDs=True,
**kwargs))
......@@ -35,7 +36,7 @@ if __name__ == "__main__":
ConfigFlags.Input.isMC = True # Needed to bypass autoconfig
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-02" # Always needed; must match FaserVersion
ConfigFlags.GeoModel.FaserVersion = "FASERNU-02" # Default FASER geometry
# ConfigFlags.GeoModel.GeoExportFile = "faserGeoNu02.db" # Writes out a GeoModel file with the full geometry tree (optional, comment out to skip)
ConfigFlags.GeoModel.GeoExportFile = "FaserNu02.db" # Writes out a GeoModel file with the full geometry tree (optional, comment out to skip)
# ConfigFlags.Detector.EnableVeto = True
# ConfigFlags.Detector.EnableTrigger = True
# ConfigFlags.Detector.EnablePreshower= True
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#!/usr/bin/env python
import sys
from AthenaCommon.Constants import VERBOSE, INFO
from AthenaConfiguration.ComponentFactory import CompFactory
def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs):
# Initialize GeoModel
from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg
a = FaserGeometryCfg(flags)
# Initialize field service
from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
a.merge(MagneticFieldSvcCfg(flags))
# Configure the algorithm itself
GeoModelTestAlg = CompFactory.GeoModelTestAlg
a.addEventAlgo(GeoModelTestAlg(name, FirstSCTStation=0,
LastSCTStation=3,
PrintSctIDs=True,
**kwargs))
return a
if __name__ == "__main__":
from AthenaCommon.Logging import log#, logging
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
Configurable.configurableRun3Behavior = True
# Flags for this job
ConfigFlags.Input.isMC = True # Needed to bypass autoconfig
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-02" # Always needed; must match FaserVersion
ConfigFlags.GeoModel.FaserVersion = "FASERNU-03" # Default FASER geometry
ConfigFlags.GeoModel.GeoExportFile = "FaserNu03.db" # Writes out a GeoModel file with the full geometry tree (optional, comment out to skip)
ConfigFlags.Detector.GeometryEmulsion = True
ConfigFlags.Detector.GeometryTrench = True
# ConfigFlags.Detector.EnableVeto = True
# ConfigFlags.Detector.EnableTrigger = True
# ConfigFlags.Detector.EnablePreshower= True
# ConfigFlags.Detector.EnableFaserSCT = True
# ConfigFlags.Detector.EnableUpstreamDipole = True
# ConfigFlags.Detector.EnableCentralDipole = True
# ConfigFlags.Detector.EnableDownstreamDipole = True
# ConfigFlags.Detector.EnableEcal = True
ConfigFlags.lock()
# Configure components
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
acc = MainServicesCfg(ConfigFlags)
# Set up algorithm
acc.merge(GeoModelTestCfg(ConfigFlags))
# Configure verbosity
msgSvc = acc.getService("MessageSvc")
msgSvc.Format = "% F%30W%S%7W%R%T %0W%M"
# ConfigFlags.dump()
# logging.getLogger('forcomps').setLevel(VERBOSE)
acc.foreach_component("*").OutputLevel = VERBOSE
acc.foreach_component("*ClassID*").OutputLevel = INFO
log.setLevel(VERBOSE)
# Execute and finish
sys.exit(int(acc.run(maxEvents=1).isFailure()))
......@@ -25,6 +25,7 @@ def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs):
LastSCTStation=0,
NumVetoStations=1,
NumVetoPlatesPerStation=2,
NumVetoNuStations=0,
NumTriggerStations=0,
PrintSctIDs=True,
**kwargs))
......
......@@ -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());
if (m_numVetoNuStations > 0) 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
......
......@@ -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"};
......
......@@ -42,9 +42,9 @@ FaserDetectorID::FaserDetectorID()
m_CALO_ID(4),
m_EMULSION_ID(1),
m_VETO_ID(1),
m_VETONU_ID(4),
m_TRIGGER_ID(2),
m_PRESHOWER_ID(3),
m_VETONU_ID(4),
m_SCT_ID(1),
m_ECAL_ID(1),
m_isSLHC(false),
......@@ -78,9 +78,9 @@ FaserDetectorID::FaserDetectorID(const FaserDetectorID& other)
m_CALO_ID (other.m_CALO_ID),
m_EMULSION_ID (other.m_EMULSION_ID),
m_VETO_ID (other.m_VETO_ID),
m_VETONU_ID (other.m_VETONU_ID),
m_TRIGGER_ID (other.m_TRIGGER_ID),
m_PRESHOWER_ID (other.m_PRESHOWER_ID),
m_VETONU_ID (other.m_VETONU_ID),
m_SCT_ID (other.m_SCT_ID),
m_ECAL_ID (other.m_ECAL_ID),
m_isSLHC (other.m_isSLHC),
......
......@@ -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;
};
......
......@@ -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_vetonu,"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_vnID,"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());
......
......@@ -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;
......
......@@ -8,17 +8,17 @@ atlas_subdir( FaserGeoModel )
if (INSTALL_GEOMDB)
add_custom_command (
OUTPUT ${CMAKE_BINARY_DIR}/data/geomDB_sqlite
OUTPUT ${CMAKE_BINARY_DIR}/data/geomDB/geomDB_sqlite
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/geomDB.sql
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/data
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/data/geomDB.sql | sqlite3 ${CMAKE_BINARY_DIR}/data/geomDB_sqlite
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/data/geomDB
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/data/geomDB.sql | sqlite3 ${CMAKE_BINARY_DIR}/data/geomDB/geomDB_sqlite
)
add_custom_target( geomDB ALL DEPENDS ${CMAKE_BINARY_DIR}/data/geomDB_sqlite )
add_custom_target( geomDB ALL DEPENDS ${CMAKE_BINARY_DIR}/data/geomDB/geomDB_sqlite )
# Install the generated file:
install( FILES ${CMAKE_BINARY_DIR}/data/geomDB_sqlite
DESTINATION ${CMAKE_INSTALL_DATADIR} )
install( FILES ${CMAKE_BINARY_DIR}/data/geomDB/geomDB_sqlite
DESTINATION ${CMAKE_INSTALL_DATADIR}/geomDB/ )
endif()
# Install python files from the package:
......
......@@ -23,4 +23,7 @@ def FaserGeometryCfg (flags):
from EcalGeoModel.EcalGeoModelConfig import EcalGeometryCfg
acc.merge(EcalGeometryCfg( flags ))
from FaserGeoModel.TrenchGMConfig import TrenchGeometryCfg
acc.merge(TrenchGeometryCfg( flags ))
return acc
......@@ -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 VetoNuGeoModel.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,
......@@ -112,6 +122,11 @@ def _setupGeoModel():
geoModelSvc.DetectorTools += [ ecalDetectorTool ]
if "FASERNU-03" in DDversion:
from TrenchGeoModel.TrenchGeoModelConf import TrenchDetectorTool
trenchDetectorTool = TrenchDetectorTool( )
geoModelSvc.DetectorTools += [ trenchDetectorTool ]
pass
......
......@@ -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 ))
......
#
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
#
from AthenaConfiguration.ComponentFactory import CompFactory
def TrenchGeometryCfg( flags ):
from FaserGeoModel.GeoModelConfig import GeoModelCfg
acc = GeoModelCfg( flags )
if flags.Detector.GeometryTrench:
TrenchDetectorTool=CompFactory.TrenchDetectorTool
acc.getPrimary().DetectorTools += [ TrenchDetectorTool() ]
return acc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment