Skip to content

Commit

Permalink
add detector type and calodata extension to ECalEndcap_Turbine_o1_v03…
Browse files Browse the repository at this point in the history
…_geo (#439)
  • Loading branch information
giovannimarchiori authored Feb 27, 2025
1 parent 0a6afae commit cad1dd8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions detector/calorimeter/ECalEndcap_Turbine_o1_v03_geo.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "DD4hep/DetFactoryHelper.h"
#include "DD4hep/Printout.h"
#include "TMatrixT.h"
#include "XML/Utilities.h"
#include <DDRec/DetectorData.h>

// todo: remove gaudi logging and properly capture output
#define endmsg std::endl
Expand Down Expand Up @@ -776,6 +778,22 @@ namespace det {
dd4hep::PlacedVolume envelopePhysVol = motherVol.placeVolume(endcapsAssembly);
caloDetElem.setPlacement(envelopePhysVol);
envelopePhysVol.addPhysVolID("system", idDet);

// Create dummy caloData object for PandoraPFA
// FIXME: fill calo and layer data information
auto caloData = new dd4hep::rec::LayeredCalorimeterData;
caloData->layoutType = dd4hep::rec::LayeredCalorimeterData::EndcapLayout;
caloDetElem.addExtension<dd4hep::rec::LayeredCalorimeterData>(caloData);

// save extent information
caloData->extent[0] = dim.rmin1();
caloData->extent[1] = dim.rmax1();
caloData->extent[2] = dim.z_offset()-dim.dz()/2.;
caloData->extent[3] = dim.z_offset()+dim.dz()/2.;

// Set type flags
dd4hep::xml::setDetectorTypeFlag(xmlDetElem, caloDetElem);

return caloDetElem;
}
}
Expand Down

0 comments on commit cad1dd8

Please sign in to comment.