void sss_simple_muon_llh(int nevent=100, string outfile="simple-muon-llh-tree.root"){ gSystem->Setenv("ICETRAY_CLASSPATH","lib/mmc.jar"); gSystem->Load("libicetray.so"); gSystem->Load("libPhysics.so"); gSystem->Load("libdataclasses.so"); gSystem->Load("libphys-services.so"); gSystem->Load("libc2j-icetray.so"); gSystem->Load("libroot-icetray.so"); gSystem->Load("libexamples-offline.so"); gSystem->Load("libeventviewer.so"); gSystem->Load("libeventviewer-modules.so"); gSystem->Load("libmuon-llh-reco.so"); //gSystem->Load("libpretz-plotting-modules.so"); //gSystem->Load("libtriggerUtil-C++.so"); gSystem->Load("libsuper-simple-source.so"); gSystem->Load("libI3Db.so"); gSystem->Load("libsimple-muon.so"); gSystem->Load("libjvm.so"); gSystem->Load("libmmc-icetray.so"); gSystem->Load("libPSInterface.so"); gSystem->Load("libhit-constructor.so"); // //gSystem->Load("libnoise-generator.so"); // gSystem->Load("libromeo.so"); gSystem->Load("libromeo-amanda.so"); gSystem->Load("libromeo-interface.so"); gSystem->Load("libDOMsimulator.so"); gSystem->Load("libATWDChannelMerger.so"); gSystem->Load("libFeatureExtractor.so"); gSystem->Load("libdataio.so"); gSystem->Load("libdataio-modules.so"); gSystem->Load("libmonolith-reader.so"); //gSystem->Load("liblinefit.so"); //gSystem->Load("libanalog2hits.so"); //gSystem->Load("libcfirst.so"); //gSystem->Load("libcscd-llh.so"); gSystem->Load("libanalysis-tree.so"); gSystem->Load("libmyproject.so"); string workspace(getenv("I3_WORK")); string amageofile = workspace + "/I3Db/resources/I3Db/amanda.geo"; string icegeofile = workspace + "/I3Db/resources/I3Db/icecube.geo"; //RootI3Tray tray; I3Tray& tray = *(new RootI3Tray()); //tray.AddService("I3TRandomServiceFactory","random"); tray.AddService("I3SPRNGRandomServiceFactory","random"); tray.SetParameter("random","Seed",0); tray.SetParameter("random","NStreams",2); tray.SetParameter("random","StreamNum",1); tray.AddService("I3ParticleDataServiceFactory","particle_data"); tray.AddService("I3JavaVMFactory","java_vm"); tray.AddService("I3PSI_PhotonicsFactory","psi_photonics"); tray.AddService("I3DummyEventOriginFactory","eventfactory"); tray.SetParameter("eventfactory","GiveMCEvents",true); tray.SetParameter("eventfactory","EventsToReturn",nevent); tray.AddService("I3DummyDetectorStatusOriginFactory","statusfactory"); tray.AddService("I3DummyCalibOriginFactory","calibrationfactory"); tray.AddService("I3FileGeoOriginFactory","geomfactory"); tray.SetParameter("geomfactory","AmandaGeoFile",amageofile); tray.SetParameter("geomfactory","IceCubeGeoFile",icegeofile); tray.AddModule("I3UberSource","source"); tray.AddModule("I3MCRawDOMStatusFiller","statcalibfiller"); tray.AddModule("I3MCCalibrationFiller", "calibfiller"); tray.AddModule("I3CalibrateStatusModule", "calibratedstatus"); tray.AddModule("I3SimpleMuon", "simple"); ////// 16 paras tray.SetParameter("simple", "ZenithMin", 0.125*3.14159*I3Units::rad); tray.SetParameter("simple", "ZenithMax", 0.375*3.14159*I3Units::rad);//1-downgoing, 0-upgoing tray.SetParameter("simple", "AzimuthMin", 0.75*3.14159*I3Units::rad); tray.SetParameter("simple", "AzimuthMax", 1.25*3.14159*I3Units::rad); tray.SetParameter("simple", "StartX", 400.0*I3Units::m);//effective only if InjectRadius=0.0 tray.SetParameter("simple", "StartY", 0.0*I3Units::m);//effective only if InjectRadius=0.0 tray.SetParameter("simple", "StartZ", 400.0*I3Units::m);//if 1945 => surface of the earth tray.SetParameter("simple", "Length", 1500.0*I3Units::m);//effective only if mmc is NOT used tray.SetParameter("simple", "EnergyMin", 1000.*I3Units::GeV); tray.SetParameter("simple", "EnergyMax", 1000.*I3Units::GeV); tray.SetParameter("simple", "GammaIndex", 2.0);// f = E^-2 tray.SetParameter("simple", "InjectRadius", 10.0*I3Units::m); tray.SetParameter("simple", "NMuEvent", 1);//number of leptons injected per event tray.SetParameter("simple", "NEEvent", 0);//number of leptons injected per event tray.SetParameter("simple", "Year", 1859); tray.SetParameter("simple", "DaqTime", 0); ////// //tray.AddModule("I3PropagatorMMC","propagate"); //tray.SetParameter("propagate", "mode", 1); tray.AddModule("I3HitConstructor","hits"); // //tray.AddModule("I3NoiseGeneratorModule","noise"); //tray.SetParameter("noise","Rate",850.0); // tray.AddModule("I3RomeoInterfaceModule","romeo"); tray.SetParameter("romeo","VerboseLevel",4); tray.SetParameter("romeo","BinSize",1.e-9); tray.SetParameter("romeo","CEData","romeo/resources/scripts/TA0532.table"); tray.SetParameter("romeo","QEData","romeo/resources/scripts/qe_representative.data"); tray.SetParameter("romeo","GainTable","romeo/resources/scripts/TA0451_gain.table"); tray.SetParameter("romeo","PhotonPropMap_data","romeo/resources/scripts/QuickPhotonPropagatorMap.data"); tray.SetParameter("romeo","WavelengthAcceptance_data","romeo/resources/scripts/wavelength_acceptance.data"); tray.SetParameter("romeo","AngleAcceptance_data","romeo/resources/scripts/angle_acceptance.data"); // tray.AddModule("I3DOMsimulator","domsim"); tray.SetParameter("domsim","DataReadoutName","DOMLaunch");//this should be the same as ATWD Input // tray.AddModule("I3ATWDChannelMerger","merge"); tray.SetParameter("merge","InputReadoutName","DOMLaunch");//this should be the same as DOM readout // tray.AddModule("I3FeatureExtractor","recohits"); tray.SetParameter("recohits","DataReadoutName","DOMLaunch"); tray.SetParameter("recohits","MaxNumHits", 1); tray.SetParameter("recohits","InitialHitSeriesReco","InitialHitSeriesReco"); tray.SetParameter("recohits","FeatureExtractor","FeatureExtractor"); //////////////// tray.SetParameter("recohits","FastFirstPeak",0); tray.SetParameter("recohits","MinSPEWidth",2); tray.SetParameter("recohits","MaxSPEWidth",100); tray.SetParameter("recohits","ADCThreshold",1.0); tray.AddModule("I3SimpleSeed","seed"); tray.SetParameter("seed","ResultName","llhseed"); tray.SetParameter("seed","InputHitSeries","InitialHitSeriesReco"); tray.SetParameter("seed","SeedZenith", 0.25*3.14*I3Units::rad); tray.SetParameter("seed","SeedAzimuth", 1.0*3.14*I3Units::rad); tray.AddModule("I3TMinuitLLHModule","llhminuit"); tray.SetParameter("llhminuit","Active",true); tray.SetParameter("llhminuit","OutputResultName","minuitllh"); tray.SetParameter("llhminuit","StepSizeZenith",0.1); tray.SetParameter("llhminuit","StepSizeAzimuth",0.1); tray.SetParameter("llhminuit","StepSizeX",0.1); tray.SetParameter("llhminuit","StepSizeY",0.1); tray.SetParameter("llhminuit","StepSizeZ",0.1); tray.SetParameter("llhminuit","InputResponseKey","InitialHitSeriesReco"); tray.SetParameter("llhminuit","MinimizerUsed","migrad"); //tray.SetParameter("llhminuit","MinimizerUsed","simplex"); tray.SetParameter("llhminuit","EventTime",0.0*I3Units::ns); tray.SetParameter("llhminuit","LowerBoundZenith",-(3.14159/2)*I3Units::rad); tray.SetParameter("llhminuit","UpperBoundZenith",(3.14159/2)*I3Units::rad); tray.SetParameter("llhminuit","LowerBoundAzimuth",0.0*I3Units::rad); tray.SetParameter("llhminuit","UpperBoundAzimuth",6.283*I3Units::rad); //tray.SetParameter("llhminuit","LowerBoundX",-600.); //tray.SetParameter("llhminuit","UpperBoundX",600.); //tray.SetParameter("llhminuit","LowerBoundY",-600.); //tray.SetParameter("llhminuit","UpperBoundY",600.); //tray.SetParameter("llhminuit","LowerBoundY",-600.); //tray.SetParameter("llhminuit","UpperBoundY",600.); tray.SetParameter("llhminuit","ParamFixedAzimuth",false); tray.SetParameter("llhminuit","ParamFixedX",false); tray.SetParameter("llhminuit","ParamFixedY",false); tray.SetParameter("llhminuit","ParamFixedZ",false); tray.SetParameter("llhminuit","UseRecoPulses",false); tray.SetParameter("llhminuit","SeedKey","llhseed"); // //tray.SetParameter("llhminuit","SeedKey","SimpleMuonInIceTrack"); //tray.SetParameter("llhminuit","MCTrackSeed",true); // tray.SetParameter("llhminuit","MaxIterations", 2147483547); tray.SetParameter("llhminuit","NoiseLikelihood",8.e-7); /////// tray.AddModule("I3AnalysisTreeModule", "root_tree"); //string outfile="simple-muon-llh-tree100.root"; tray.SetParameter("root_tree", "RootFileName", outfile); tray.SetParameter("root_tree", "TreeName", "llh_tree"); tray.AddModule("MyMCTreeModule", "mytree"); //tray.AddModule("I3EventViewerModule","viewer"); ///////////////// tray.ConnectBoxes("source", "OutBox", "statcalibfiller"); tray.ConnectBoxes("statcalibfiller","OutBox","calibfiller"); tray.ConnectBoxes("calibfiller","OutBox","calibratedstatus"); tray.ConnectBoxes("calibratedstatus","OutBox","simple"); //tray.ConnectBoxes("simple", "OutBox", "propagate"); //tray.ConnectBoxes("propagate", "OutBox", "hits"); tray.ConnectBoxes("simple", "OutBox", "hits"); //tray.ConnectBoxes("hits","OutBox","noise"); //tray.ConnectBoxes("noise","OutBox","romeo"); tray.ConnectBoxes("hits","OutBox","romeo"); tray.ConnectBoxes("romeo","OutBox","domsim"); tray.ConnectBoxes("domsim", "OutBox", "merge"); tray.ConnectBoxes("merge", "OutBox", "recohits"); tray.ConnectBoxes("recohits", "OutBox", "seed"); tray.ConnectBoxes("seed", "OutBox", "llhminuit"); tray.ConnectBoxes("llhminuit", "OutBox", "root_tree"); tray.ConnectBoxes("root_tree", "OutBox", "mytree"); //tray.ConnectBoxes("llhminuit", "OutBox", "mytree"); //tray.ConnectBoxes("mytree", "OutBox", "viewer"); //tray.ConnectBoxes("llhminuit", "OutBox", "viewer"); tray.Execute(); tray.Finish(); }