00001 void merge_configure(JobC& jc, JobCPath& path, int seed, int runn)
00002 {
00003
00004 ReleaseType::Release_t official_rel = ReleaseType::kDogwood |
00005 ReleaseType::kGarlic |
00006 ReleaseType::k00;
00007
00008 TString alt_rel = gSystem->Getenv("ENV_GEVPERMIP_SET");
00009 if(alt_rel != ""){
00010
00011 choose_gevpermip_release(alt_rel.Data());
00012 }else{
00013
00014 choose_gevpermip_release(official_rel);
00015 }
00016
00017
00018 path.SetAllFilters(0);
00019
00020
00021 JobCModule& photon = path.Mod("PhotonTransport");
00022
00023
00024
00025 double gpm = get_gevpermip(Detector::kNear);
00026 photon.Set(TString::Format("GeVPerMip=%lf", gpm));
00027
00028
00029
00030
00031 photon.Set("FDNoiseRate=3762138");
00032
00033 photon.Set("UseSimpleNoiseModel=0");
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 JobCModule& mcmerge = path.Mod("MCMerge");
00045
00046 mcmerge.Set(TString::Format("RandomSeed=%d", seed));
00047 mcmerge.Set(TString::Format("Runn=%d", runn));
00048
00049
00050 JobCEnv& env=JobCEnv::Instance();
00051
00052
00053
00054 const TString det_file = env.GetFileName(0);
00055 cout << "Adding file " << det_file << " to \"detector\" path" << endl;
00056 jc.Input.AddFile(det_file,"det");
00057 jc.Input.DefineStream("det","SimSnarl");
00058
00059 jc.Input.SetSequenceMode("det",Per::kSequential);
00060 jc.Input.SetPushRandom("det",true);
00061 jc.Input.SetMeanMom("det",18.64);
00062 jc.Input.SetMaxFileRepeat("det", 0);
00063
00064
00065
00066 const TString rock_file = env.GetFileName(1);
00067 cout << "Adding file " << rock_file << " to \"rock\" path" << endl;
00068 jc.Input.AddFile(rock_file,"rock");
00069 jc.Input.DefineStream("rock","SimSnarl");
00070
00071 jc.Input.SetSequenceMode("rock",Per::kRandom);
00072 jc.Input.SetPushRandom("rock",true);
00073 jc.Input.SetMeanMom("rock",21.15);
00074 jc.Input.SetMaxFileRepeat("rock", 10);
00075
00076
00077
00078
00079 if(env.GetNfile() > 2){
00080 const TString sig_file = env.GetFileName(2);
00081 cout << "Adding file " << sig_file << " to special \"signal\" path" << endl;
00082 jc.Input.AddFile(sig_file,"signal");
00083 jc.Input.DefineStream("signal","SimSnarl");
00084
00085
00086
00087 jc.Input.SetSequenceMode("signal",Per::kSequential);
00088 jc.Input.SetPushRandom("signal",true);
00089 jc.Input.SetMeanMom("signal",18.64);
00090 jc.Input.SetMaxFileRepeat("signal", 0);
00091 }
00092 }