-
-
Save TuringTW/ff5c38ee15efbd9accb75f2a7645d07a to your computer and use it in GitHub Desktop.
Sample program and config file for reported issue in the PROPOSAL
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
{ | |
"global": | |
{ | |
"seed" : 1, | |
"only_loss_inside_detector" : false, | |
"interpolation": | |
{ | |
"do_interpolation" : true, | |
"path_to_tables" : "../resources/tables", | |
"path_to_tables_readonly" : "../resources/tables_readonly", | |
"do_binary_tables" : false, | |
"just_use_readonly_path" : false, | |
"max_node_energy" : 1e14, | |
"nodes_cross_section" : 100, | |
"nodes_continous_randomization" : 200, | |
"nodes_propagate" : 1000 | |
}, | |
"exact_time" : true, | |
"stopping_decay" : false, | |
"scattering" : "NoScattering", | |
"brems_multiplier" : 1, | |
"photo_multiplier" : 1, | |
"ioniz_multiplier" : 1, | |
"epair_multiplier" : 1, | |
"ioniz": "IonizBetheBlochRossi", | |
"epair": "none", | |
"brems" : "none", | |
"photo" : "none", | |
"annihilation": "none", | |
"compton" : "none", | |
"photopair": "none", | |
"mupair": "none", | |
"weak": "none", | |
"lpm" : false, | |
"photo_hard_component" : true, | |
"photo_shadow" : "ShadowDuttaRenoSarcevicSeckel", | |
"cuts_infront": | |
{ | |
"e_cut": -1, | |
"v_cut": 0.01, | |
"cont_rand": true | |
}, | |
"cuts_inside": | |
{ | |
"e_cut": -1, | |
"v_cut": 0.01, | |
"cont_rand": true | |
}, | |
"cuts_behind": | |
{ | |
"e_cut": -1, | |
"v_cut": 0.01, | |
"cont_rand": true | |
}, | |
"medium": "StandardRock", | |
"geometry": | |
{ | |
"shape": "sphere", | |
"origin": [0, 0, 0], | |
"outer_radius": 2, | |
"inner_radius": 0 | |
} | |
}, | |
"sectors": [{ "medium": "StandardRock", | |
"geometry":{ | |
"shape": "sphere", | |
"origin": [0, 0, 0], | |
"inner_radius": 0, | |
"outer_radius": 1e20 | |
} | |
}], | |
"detector": | |
{ | |
"shape": "sphere", | |
"origin" : [0, 0, -1], | |
"outer_radius": 1, | |
"inner_radius": 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
#include "PROPOSAL/PROPOSAL.h" | |
#include <iostream> | |
int main(int argc, char **argv){ | |
ParticleDef::Builder builder = ParticleDef::Builder(); | |
builder.SetParticleDef(TauMinusDef::Get()); | |
ParticleDef tau_def = builder.build(); | |
Propagator prop(tau_def, "./resources/config.json"); | |
DynamicData tau(tau_def.particle_type); | |
double energy = 0; | |
for (int j = 20; j <= 90; j+=5) | |
{ | |
energy = pow(10., j/10.); //GeV | |
mu.SetEnergy(energy*1e3); //MeV | |
mu.SetPosition(Vector3D(0, 0, 0)); | |
mu.SetDirection(Vector3D(0, 0, 1)); | |
for (int i = 0; i < 1000000; i++) | |
{ | |
Secondaries sec = prop.Propagate(mu); | |
std::vector<DynamicData> data = sec.GetSecondaries(); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment