/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SimG4Core/Application/interface/StackingAction.h
110 строк
3 KB
Vladimir
Added possibility to handle tracks without track information data
30 сен 2025, 18:03
30 сен 2025, 18:03
adf360a
Код
Авторство
О чём код?
#ifndef SimG4Core_StackingAction_H #define SimG4Core_StackingAction_H #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "G4UserStackingAction.hh" #include "G4Region.hh" #include "G4Track.hh" #include "G4LogicalVolume.hh" #include <string> #include <vector> class TrackingAction; class CMSSteppingVerbose; class G4VProcess; class CMSG4TrackInterface; class StackingAction : public G4UserStackingAction { public: explicit StackingAction(const edm::ParameterSet& ps, const CMSSteppingVerbose*); ~StackingAction() override = default; G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) final; private: void initPointer(); int isItPrimaryDecayProductOrConversion(const int subtype, const G4Track* mother) const; int isItFromPrimary(const G4Track* mother, int) const; bool rrApplicable(const G4Track* current, const G4Track* mother) const; bool isItOutOfTimeWindow(const G4Region*, const double&) const; bool isThisRegion(const G4Region*, std::vector<const G4Region*>&) const; void printRegions(const std::vector<const G4Region*>& reg, const std::string& word) const; private: bool savePDandCinTracker, savePDandCinCalo; bool savePDandCinMuon, saveFirstSecondary; bool savePDandCinAll; bool killInCalo{false}; bool killInCaloEfH{false}; bool killHeavy, trackNeutrino, killDeltaRay; bool killExtra; bool killGamma; double limitEnergyForVacuum; double kmaxIon, kmaxNeutron, kmaxProton; double kmaxGamma; double maxTrackTime; double maxTrackTimeForward; double maxZCentralCMS; unsigned int numberTimes; std::vector<double> maxTrackTimes; std::vector<std::string> maxTimeNames; std::vector<std::string> deadRegionNames; std::vector<const G4Region*> maxTimeRegions; std::vector<const G4Region*> trackerRegions; std::vector<const G4Region*> muonRegions; std::vector<const G4Region*> caloRegions; std::vector<const G4Region*> lowdensRegions; std::vector<const G4Region*> deadRegions; G4VSolid* worldSolid; CMSG4TrackInterface* m_trackInterface; const CMSSteppingVerbose* steppingVerbose; const G4VProcess* m_Compton{nullptr}; // Russian roulette regions const G4Region* regionEcal{nullptr}; const G4Region* regionHcal{nullptr}; const G4Region* regionMuonIron{nullptr}; const G4Region* regionPreShower{nullptr}; const G4Region* regionCastor{nullptr}; const G4Region* regionZDC{nullptr}; const G4Region* regionHGcal{nullptr}; const G4Region* regionWorld{nullptr}; // Russian roulette energy limits double gRusRoEnerLim; double nRusRoEnerLim; // Russian roulette factors double gRusRoEcal; double nRusRoEcal; double gRusRoHcal; double nRusRoHcal; double gRusRoMuonIron; double nRusRoMuonIron; double gRusRoPreShower; double nRusRoPreShower; double gRusRoCastor; double nRusRoCastor; double gRusRoZDC; double nRusRoZDC; double gRusRoHGcal; double nRusRoHGcal; double gRusRoWorld; double nRusRoWorld; // flags bool gRRactive{false}; bool nRRactive{false}; }; #endif