Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions KinKalGeom/fcl/prolog.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ KinKalGeom : {
IPAMaterialName : "HDPE"
STMaterialName : "Target"
CRVMaterialName : "CRVModule"
# Global default (1 = moyalmean). Thick concrete overrides to bethemean via a trailing
# token in MaterialsList.data (KinKal 3.7.0+).
IonizationEnergyLossMode : 1 # Moyal mean
SolidScatteringFraction : 0.999999
GasScatteringFraction : 0.9999999
ElectronBrehmsFraction : 0.04
# Bethe path correction for KKShellXing: off by default; enable per crossing type as needed.
# Only effective when IonizationEnergyLossMode is moyalmean.
BetheCorrectionIPA : false
BetheCorrectionST : false
BetheCorrectionCRV : false
# Reserved until KKExtrap adds DS/shielding crossings (TODO there).
# BetheCorrectionPassive : false
}
}
END_PROLOG
23 changes: 2 additions & 21 deletions KinKalGeom/inc/KKMaterial.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,12 @@ namespace mu2e {
fhicl::Atom<std::string> IPAMaterialName{ Name("IPAMaterialName"), Comment("IPA MaterialName") };
fhicl::Atom<std::string> STMaterialName{ Name("STMaterialName"), Comment("Stopping Target MaterialName") };
fhicl::Atom<std::string> CRVMaterialName{ Name("CRVMaterialName"), Comment("CRV module MaterialName") };
// Global default ionization eloss mode (0=mpv, 1=moyalmean, 2=bethemean). Per-material overrides
// use a trailing token in TrackerConditions/data/MaterialsList.data (KinKal 3.7.0+).
fhicl::Atom<int> elossMode { Name("IonizationEnergyLossMode"), Comment( "Ionization energy loss mode") };
fhicl::Atom<double> solidScatter{ Name("SolidScatteringFraction"), Comment("DahlLynch Scattering model cutoff Fraction for solids") };
fhicl::Atom<double> gasScatter{ Name("GasScatteringFraction"), Comment("DahlLynch Scattering model cutoff Fraction for gases") };
fhicl::Atom<double> eBrehms{ Name("ElectronBrehmsFraction"), Comment("Electron Brehmsstrahlung cutoff Fraction") };
// Unrestricted-Bethe path-length scale for KKShellXing (see Mu2eKinKal/inc/KKShellXing.hh).
// Off by default for every crossing type; enable only where the thicker-shell correction is wanted.
// Effective only when IonizationEnergyLossMode is moyalmean (otherwise forced off with a warning).
fhicl::Atom<bool> betheCorrIPA { Name("BetheCorrectionIPA"),
Comment("Apply Bethe path correction to IPA shell crossings"), false };
fhicl::Atom<bool> betheCorrST { Name("BetheCorrectionST"),
Comment("Apply Bethe path correction to stopping-target foil crossings"), false };
fhicl::Atom<bool> betheCorrCRV { Name("BetheCorrectionCRV"),
Comment("Apply Bethe path correction to CRV scintillator-sector crossings"), false };
// Reserved for DS/shielding crossings once KKExtrap wires them (see TODO there).
// fhicl::Atom<bool> betheCorrPassive { Name("BetheCorrectionPassive"),
// Comment("Apply Bethe path correction to passive material crossings (DS cylinders, concrete/strongback planes)"), false };
};

explicit KKMaterial( Config const& config, Tracker const& tracker);
Expand All @@ -58,11 +48,6 @@ namespace mu2e {
auto STMaterial() const { return matdbinfo_->findDetMaterial(stmatname_); }
auto CRVMaterial() const { return matdbinfo_->findDetMaterial(crvmatname_); }
auto material(std::string const& name) const { return matdbinfo_->findDetMaterial(name); }
// Per-crossing-type Bethe path correction (all false by default). See Config atoms above.
bool applyBetheCorrectionIPA() const { return betheCorrIPA_; }
bool applyBetheCorrectionST() const { return betheCorrST_; }
bool applyBetheCorrectionCRV() const { return betheCorrCRV_; }
// bool applyBetheCorrectionPassive() const { return betheCorrPassive_; }

// FileFinder interface
std::string matElmDictionaryFileName() const override;
Expand All @@ -78,10 +63,6 @@ namespace mu2e {
std::string wallmatname_, gasmatname_, wirematname_,ipamatname_, stmatname_, crvmatname_;
std::unique_ptr<MatDBInfo> matdbinfo_; // material database
std::unique_ptr<KKStrawMaterial> smat_; // straw material
bool betheCorrIPA_ = false;
bool betheCorrST_ = false;
bool betheCorrCRV_ = false;
// bool betheCorrPassive_ = false;
};
}
#endif
14 changes: 0 additions & 14 deletions KinKalGeom/src/KKMaterial.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "Offline/KinKalGeom/inc/KKMaterial.hh"
#include "Offline/ConfigTools/inc/ConfigFileLookupPolicy.hh"
#include "KinKal/MatEnv/DetMaterial.hh"
#include "messagefacility/MessageLogger/MessageLogger.h"

namespace mu2e {
using MatDBInfo = MatEnv::MatDBInfo;
Expand All @@ -19,19 +18,6 @@ namespace mu2e {
crvmatname_(matconfig.CRVMaterialName()) {
MatEnv::DetMaterialConfig dmconf;
dmconf.elossmode_ = (DetMaterial::energylossmode)matconfig.elossMode();
// The KKShellXing Bethe (unrestricted ionization mean) correction is derived assuming KinKal
// returns the restricted Moyal mean; only enable requested crossing types in that mode.
bool const moyal = (dmconf.elossmode_ == DetMaterial::moyalmean);
bool const wantAny = matconfig.betheCorrIPA() || matconfig.betheCorrST()
|| matconfig.betheCorrCRV(); // || matconfig.betheCorrPassive();
if(wantAny && !moyal) {
mf::LogWarning("KKMaterial") << "BetheCorrection* requested but IonizationEnergyLossMode is not moyalmean ("
<< matconfig.elossMode() << "): all Bethe path corrections forced off.";
}
betheCorrIPA_ = matconfig.betheCorrIPA() && moyal;
betheCorrST_ = matconfig.betheCorrST() && moyal;
betheCorrCRV_ = matconfig.betheCorrCRV() && moyal;
// betheCorrPassive_ = matconfig.betheCorrPassive() && moyal;
dmconf.scatterfrac_solid_ = matconfig.solidScatter();
dmconf.scatterfrac_gas_ = matconfig.gasScatter();
dmconf.ebrehmsfrac_ = matconfig.eBrehms();
Expand Down
9 changes: 5 additions & 4 deletions Mu2eKinKal/fcl/prolog.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Mu2eKinKal : {
SampleSurfaces : [] # specific to the fit type
SaveHitCalibInfo : false
SaveDomains : false
SaveMaterialXings : false # save generic passive material Xings (filled during extrapolation) in the KalSeed
}

CHSEEDFIT: {
Expand Down Expand Up @@ -376,7 +377,7 @@ Mu2eKinKal : {
MaxDtStep : 1.0 # (ns)
MinV : 0.0 # mm/ns
BCorrTolerance : 1e-4 # momemntum fraction
ToTrackerEnds : true
ToTrackerPerimeter : true
Upstream : true
BackToTracker : false
ToOPA : true
Expand All @@ -389,7 +390,7 @@ Mu2eKinKal : {
MaxDtStep : 10.0 # (ns)
MinV : 0.0 # mm/ns
BCorrTolerance : 1e-2 # momemntum fraction
ToTrackerEnds : true
ToTrackerPerimeter : true
Upstream : false
BackToTracker : false
ToOPA : false
Expand All @@ -402,7 +403,7 @@ Mu2eKinKal : {
MaxDtStep : 1.0 # (ns)
MinV : 1e-5 # mm/ns
BCorrTolerance : 1e-2 # momemntum fraction
ToTrackerEnds : false
ToTrackerPerimeter : false
Upstream : false
BackToTracker : false
ToOPA : false
Expand All @@ -415,7 +416,7 @@ Mu2eKinKal : {
MaxDtStep : 1.0 # (ns)
MinV : 1e-5 # mm/ns
BCorrTolerance : 1e-2 # momemntum fraction
ToTrackerEnds : false
ToTrackerPerimeter : false
Upstream : false
BackToTracker : false
ToOPA : false
Expand Down
108 changes: 0 additions & 108 deletions Mu2eKinKal/inc/ExtrapolateCRV.hh

This file was deleted.

Loading