void simple_cfirst_cscdllh_sub(int nevt =3, double seed=0.0, string outfile= "test.root"){ gSystem->Setenv("ICETRAY_CLASSPATH","lib/mmc.jar"); const bool eventViewer = true; 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("libMinuit.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("libanalysis-tree.so"); gSystem->Load("libmuon-llh-reco.so"); gSystem->Load("libanalog2hits.so"); gSystem->Load("libcfirst.so"); gSystem->Load("libcscd-llh.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",seed); 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",nevt); 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", 0.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", 1000.0*I3Units::m);//effective only if mmc is NOT used tray.SetParameter("simple", "EnergyMin", 110.*I3Units::GeV); tray.SetParameter("simple", "EnergyMax", 2000.*I3Units::GeV); tray.SetParameter("simple", "GammaIndex", 2.0);// f = E^-2 tray.SetParameter("simple", "InjectRadius", 100.0*I3Units::m); tray.SetParameter("simple", "NMuEvent", 0);//number of leptons injected per event tray.SetParameter("simple", "NEEvent", 1);//number of leptons injected per event tray.SetParameter("simple", "Year", 2005); tray.SetParameter("simple", "DaqTime", 1000); //tray.AddModule("I3PropagatorMMC","propagate"); //tray.SetParameter("propagate", "mode", 1); //tray.AddModule("I3PrintingModuleToy","print"); //tray.AddModule("I3EventViewerModule","viewer"); 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"); // tray.AddModule("I3FeatureExtractor","recohits"); tray.SetParameter("recohits","DataReadoutName","DOMLaunch"); tray.SetParameter("recohits","MaxNumHits", 1); tray.SetParameter("recohits","InitialHitSeriesReco","FEHits"); tray.SetParameter("recohits","FeatureExtractor","FeatureExtractor"); //////////////// /***************************************************************************/ /* cfirst parameters */ /***************************************************************************/ tray.AddModule("I3CFirstModule", "cfirst"); tray.SetParameter("cfirst", "RecoHitSeries", "FEHits"); tray.SetParameter("cfirst", "InputSelector", ""); tray.SetParameter("cfirst", "FirstLE", true); tray.SetParameter("cfirst", "MinHits", 10); tray.SetParameter("cfirst", "AmpWeightPower", 1.0); tray.SetParameter("cfirst", "TriggerHits", 4); tray.SetParameter("cfirst", "DirectHitRadius", 100.0); tray.SetParameter("cfirst", "SmallClusterRadius", 30.0); tray.SetParameter("cfirst", "LargeClusterRadius", 60.0); tray.SetParameter("cfirst", "TriggerWindow", 200.0); tray.SetParameter("cfirst", "EarlyHitStart", -1500.0); tray.SetParameter("cfirst", "EarlyHitStop", -200.0); tray.SetParameter("cfirst", "MonteCarloTruth", false); tray.SetParameter("cfirst", "ResultName", "CFirst"); tray.SetParameter("cfirst", "McTruthName", "McTruth"); /***************************************************************************/ /* cscd-llh parameters */ /***************************************************************************/ tray.AddModule("I3CscdLlhModule", "cscd-llh"); tray.SetParameter("cscd-llh", "RecoHitSeries", "FEHits"); tray.SetParameter("cscd-llh", "InputSelector", ""); tray.SetParameter("cscd-llh", "FirstLE", true); tray.SetParameter("cscd-llh", "SeedWithOrigin", false); tray.SetParameter("cscd-llh", "SeedKey", "CFirst"); tray.SetParameter("cscd-llh", "MinHits", 10); tray.SetParameter("cscd-llh", "AmpWeightPower", 0.0); tray.SetParameter("cscd-llh", "ProductPdfWeight1", 1.0); tray.SetParameter("cscd-llh", "ProductPdfWeight2", 1.0); tray.SetParameter("cscd-llh", "MinuitVerbosityLevel", -1); tray.SetParameter("cscd-llh", "MinuitPrintWarnings", false); tray.SetParameter("cscd-llh", "MinuitStrategy", 2); tray.SetParameter("cscd-llh", "CalculateGradient", false); tray.SetParameter("cscd-llh", "MinAlgorithm", "MIGRAD"); tray.SetParameter("cscd-llh", "MaxCalls", 5000); tray.SetParameter("cscd-llh", "Tolerance", 0.01); tray.SetParameter("cscd-llh", "Hesse", false); tray.SetParameter("cscd-llh", "Minos", false); tray.SetParameter("cscd-llh", "Improve", false); tray.SetParameter("cscd-llh", "ResultName", "CscdLlh"); // Step size (SS), lower limit (LL), upper limit (UL), and "fix parameter" for the vertex parameters. // The string format is "SS, LL, UL, fix". // Setting LowerLimit = UpperLimit = 0 sets no limits. // Setting limits is not recommended, unless they are absolutely necessary. tray.SetParameter("cscd-llh", "ParamT", "1.0, 0.0, 0.0, false"); tray.SetParameter("cscd-llh", "ParamX", "0.5, 0.0, 0.0, false"); tray.SetParameter("cscd-llh", "ParamY", "0.5, 0.0, 0.0, false"); tray.SetParameter("cscd-llh", "ParamZ", "0.5, 0.0, 0.0, false"); tray.SetParameter("cscd-llh", "ParamTheta", "0.05, 0.0, 0.0, true"); tray.SetParameter("cscd-llh", "ParamPhi", "0.05, 0.0, 0.0, true"); tray.SetParameter("cscd-llh", "ParamEnergy", "10.0, 90.0, 1500.0, false"); tray.SetParameter("cscd-llh", "EnergySeed", 300.0); tray.SetParameter("cscd-llh", "PDF", "ProductPdf"); tray.SetParameter("cscd-llh", "PdfComponent1", "UPandelMpe"); tray.SetParameter("cscd-llh", "PandelZero", 1.0e-10); tray.SetParameter("cscd-llh", "PandelTau", 557.0); tray.SetParameter("cscd-llh", "PandelLambda", 33.3); tray.SetParameter("cscd-llh", "PandelLambdaA", 98.0); tray.SetParameter("cscd-llh", "PandelSigma", 15.0); tray.SetParameter("cscd-llh", "PdfComponent2", "HitNoHitMpe"); tray.SetParameter("cscd-llh", "HitNoHitNorm", 0.8); tray.SetParameter("cscd-llh", "HitNoHitLambdaAttn", 29.0); tray.SetParameter("cscd-llh", "HitNoHitNoise", 1.0e-4); tray.SetParameter("cscd-llh", "HitNoHitDistCutoff", 20.0); tray.SetParameter("cscd-llh", "HitNoHitZero", 1.0e-15); tray.AddModule("I3AnalysisTreeModule", "root_tree"); tray.SetParameter("root_tree", "RootFileName", outfile); tray.SetParameter("root_tree", "TreeName", "tree"); tray.AddModule("MyMCTreeModule", "mytree"); if (eventViewer) { 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("romeo","OutBox","domsim"); tray.ConnectBoxes("domsim", "OutBox", "merge"); tray.ConnectBoxes("merge", "OutBox", "recohits"); //tray.ConnectBoxes("recohits", "OutBox", "viewer"); tray.ConnectBoxes("recohits", "OutBox", "cfirst"); //tray.ConnectBoxes("cfirst", "OutBox", "root_tree"); tray.ConnectBoxes("cfirst", "OutBox", "cscd-llh"); tray.ConnectBoxes("cscd-llh", "OutBox", "root_tree"); tray.ConnectBoxes("root_tree", "OutBox", "mytree"); if (eventViewer) { tray.ConnectBoxes("root_tree", "OutBox", "viewer"); } //tray.ConnectBoxes("recohits", "OutBox", "print"); //tray.ConnectBoxes("root_tree", "OutBox", "viewer"); tray.Execute(); tray.Finish(); }