Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:04:07

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // File: BscSD.cc
0003 // Date: 02.2006
0004 // Description: Sensitive Detector class for Bsc
0005 // Modifications:
0006 ///////////////////////////////////////////////////////////////////////////////
0007 
0008 #include "SimG4CMS/Forward/interface/BscSD.h"
0009 #include "SimG4CMS/Forward/interface/BscG4Hit.h"
0010 #include "SimG4CMS/Forward/interface/BscG4HitCollection.h"
0011 #include "SimG4CMS/Forward/interface/BscNumberingScheme.h"
0012 
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0015 
0016 #include "G4Step.hh"
0017 
0018 #include <iostream>
0019 
0020 //-------------------------------------------------------------------
0021 BscSD::BscSD(const std::string& name,
0022              const SensitiveDetectorCatalog& clg,
0023              edm::ParameterSet const& p,
0024              const SimTrackManager* manager)
0025     : TimingSD(name, clg, manager) {
0026   //Parameters
0027   edm::ParameterSet m_p = p.getParameter<edm::ParameterSet>("BscSD");
0028   int verbn = m_p.getUntrackedParameter<int>("Verbosity");
0029 
0030   SetVerboseLevel(verbn);
0031 
0032   if (name == "BSCHits") {
0033     if (verbn > 0) {
0034       edm::LogVerbatim("BscSim") << "name = BSCHits and  new BscNumberingSchem";
0035     }
0036   } else {
0037     edm::LogWarning("BscSim") << "BscSD: ReadoutName " << name << " not supported";
0038   }
0039 }
0040 
0041 BscSD::~BscSD() {}
0042 
0043 uint32_t BscSD::setDetUnitId(const G4Step* aStep) { return BscNumberingScheme::getUnitID(aStep); }