-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/master' into nkx111-patch-3
- Loading branch information
Showing
29 changed files
with
199 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | ||
|
||
<!-- | ||
First concept author G. Luzón (16-11-2020) --> | ||
|
||
<restG4> | ||
|
||
<TRestRun name="CosmicMuonRun" title="A basic muon test with 2 active volumes"> | ||
<parameter name="experimentName" value="CosmicMuonScan"/> | ||
<parameter name="readOnly" value="false"/> | ||
<parameter name="runNumber" value="111"/> | ||
<parameter name="runDescription" value=""/> | ||
<parameter name="user" value="${USER}"/> | ||
<parameter name="verboseLevel" value="1"/> | ||
<parameter name="overwrite" value="off"/> | ||
<parameter name="outputFileName" value="Run[fRunNumber]_[fRunType]_[fRunTag]_[fRunUser].root"/> | ||
</TRestRun> | ||
|
||
<TRestGeant4Metadata name="restG4 run" title="MuonsFromCircle"> | ||
|
||
<parameter name="gdmlFile" value="setup.gdml"/> | ||
<parameter name="subEventTimeDelay" value="100us"/> | ||
|
||
<parameter name="nEvents" value="1000"/> | ||
|
||
<parameter name="saveAllEvents" value="false"/> | ||
<parameter name="printProgress" value="true"/> | ||
|
||
<generator type="surface" shape="circle" position="(0,0,50)cm" size="(15,0,0)cm" rotationAngle="0" | ||
rotationAxis="(1,0,0)"> | ||
<source particle="mu-" excitedLevel="0.0" fullChain="on"> | ||
<energyDist type="TH1D" file="Muons.root" spctName="cosmicmuon"/> | ||
<angularDist type="TH1D" file="CosmicAngles.root" spctName="Theta2" direction="(0,0,-1)"/> | ||
</source> | ||
</generator> | ||
|
||
<storage sensitiveVolume="det_dw_01"> | ||
<parameter name="energyRange" value="(0,10)" units="GeV"/> | ||
<activeVolume name="det_dw_01" chance="1" maxStepSize="1mm"/> | ||
<activeVolume name="det_up_01" chance="1" maxStepSize="1mm"/> | ||
</storage> | ||
</TRestGeant4Metadata> | ||
|
||
<TRestGeant4PhysicsLists name="default" title="First physics list implementation." verboseLevel="warning"> | ||
<parameter name="cutForGamma" value="1" units="um"/> | ||
<parameter name="cutForElectron" value="1" units="um"/> | ||
<parameter name="cutForPositron" value="1" units="um"/> | ||
|
||
<parameter name="cutForMuon" value="1" units="mm"/> | ||
<parameter name="cutForNeutron" value="1" units="mm"/> | ||
<parameter name="minEnergyRangeProductionCuts" value="1" units="keV"/> | ||
<parameter name="maxEnergyRangeProductionCuts" value="1" units="GeV"/> | ||
|
||
<!-- EM Physics lists --> | ||
<physicsList name="G4EmLivermorePhysics"></physicsList> | ||
<!-- <physicsList name="G4EmPenelopePhysics"> </physicsList> --> | ||
<!-- <physicsList name="G4EmStandardPhysics_option3"> </physicsList> --> | ||
|
||
<!-- Decay physics lists --> | ||
<physicsList name="G4DecayPhysics"></physicsList> | ||
<physicsList name="G4RadioactiveDecayPhysics"></physicsList> | ||
<physicsList name="G4RadioactiveDecay"> | ||
<option name="ICM" value="true"/> | ||
<option name="ARM" value="true"/> | ||
</physicsList> | ||
|
||
<!-- Hadron physics lists --> | ||
|
||
<physicsList name="G4HadronElasticPhysicsHP"></physicsList> | ||
<physicsList name="G4IonBinaryCascadePhysics"></physicsList> | ||
<physicsList name="G4HadronPhysicsQGSP_BIC_HP"></physicsList> | ||
<physicsList name="G4EmExtraPhysics"></physicsList> | ||
|
||
</TRestGeant4PhysicsLists> | ||
|
||
</restG4> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
Int_t ValidateWall(string fname) { | ||
gSystem->Load("/usr/local/rest-for-physics/lib/libRestFramework.so"); | ||
gSystem->Load("/usr/local/rest-for-physics/lib/libRestGeant4.so"); | ||
|
||
TRestRun run(fname); | ||
TRestGeant4Event* event = run.GetInputEvent<TRestGeant4Event>(); | ||
|
||
if (run.GetRunTag() != "MuonsFromCircle") { | ||
cout << "Run tag : " << run.GetRunTag() << endl; | ||
cout << "The run tag of the basic validation test should be 'MuonsFromCircle'" << endl; | ||
return 4; | ||
} | ||
|
||
Double_t rMean = 0; | ||
Double_t rMin = TMath::Infinity(); | ||
Double_t rMax = 0; | ||
for (Int_t n = 0; n < run.GetEntries(); n++) { | ||
run.GetEntry(n); | ||
Double_t x = event->GetPrimaryEventOrigin().X(); | ||
Double_t y = event->GetPrimaryEventOrigin().Y(); | ||
|
||
const auto r = TMath::Sqrt(x * x + y * y) / 100; // cm | ||
|
||
rMean += r / run.GetEntries(); | ||
if (r < rMin) { | ||
rMin = r; | ||
} | ||
if (r > rMax) { | ||
rMax = r; | ||
} | ||
} | ||
|
||
if (rMean < 0.8 || rMean > 1.2) { | ||
cout << "The average radius of the distribution is wrong!" << endl; | ||
cout << "R_mean (cm): " << rMean << endl; | ||
return 5; | ||
} | ||
|
||
if (rMin > 0.15) { | ||
cout << "The minimum radius of the distribution is wrong!" << endl; | ||
cout << "R_min (cm): " << rMin << endl; | ||
return 6; | ||
} | ||
|
||
if (rMax > 1.5 || rMax < 1.35) { | ||
cout << "The maximum radius of the distribution is wrong!" << endl; | ||
cout << "R_max (cm): " << rMax << endl; | ||
return 7; | ||
} | ||
|
||
cout << "Run entries: " << run.GetEntries() << endl; | ||
if (run.GetEntries() < 350 || run.GetEntries() > 450) { | ||
cout << "The number of entries is not between 350 and 450!" << endl; | ||
cout << "Number of entries : " << run.GetEntries() << endl; | ||
return 8; | ||
} | ||
|
||
cout << "All tests passed! [\033[32mOK\033[0m]\n"; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.