MCCollector
needs lhcb-conddb/DDDB!84 (merged) !738 (merged) !746 (merged) !750 (merged)
MCCollector
This adds an additional tracker-type sensitive detector (MCCollector) on top of existing geometry in order to collect all the information about MCParticles passing through. The general idea is to make it very thin and tangent to the ZMaxPlaneForStoring
.
MR is marked as draft, as it is more a hack and I'm not sure yet how to make it more generic...
MR is no longer a draft, since adding external geometry has been added in !750 (merged)
Here's an example of an MCCollector as a 10m x 10m x 0.01cm thin plane placed in front of the Neutron Shielding:
Configuration
- Adding tilt in Neutron Shielding (from lhcb-conddb/DDDB!84 (merged))
from Configurables import CondDB
CondDB().Upgrade = True
from Configurables import LHCbApp
LHCbApp().DDDBtag = "upgrade/dddb-20210617"
LHCbApp().CondDBtag = "upgrade/sim-20210617-vc-mu100"
LHCbApp().Simulation = True
LHCbApp().EvtMax = 1
from Configurables import Gauss
Gauss().DataType = "Upgrade"
- Ensuring
ZMaxForStoring
is in front of Neutron Shielding (from !738 (merged))
from Configurables import GaussPostTrackAction
from GaudiKernel.SystemOfUnits import mm, degree
gpta = GaussPostTrackAction("PostTrack")
gpta.ZmaxForStoring = 11948.25 * mm # new default
gpta.ZmaxForStoringYShift = 0. * mm # new default
gpta.ZmaxForStoringTilt = 0.207 * degree # new default
- Adding MCCollector
# Settings for the MC Collector
from Configurables import ExternalDetectorEmbedder
external = ExternalDetectorEmbedder("EcalCollectorEmbedder")
# generating ecal collector plane
from GaudiKernel.SystemOfUnits import m, mm, degree
from Gaudi.Configuration import DEBUG
shapes = {
'EcalCollector': {
"Type": "Cuboid",
"xPos": 0. * m,
"yPos": 0. * m,
"zPos": 11948.245 * mm, # zMax - thickness/2!
"xSize": 10. * m,
"ySize": 10. * m,
"zSize": .01 * m,
"xAngle": -.207 * degree,
"OutputLevel": DEBUG,
},
}
sensitive = {
'EcalCollector': {
"Type": "MCCollectorSensDet",
"RequireEDep": False,
"OutputLevel": DEBUG,
},
}
hit = {
'EcalCollector': {
'Type': 'GetMCCollectorHitsAlg',
'OutputLevel': DEBUG,
},
}
external.Shapes = shapes
external.Sensitive = sensitive
external.Hit = hit
# embedding of the geometry in GaussGeo
from Configurables import Gauss
Gauss().ExternalDetectorEmbedder = "EcalCollectorEmbedder"
ecal_collector.qmt
This test constructs a collect plane for the electromagnetic calorimeter just in front of the Neutron Shielding. The test passes if all the hits generated in the electromagnetic calorimeter are matched with these coming from the collector.