Warning, /snippets/Calorimetery/ExtractDetectorTypes/README.md is written in an unsupported language. File is not indexed.
0001 # Extracting Detector Type From Calorimeter (and Tracker) Hits
0002
0003 A short ROOT macro illustrating how to extract the [detector type](https://github.com/AIDASoft/DD4hep/blob/912413d08ca432cc3d84632aa936d83960f6999a/DDCore/include/DD4hep/DetType.h#L40)
0004 from a calorimter (or tracker) hit. This is particularly relevant
0005 for identifying if a calorimter hit/cluster from an _electormagnetic_
0006 or _hadronic_ calorimeter in a generic way.
0007
0008
0009 ## Inputs/Outputs
0010
0011 Processes `.edm4hep.root` output from `npsim`. Generates a few
0012 histograms comparing the `(z, r)` and `(eta, r)` distributions
0013 for hits for different types of detectors (trackers, cherenkov,
0014 calorimeters, etc.).
0015
0016
0017 ## Dependencies
0018
0019 Needs `PODIO` and `edm4hep`. If you're running in the eic-shell,
0020 then it can be run out-of-the-box with the command below.
0021
0022
0023 ## Usage
0024
0025 User options can be set in the `Options` struct defined before
0026 the macro body. And after setting the desired parameters at
0027 the top of the macro, it can be run with:
0028
0029 ```bash
0030 root -b -q PlotDetectorTypes.cxx
0031 ```