-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] First DECal / SiW ECal commit #294
base: master
Are you sure you want to change the base?
Changes from all commits
8479e80
2fd40d7
ba42ad9
ba49172
e838711
acd1cad
fd3674e
e5210b8
f8feb3e
2e12c47
77fcad1
ae03431
77a19a6
cc7e7a2
e627926
80030f6
12bb45c
5b42744
40b9222
b671bef
2f7de76
f408156
1361ac2
47b2b43
06f4b22
d295777
a3e14ae
8fa4bb7
b5dfa6a
57c968c
b047b93
e6c1161
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> | ||
|
||
<info name="FCC" | ||
title="Air Volume to replace the Hcal" | ||
author="J. Lingemann" | ||
url="no" | ||
status="development" | ||
version="$Id:??$"> | ||
<comment>HCal Place-Holder</comment> | ||
</info> | ||
<display> | ||
<vis name="HCalEnvelopeVis" r="0.25" g="0.91" b="0.29" showDaughters="false" visible="true"/> | ||
<vis name="HCalEnvelopeEndcapVis" r="0.49" g="0.91" b="0.51" showDaughters="false" visible="true"/> | ||
<vis name="HCalEnvelopeFwdVis" r="0.65" g="0.87" b="0.67" showDaughters="false" visible="true"/> | ||
</display> | ||
<define> | ||
<constant name="HcalSpacer" value="100*mm" /> | ||
</define> | ||
<detectors> | ||
<detector name="HCalEnvelope" type="SimpleCylinder" vis="HCalEnvelopeVis"> | ||
<status id="0"/> | ||
<comment>Envelope for HCal barrel</comment> | ||
<dimensions rmin="BarHCal_rmin+HcalSpacer" rmax="BarHCal_rmax" dz="BarHCal_dz" phi0="0" deltaphi="360*deg" z_offset="0*cm" material="Air"/> | ||
</detector> | ||
<!-- End-caps --> | ||
<!--detector name="HCalEnvelopeEndcapPos" type="SimpleCylinder" vis="HCalEnvelopeEndcapVis"> | ||
<status id="0"/> | ||
<comment>Envelope for HCal positive end-cap</comment> | ||
<dimensions rmin="EndCapHCal_rmin+HcalSpacer" rmax="EndCapHCal_rmax" dz="EndCapHCal_dz-HcalSpacer/2.0" phi0="0" deltaphi="360*deg" z_offset="EndCapHCal_zOffset+HcalSpacer" material="Air"/> | ||
</detector> | ||
<detector name="HCalEnvelopeEndcapNeg" type="SimpleCylinder" vis="HCalEnvelopeEndcapVis"> | ||
<status id="0"/> | ||
<comment>Envelope for HCal positive end-cap</comment> | ||
<dimensions rmin="EndCapHCal_rmin+HcalSpacer" rmax="EndCapHCal_rmax" dz="EndCapHCal_dz-HcalSpacer/2.0" phi0="0" deltaphi="360*deg" z_offset="-EndCapHCal_zOffset-HcalSpacer" material="Air"/> | ||
</detector--> | ||
<!-- Forward detectors --> | ||
<!--etector name="HCalEnvelopeFwdPos" type="SimpleCylinder" vis="HCalEnvelopeFwdVis"> | ||
<status id="0"/> | ||
<comment>Envelope for forward HCal positive</comment> | ||
<dimensions rmin="FwdHCal_rmin" rmax="FwdHCal_rmax" dz="FwdHCal_dz-HcalSpacer/2.0" phi0="0" deltaphi="360*deg" z_offset="FwdHCal_zOffset+HcalSpacer" material="Air"/> | ||
</detector> | ||
<detector name="HCalEnvelopeFwdNeg" type="SimpleCylinder" vis="HCalEnvelopeFwdVis"> | ||
<status id="0"/> | ||
<comment>Envelope for forward HCal positive</comment> | ||
<dimensions rmin="FwdHCal_rmin" rmax="FwdHCal_rmax" dz="FwdHCal_dz-HcalSpacer/2.0" phi0="0" deltaphi="360*deg" z_offset="-FwdHCal_zOffset-HcalSpacer" material="Air"/> | ||
</detector--> | ||
</detectors> | ||
</lccdd> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> | ||
|
||
<info name="FCC" | ||
title="Air Volume to replace the Tracker" | ||
author="J. Lingemann" | ||
url="no" | ||
status="development" | ||
version="$Id:??$"> | ||
<comment>Tracker Place-Holder</comment> | ||
</info> | ||
<display> | ||
<vis name="TrackerEnvelopeVis" r="0.87" g="0.27" b="0.15" showDaughters="false" visible="true"/> | ||
<vis name="TrackerEnvelopeFwdVis" r="0.87" g="0.11" b="0.01" showDaughters="false" visible="true"/> | ||
</display> | ||
|
||
<detectors> | ||
<detector name="TrackerEnvelopeBarrel" type="SimpleCylinder" vis="TrackerEnvelopeVis"> | ||
<status id="0"/> | ||
<comment>Envelope for Tracker</comment> | ||
<dimensions rmin="Tracker_rmin" rmax="Tracker_rmax" dz="Tracker_dz" phi0="0" deltaphi="360*deg" z_offset="0*cm" material="Air"/> | ||
</detector> | ||
<!-- Forward detectors --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, remove the commented out code. |
||
<!--detector name="TrackerEnvelopeFwdPos" type="SimpleCylinder" vis="TrackerEnvelopeFwdVis"> | ||
<status id="0"/> | ||
<comment>Envelope for forward Tracker positive</comment> | ||
<dimensions rmin="FwdTracker_rmin" rmax="FwdTracker_rmax" dz="FwdTracker_dz" phi0="0" deltaphi="360*deg" z_offset="FwdTracker_zOffset" material="Air"/> | ||
</detector> | ||
<detector name="TrackerEnvelopeFwdNeg" type="SimpleCylinder" vis="TrackerEnvelopeFwdVis"> | ||
<status id="0"/> | ||
<comment>Envelope for forward Tracker positive</comment> | ||
<dimensions rmin="FwdTracker_rmin" rmax="FwdTracker_rmax" dz="FwdTracker_dz" phi0="0" deltaphi="360*deg" z_offset="-FwdTracker_zOffset" material="Air"/> | ||
</detector--> | ||
</detectors> | ||
</lccdd> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ DECLARE_ALGORITHM_FACTORY(RedoSegmentation) | |
RedoSegmentation::RedoSegmentation(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgorithm(aName, aSvcLoc) { | ||
declareProperty("inhits", m_inHits, "Hit collection with old segmentation (input)"); | ||
declareProperty("outhits", m_outHits, "Hit collection with modified segmentation (output)"); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you do changes to the file, please run |
||
} | ||
|
||
RedoSegmentation::~RedoSegmentation() {} | ||
|
@@ -83,11 +84,17 @@ StatusCode RedoSegmentation::execute() { | |
// cellID contains the volumeID that needs to be copied to the new id | ||
uint64_t oldid = 0; | ||
uint debugIter = 0; | ||
|
||
int nhits = 0; | ||
|
||
for (const auto& hit : *inHits) { | ||
|
||
fcc::CaloHit newHit = outHits->create(); | ||
newHit.energy(hit.energy()); | ||
newHit.time(hit.time()); | ||
m_oldDecoder->setValue(hit.cellId()); | ||
|
||
nhits++; | ||
|
||
if (debugIter < m_debugPrint) { | ||
debug() << "OLD: " << m_oldDecoder->valueString() << endmsg; | ||
} | ||
|
@@ -107,6 +114,7 @@ StatusCode RedoSegmentation::execute() { | |
debugIter++; | ||
} | ||
} | ||
info() << "nhits = " << nhits << endmsg; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That probably should be in |
||
return StatusCode::SUCCESS; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,5 +83,6 @@ class RedoSegmentation : public GaudiAlgorithm { | |
std::vector<std::string> m_detectorIdentifiers; | ||
/// Limit of debug printing | ||
Gaudi::Property<uint> m_debugPrint{this, "debugPrint", 10, "Limit of debug printing"}; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That should disappear if you run checkformat on that file. |
||
}; | ||
#endif /* DETCOMPONENTS_REDOSEGMENTATION_H */ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
from Gaudi.Configuration import * | ||
from Configurables import ApplicationMgr | ||
|
||
from Configurables import FCCDataSvc | ||
inputfile = "/afs/cern.ch/user/t/toprice/private/FCC/FCCSW/batch_eos/50Layers_2.1mmW_50umPixels_18umThick_FCCSW0.8/100GeV_BFIELD4T_ETAMIN-0.001_ETAMAX0.001/output_100GeV_BFIELD4T_1.root" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First step would be to put in your public area so that we can copy it to the where we keep our test files. |
||
podiosvc = FCCDataSvc("EventDataSvc", input=inputfile) | ||
|
||
from Configurables import PodioInput | ||
podioinput = PodioInput("PodioReader", collections=["positionedCaloHits"], OutputLevel=DEBUG) | ||
|
||
from Configurables import GeoSvc | ||
geoservice = GeoSvc("GeoSvc", detectors=[ 'file:/afs/cern.ch/user/t/toprice/private/FCC/FCCSW/Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. path should be relative (remove |
||
'file:/afs/cern.ch/user/t/toprice/private/FCC/FCCSW/Detector/DetFCChhECalDigital/compact/FCChh_DECalBarrel_50Layers_2.1mmW_50umPixels_18umThick.xml' | ||
], | ||
OutputLevel = DEBUG) | ||
|
||
from Configurables import RedoSegmentation | ||
resegment = RedoSegmentation("ReSegmentation", | ||
# old bitfield (readout) | ||
oldReadoutName = "BarDECal_Readout", | ||
# specify which fields are going to be deleted | ||
oldSegmentationIds = ["x","y","z"], | ||
# new bitfield (readout), with new segmentation | ||
newReadoutName="BarDECal_Pads", | ||
OutputLevel = DEBUG) | ||
# clusters are needed, with deposit position and cellID in bits | ||
resegment.inhits.Path = "positionedCaloHits" | ||
resegment.outhits.Path = "newCaloHits" | ||
|
||
from Configurables import CreateCaloCells | ||
createcells = CreateCaloCells("CreateCaloCells", | ||
doCellCalibration = False, | ||
addCellNoise = False, filterCellNoise = False, | ||
OutputLevel = DEBUG) | ||
createcells.hits.Path="newCaloHits" | ||
createcells.cells.Path="newCaloCells" | ||
|
||
from Configurables import DECalLongitudinalTest | ||
hist = DECalLongitudinalTest("hists", | ||
readoutName = "BarDECal_Readout", | ||
layerFieldName = "layer", | ||
numLayers = 50, # one more because index starts at 1 - layer 0 will be always empty | ||
OutputLevel = DEBUG) | ||
hist.deposits.Path="positionedCaloHits" | ||
|
||
THistSvc().Output = ["rec DATAFILE='./hist_test.root' TYP='ROOT' OPT='RECREATE'"] | ||
THistSvc().PrintAll=True | ||
THistSvc().AutoSave=True | ||
THistSvc().AutoFlush=False | ||
THistSvc().OutputLevel=INFO | ||
|
||
from Configurables import FCCDataSvc, PodioOutput | ||
#podiosvc = FCCDataSvc("EventDataSvc") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the commented out code |
||
podioout = PodioOutput("out", filename="/afs/cern.ch/user/t/toprice/private/FCC/FCCSW/batch_eos/50Layers_2.1mmW_50umPixels_18umThick_FCCSW0.8/100GeV_BFIELD4T_ETAMIN-0.001_ETAMAX0.001/testResegmentationXYZ_100GeV.root") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here also relative path. |
||
podioout.outputCommands = ["keep *"] | ||
|
||
ApplicationMgr(EvtSel='NONE', | ||
EvtMax=5000, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If that is an example, that is far too many events. Also, if that is a test, you could add it to |
||
TopAlg=[podioinput, resegment, createcells,hist, podioout], | ||
ExtSvc = [podiosvc, geoservice], | ||
OutputLevel=DEBUG) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
################################################################################ | ||
# Package: DetFCChhECalDigital | ||
################################################################################ | ||
gaudi_subdir(DetFCChhECalDigital v1r0) | ||
|
||
gaudi_depends_on_subdirs(GaudiKernel | ||
Detector/DetExtensions) | ||
|
||
|
||
find_package(DD4hep) | ||
find_package(Geant4) | ||
include(${Geant4_USE_FILE}) | ||
|
||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${DD4hep_ROOT}/cmake ) | ||
include( DD4hep ) | ||
|
||
find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add line: |
||
gaudi_add_module(DetFCChhECalDigital | ||
src/*.cpp | ||
INCLUDE_DIRS DD4hep ROOT DetExtensions Geant4 | ||
LINK_LIBRARIES GaudiKernel DD4hep ROOT Geant4) | ||
|
||
set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) | ||
message(STATUS "LIBRARY_OUTPUT_PATH -> ${LIBRARY_OUTPUT_PATH}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is probably not needed anymore. |
||
dd4hep_generate_rootmap(DetFCChhECalDigital) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> | ||
|
||
|
||
<info name="FCChh_DECalBarrel_50Layers_2.1mmW_50umPixels_18umThick" | ||
title="DECal Barrel Calorimeter" | ||
author="T. Price" | ||
url="no" | ||
status="development" | ||
version="$Id:??$"> | ||
<comment>DECal very conceptual design</comment> | ||
</info> | ||
|
||
<define> | ||
<constant name="BarECalOuterSpacer" value="100*mm"/> | ||
<!-- calorimeter volume --> | ||
<!-- have removed the cryostat as we do not need it! --> | ||
<constant name="EMBarrel_rmin" value="BarECal_rmin+BarECalOuterSpacer"/> | ||
<constant name="EMBarrel_rmax" value="BarECal_rmax-BarECalOuterSpacer"/> | ||
<constant name="EMBarrel_dz" value="BarECal_dz"/> | ||
|
||
</define> | ||
|
||
<display> | ||
<!--vis name="ecal_envelope" r="0.1" g="0.2" b="0.6" alpha="0.1" showDaughers="false" visible="false" /--> | ||
<vis name="ecal_volume" r="0.6" g="0.2" b="0.1" alpha="0.1" showDaughers="false" visible="false" /> | ||
<!--vis name="ecal_active" r=".1" g="0.8" b="0.6" alpha="1.0" showDaughers="true" visible="true" /--> | ||
</display> | ||
|
||
<readouts> | ||
<readout name="BarDECal_Readout"> | ||
<!-- layer:7 gives 7 bits (max 128 layers) --> | ||
<!-- x, y segmentation -24 to allow 16777216 pixels --> | ||
<segmentation type="CartesianGridXYZ" grid_size_x="0.05*mm" grid_size_y="0.05*mm" grid_size_z="0.05*mm"/> | ||
<!--id>system:3,active:1,EM_barrel:1,layer:6,digital:1,stave:4,module:3,x:-17,y:-17,z:-11</id--> | ||
<id>system:3,active:1,EM_barrel:1,layer:6,digital:1,x:-17,y:-17,z:-18</id> | ||
</readout> | ||
|
||
<readout name="BarDECal_Pads"> | ||
<!-- layer:7 gives 7 bits (max 128 layers) --> | ||
<!-- x, y segmentation -24 to allow 16777216 pixels --> | ||
<segmentation type="CartesianGridXYZ" grid_size_x="5*mm" grid_size_y="5*mm" grid_size_z="5*mm"/> | ||
|
||
<!--id>system:3,active:1,EM_barrel:1,layer:6,digital:1,stave:4,module:3,x:-15,y:-15,z:-15</id--> | ||
<id>system:3,active:1,EM_barrel:1,layer:6,digital:1,x:-15,y:-15,z:-18</id> | ||
<!-- x:-17,y:-17, no stave--> | ||
|
||
</readout> | ||
|
||
<!--readout name="BarDECal_Readout"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove the obsolete code. |
||
<segmentation type="GridPhiEta" grid_size_eta="0.05*mm" phi_bins="300000"/> | ||
<id>system:3,active:1,EM_barrel:1,layer:7,eta:-18,phi:-19</id> | ||
</readout--> | ||
</readouts> | ||
|
||
|
||
<detectors> | ||
<detector id="5" name="ECalBarrel" type="EmCaloDigiBarrel" readout="BarDECal_Readout"> | ||
<dimensions rmin="EMBarrel_rmin" rmax="EMBarrel_rmax" dz="EMBarrel_dz" vis="ecal_envelope"/> | ||
<calorimeter id="1" name="EM_barrel" > | ||
<dimensions rmin="EMBarrel_rmin" rmax="EMBarrel_rmax" dz="EMBarrel_dz" vis="ecal_volume" numsides="8" nmodules="5"/> | ||
|
||
<layers repeat="50"/> | ||
<active thickness="0.018*mm"> | ||
<material name="Silicon"/> | ||
</active> | ||
<substrate thickness="0.450*mm"> | ||
<material name="Silicon"/> | ||
</substrate> | ||
<passive thickness="2.1*mm"> | ||
<material name="Tungsten" /> | ||
</passive> | ||
<spacing thickness="0*mm"> | ||
<material name="Air" /> | ||
</spacing> | ||
<tracker thickness="0.0*cm"> | ||
<material name="Silicon"/> | ||
</tracker> | ||
</calorimeter> | ||
</detector> | ||
</detectors> | ||
</lccdd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you need it just for the barrel, remove the commented out code.