//================================================================== // // mu_cand.C // // Version 0.0: P. Koehn 7/23/01 // //================================================================== { // Instantiate a StnAna object //---------------------------- //TStnAna x("/nosu1a/stntuple/nonsplit_muons/"); // If you specify only the directory, //TStnAna x("/cdf/home/pkoehn/rel3180int7/results/"); // If you specify only the directory, TStnAna x("/home/pkoehn/releases/401/results/stntuple_topevent_mu_test.root"); // If you specify only the directory, // files will be auto-magically chained // together. //================================ // Chain a set of files together //================================ //TChain* chain = new TChain("STNTUPLE"); // data //chain.Add("/nosu1a/stntuple/streamA/aphysr_119630_all_stnmaker.root"); //chain.Add("/nosu1a/stntuple/streamA/aphysr_119631_all_stnmaker.root"); //chain.Add("/nosu1a/stntuple/streamA/aphysr_119632_stnmaker.root"); //chain.Add("/nosu1a/stntuple/streamA/aphysr_119634_stnmaker.root"); //chain.Add("/nosu1a/stntuple/streamA/aphysr_119636_stnmaker.root"); //chain.Add("/nosu1a/stntuple/streamA/aphysr_119637_stnmaker.root"); //chain.Add("/nosu1a/stntuple/streamA/aphysr_119638_stnmaker.root"); // Monte Carlo //chain.Add("/nosu1a/stntuple/montecarlo/ttbar/ttbar_31802_stntuple.root"); //chain.Add("/nosu1a/stntuple/montecarlo/wjets/wjets_31802_stntuple.root"); //TStnAna x(chain); //================================ // Compile required code //----------------------- gSystem->CompileMacro("Geometry.cc","k"); gSystem->CompileMacro("TMuoCand.cc","k"); // Create pointer to a MuoCand object //---------------------------------------- cout << ">>> MuoCand object <<<" << endl; TMuoCand * Mc = new TMuoCand("MuoCand","MuoCand"); // Muon candidate selection //=========================== // Minimum Pt Cut Mc->setMuonPtCutEnable(false); Mc->setMuonPtCut(12.0); //20. // Maximum energy deposited in the Em Cal. Mc->setMuonEmCutEnable(true); Mc->setMuonEmCut(2.0); //2.0 // Maximum energy deposited in the Had Cal. Mc->setMuonHadCutEnable(true); Mc->setMuonHadCut(6.0); //6.0 // Minimum energy deposited in the Em + Had Cal. Mc->setMuonEmHadCutEnable(true); Mc->setMuonEmHadCut(0.1); //0.1 // Maximum | impact parameter | Mc->setMuonD0CutEnable(true); Mc->setMuonD0Cut(0.5); //0.03 - silicon cut // Maximum Event | Z | vertex Mc->setMuonZvCutEnable(true); Mc->setMuonZvCut(60.0); //60.0 // Maximum Cal Isolation in a cone of 0.4 Mc->setMuonIsoCutEnable(false); Mc->setMuonIsoCut(0.1); //0.10 // Maximum Track Isolation in a cone of 0.4 Mc->setMuonTIsoCutEnable(false); Mc->setMuonTIsoCut(0.1); //0.10 // Maximum cmu track-stub matching in r-phi Mc->setCmuDxCutEnable(true); Mc->setCmuDxCut(2.0); //2.0 // Maximum cmp track-stub matching in r-phi Mc->setCmpDxCutEnable(false); Mc->setCmpDxCut(5.0); //5.0 // Maximum cmx track-stub matching in r-phi Mc->setCmxDxCutEnable(false); Mc->setCmxDxCut(5.0); //5.0 // Minimum number of axial COT superlayers traversed Mc->setNaxslEnable(true); Mc->setNaxslCut(3); //3 // Minimum number of stereo COT superlayers traversed Mc->setNstslEnable(true); Mc->setNstslCut(2); //2 // Minimum total number of axial + stereo layers traversed Mc->setNtotslEnable(true); Mc->setNtotslCut(6); //6 Mc->setHistEnable(true); // save histos to a file ? Mc->setDisplayEnable(true); // display histos ? Mc->SetDebugLevel(1); // Setting level = 1 gives a ridiculously large, // but informative, print spew for muons. // Your module must be added to TStnAna object the for // events to be processed by your module. //----------------------------------------------------- x.AddModule(Mc); // This output module saves the events passing a filter to // a NEW Stntuple root file. //---------------------------------------------------------- //TStnOutputModule out("GoodMuonEvents.root"); //x.SetOutputModule(&out); // Run the StnAna job over the root files //---------------------------------------- x.Run(10); //make some histos at Endjob() Mc->printcuts(); // helpful print out of current cut settings }