Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

merge_configure.h

Go to the documentation of this file.
00001 void merge_configure(JobC& jc, JobCPath& path, int seed, int runn)
00002 {
00003   // expect all file to be processed by this
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     // user externally chose an alternative, so be it..
00011     choose_gevpermip_release(alt_rel.Data());
00012   }else{
00013     // go with the official choice
00014     choose_gevpermip_release(official_rel);
00015   }
00016 
00017 
00018   path.SetAllFilters(0);
00019 
00020   // explicitly set the value of GeVPerMip
00021   JobCModule& photon = path.Mod("PhotonTransport");
00022 
00023   // If we ever want to use this for FD then we'll need to check everywhere
00024   // that assumes we're using ND.
00025   double gpm = get_gevpermip(Detector::kNear);
00026   photon.Set(TString::Format("GeVPerMip=%lf", gpm));
00027 
00028 
00029   // Defaults in photon transport as of 24/1/08
00030   // Total noise rate per second in the whole detector
00031   photon.Set("FDNoiseRate=3762138");
00032   // Set non-zero to use the old cedar FD noise model
00033   photon.Set("UseSimpleNoiseModel=0");
00034 
00035   /*
00036   if(det == Detector::kFar){
00037     JobCModule& detsim = path.Mod("DetSim");
00038     photon.Set("FibreVelocityFudge=1.02");
00039     detsim.Set("vaTimingWidth=0.12");
00040   }
00041   */
00042 
00043 
00044   JobCModule& mcmerge = path.Mod("MCMerge");
00045   // Set the RNG seed (0 selects current time in sec)
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   // Configure detector path
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); // value used in carrot processing
00062   jc.Input.SetMaxFileRepeat("det", 0);
00063 
00064 
00065   // Configure rock path
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); // value used in carrot processing
00074   jc.Input.SetMaxFileRepeat("rock", 10); // reuse each input rock file 10x
00075 
00076 
00077   // If a third file is specified on the command line, it's a special
00078   // signal file: put it in the signal path
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     // TODO: What are these supposed to actually be? I just copied them
00086     // from the "det" stream...
00087     jc.Input.SetSequenceMode("signal",Per::kSequential);
00088     jc.Input.SetPushRandom("signal",true);
00089     jc.Input.SetMeanMom("signal",18.64); // value used in carrot processing
00090     jc.Input.SetMaxFileRepeat("signal", 0);
00091   }
00092 }

Generated on Mon Feb 15 11:06:58 2010 for loon by  doxygen 1.3.9.1