Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:20:18

0001 //==============================================================================
0002 //  AIDA Detector description implementation for LHCb
0003 //------------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 //  \author   Markus Frank
0011 //  \date     2018-03-08
0012 //  \version  1.0
0013 //
0014 //==============================================================================
0015 
0016 // Framework include files
0017 #include "Detector/DeVP.h"
0018 #include "DD4hep/Printout.h"
0019 
0020 using namespace gaudi::detail;
0021 
0022 
0023 /// Printout method to stdout
0024 void DeVPStaticObject::print(int indent, int flg)  const    {
0025   std::string prefix = DE::indent(indent);
0026   this->DeVPGenericStaticObject::print(indent,flg);
0027   printout(INFO, "DeVPStatic",
0028            "%s >> Sides:%ld Supports:%ld Modules:%ld Ladders:%ld Sensors:%ld Cut:%g",
0029            prefix.c_str(), sides.size(), supports.size(), modules.size(),
0030            ladders.size(), sensors.size(), sensitiveVolumeCut);
0031   std::for_each(sensors.begin(), sensors.end(), [indent,flg](const DeVPSensorStatic& s) { s.print(indent+1,flg); });
0032 }
0033 
0034 /// Initialization of sub-classes
0035 void DeVPStaticObject::initialize()    {
0036   this->DeVPGenericStaticObject::initialize();
0037   sensitiveVolumeCut = param<double>("sensitiveVolumeCut");
0038 }
0039 
0040 /// Printout method to stdout
0041 void DeVPObject::print(int indent, int flg)  const    {
0042   std::string prefix = DE::indent(indent);
0043   this->DeVPGenericObject::print(indent,flg);
0044   printout(INFO, "DeVP",
0045            "%s >> Sides:%ld Supports:%ld Modules:%ld Ladders:%ld Sensors:%ld",
0046            prefix.c_str(), detector.path().c_str(),
0047            sides.size(), supports.size(), modules.size(), ladders.size(), sensors.size());
0048   std::for_each(sensors.begin(), sensors.end(), [indent,flg](const DeVPSensor& s) {
0049       if ( s.isValid() ) s.print(indent+1,flg);   });
0050 }
0051 
0052 /// Initialization of sub-classes
0053 void DeVPObject::initialize()    {
0054   this->DeVPGenericObject::initialize();
0055   vp_static = de_static;
0056 }