当前位置: 首页>>代码示例>>C++>>正文


C++ Analysis::SetOutputName方法代码示例

本文整理汇总了C++中Analysis::SetOutputName方法的典型用法代码示例。如果您正苦于以下问题:C++ Analysis::SetOutputName方法的具体用法?C++ Analysis::SetOutputName怎么用?C++ Analysis::SetOutputName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Analysis的用法示例。


在下文中一共展示了Analysis::SetOutputName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: runWWAnalysisChain

void runWWAnalysisChain(TString inputfiles, TString outputfileName, TString PlotType, TString JetsName) {

  //Trigger
  HLTMod *hltmod = new HLTMod;
  hltmod->SetPrintTable(kFALSE);
//   hltmod->AddTrigger("HLT_IsoMu15");
//   hltmod->AddTrigger("HLT_IsoEle15_L1I");
  hltmod->AddTrigger("HLT_Mu5");
  hltmod->AddTrigger("HLT_Ele10_SW_L1R");
  hltmod->SetTrigObjsName("myhltobjs");

  //PreSelection
  HwwEvtPreSelMod *preSelectionMod = new HwwEvtPreSelMod;

  //Object ID and Cleaning Sequence;
  MuonIDMod *muonID = new MuonIDMod;  
  ElectronIDMod *electronID = new ElectronIDMod;
  JetIDMod *JetID = new JetIDMod; //default names are IC5
  JetID->SetJetName(JetsName); //for SC5 I have to set the names
  JetID->SetGoodJetsName(TString("GoodJets"));
  ElectronCleaningMod *electronCleaning = new ElectronCleaningMod;
  JetCleaningMod *JetCleaning = new JetCleaningMod; //default names are ok for IC5
  JetCleaning->SetGoodJetsName(TString("GoodJets"));
  JetCleaning->SetCleanJetsName(TString("CleanJets"));

  //Event Selection modules
  WWEvtSelMod *eventSelectionMod = new WWEvtSelMod;
  eventSelectionMod->SetLoadGenParticles(false);
  eventSelectionMod->SetCleanJetsName(TString("CleanJets"));
  eventSelectionMod->SetPlotType(PlotType);
  eventSelectionMod->SetPrintDebug(false);

  //chain modules together
  hltmod->Add(preSelectionMod);
  preSelectionMod->Add(muonID);
  muonID->Add(electronID);
  electronID->Add(JetID);
  JetID->Add(electronCleaning);
  electronCleaning->Add(JetCleaning);
  JetCleaning->Add(eventSelectionMod);

  // set up analysis
  Analysis *ana = new Analysis;
  //ana->SetUseHLT(false);
  ana->SetKeepHierarchy(kFALSE);
  ana->SetSuperModule(preSelectionMod);
  ana->AddFile(inputfiles);
  ana->SetOutputName(outputfileName.Data());
  // run the analysis after successful initialisation
  ana->Run(! gROOT->IsBatch());

  cout << "HLTMod: Accepted " << hltmod->GetNAccepted() 
       << " of " << hltmod->GetNEvents() << " events" << endl;

  return;

}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:57,代码来源:runWWSelection.C

示例2: runPixelTreeMaker

void runPixelTreeMaker(Bool_t doMC         = 0,
                       const char *files   = 0,
                       const char *outfile = 0,
                       UInt_t nev          = 0,
		       Float_t SDRelFrac   = 1.)
{
  gDebugMask  = Debug::kAnalysis;
  gDebugLevel = 1;
  gErrorIgnoreLevel = kInfo;

  // setup analysis object
  Analysis *ana = new Analysis;
  ana->SetUseHLT(1);
  if (nev>0)
    ana->SetProcessNEvents(nev);
  TString ofname(gSystem->Getenv("MIT_OUTPUTFILE"));
  if (!ofname.IsNull()) 
    ana->SetOutputName(ofname);

  if (files) {
    TString dummy(files);
    TString suffix(dummy(dummy.Length()-4,dummy.Length()));
    if (suffix.CompareTo("root")==0)
      ana->AddFile(files);
    else
      ana->AddFiles(files);
  }

  HLTMod *hmod = new HLTMod;
  hmod->SetPrintTable(1);
  ana->AddSuperModule(hmod);

  // setup modules
  PixelsMakerMod *mod = new PixelsMakerMod;
  mod->SetIsMC(doMC);
  mod->AddVertexName("Pixel3Vertexes");
  mod->AddVertexName("TrackletVertexes");
  mod->AddVertexName("ClusterVertexes");
  mod->AddVertexName("PixelVertexes");
  mod->AddVertexName("PrimaryVertexes");
  mod->AddVertexName("PrimaryVertexesBeamSpot");
  // - diffractive study -
  mod->SetUseHfOnly(true);
  mod->SetSDRelFrac(SDRelFrac);

  if (outfile)
    mod->SetFileName(Form("%s_SDRelFrac%.1f.root",outfile,SDRelFrac));
  else
    mod->SetFileName("pixeltree.root");

  ana->AddSuperModule(mod);
  
  // run the analysis after successful initialisation
  ana->Run(!gROOT->IsBatch());
}
开发者ID:CmsHI,项目名称:CVS_SavedFMa,代码行数:55,代码来源:runPixelTreeMaker.C

示例3: runMakeMuonFakeRate

//--------------------------------------------------------------------------------------------------
void runMakeMuonFakeRate()
{
  using namespace mithep;
  gDebugMask  = Debug::kAnalysis;
  gDebugLevel = 1;

  // set up the modules 
  ObjectCleaningMod *objectSelectionMod = new ObjectCleaningMod;
  MuonFakeRateAnalysisMod *eventSelectionMod = new MuonFakeRateAnalysisMod;
  objectSelectionMod->Add(eventSelectionMod);

  objectSelectionMod->SetGoodElectronsName(TString("GoodElectrons"));
  objectSelectionMod->SetGoodMuonsName(TString("GoodMuons"));
  objectSelectionMod->SetGoodCentralJetsName(TString("GoodCentralJets"));
  objectSelectionMod->SetGoodForwardJetsName(TString("GoodForwardJets"));
  objectSelectionMod->SetGoodMuonCorrectedMetName(TString("MuonCorrectedMet"));
  eventSelectionMod->SetGoodElectronsName(TString("GoodElectrons"));
  eventSelectionMod->SetGoodMuonsName(TString("GoodMuons"));
  eventSelectionMod->SetGoodCentralJetsName(TString("GoodCentralJets"));
  eventSelectionMod->SetGoodForwardJetsName(TString("GoodForwardJets"));
  eventSelectionMod->SetGoodMuonCorrectedMetName(TString("MuonCorrectedMet"));

  // set up analysis
  Analysis *ana = new Analysis;
  ana->SetSuperModule(objectSelectionMod);

  const char *catalogDir = "/home/mitprod/catalog";
  const char *book       = "mit/filler/001";
  const char *dataset    = "qcdem_pt_30_80-id6";

//  Catalog *c = new Catalog(catalogDir);
//  Dataset *d = c->FindDataset(book,dataset);
//  ana->AddDataset(d);

 

  TString slash      = "/";
  TString castorBase = "castor:/castor/cern.ch/user/s/sixie/";
  //TString localBase  = "/server/03b/paus";
  //TString files      = TString("OAKSamples/test/") + dataset + TString("_000_*.root");
  //ana->AddFile(castorBase + slash + files );

  //TString files      = TString("/server/02a/sixie/CMSSW_2_1_5/src/testProd/crab_0_080831_113313/res/") + dataset + TString("_000_*.root");
  TString files      = TString("/server/04d/sixie/OAKSamples/002/qcdem_pt_30_80-id6/") + dataset + TString("_000_*.root");

  ana->AddFile(files);
  ana->SetOutputName("mit-MuonFakeRate_QCD-hist.root");
  ana->SetProcessNevents(1000000);

  // run the analysis after successful initialisation
  ana->Run(! gROOT->IsBatch());
}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:53,代码来源:runMakeMuonFakeRate.C

示例4: runFullExample

//--------------------------------------------------------------------------------------------------
void runFullExample(const char *files = "mit-full_000.root")
{
  using namespace mithep;
  gDebugMask  = Debug::kAnalysis;
  gDebugLevel = 1;

  // set up the modules
  FullExampleMod *mod = new FullExampleMod;

  // set up analysis
  Analysis *ana = new Analysis;
  ana->SetUseHLT(false);
  ana->SetSuperModule(mod);
  ana->AddFile(files);
  ana->SetOutputName("mit-full-hist.root");

  // run the analysis after successful initialisation
  ana->Run(!gROOT->IsBatch());
}
开发者ID:cpausmit,项目名称:MitAna,代码行数:20,代码来源:runFullExample.C

示例5: runJetValidation

//--------------------------------------------------------------------------------------------------
void runJetValidation()
{
  using namespace mithep;
  gDebugMask  = Debug::kAnalysis;
  gDebugLevel = 1;

  // set up the modules 
  JetValidationMod *eventSelectionMod = new JetValidationMod;

  // set up analysis
  Analysis *ana = new Analysis;
  ana->SetSuperModule(eventSelectionMod);

  TString files      = TString("castor:/castor/cern.ch/user/s/sixie/OAKSamples/relval212QCDpt50_80-id6/*.root");

  ana->AddFile(files);
  ana->SetOutputName("mit-JetValidation-hist.root");
//  ana->SetProcessNevents(1000);

  // run the analysis after successful initialisation
  ana->Run(! gROOT->IsBatch());
}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:23,代码来源:runJetValidation.C

示例6: runHLTExample

//--------------------------------------------------------------------------------------------------
void runHLTExample(const char *trigger="HLT_Mu15_v1",
                   //const char *files = "XX-MITDATASET-XX_000.root",
                   const char *files = "/castor/cern.ch/user/p/paus/filefi/020/p11-h160ww2l-gf-v1g1-pu/342631BD-F250-E011-9C32-00A0D1EE8B54.root",
                   Int_t nEvs = 0)
{
  using namespace mithep;
  gDebugMask  = Debug::kAnalysis;
  gDebugLevel = 1;

  HLTMod *hltmod = new HLTMod;
  hltmod->SetPrintTable(kTRUE);
  hltmod->AddTrigger(trigger);
  hltmod->SetTrigObjsName("myhltobjs");

  HLTExampleMod *hltexmod = new HLTExampleMod;
  hltexmod->SetTrigObjsName("myhltobjs");
  hltmod->Add(hltexmod);
  
  // set up analysis
  Analysis *ana = new Analysis;
  if (0) {
    hltmod->SetBitsName("HLTBits");
    ana->SetHLTTreeName("HLT");
    ana->SetHLTObjsName("HLTObjects");
  }
  if (nEvs)
    ana->SetProcessNEvents(nEvs);
  ana->SetSuperModule(hltmod);
  ana->AddFile(files);
  if (gROOT->IsBatch())
    ana->SetOutputName("mit-hlt-hist.root");

  // run the analysis after successful initialisation
  ana->Run(!gROOT->IsBatch());

  cout << "HLTMod: Accepted " << hltmod->GetNAccepted() 
       << " of " << hltmod->GetNEvents() << " events" << endl;
}
开发者ID:cpausmit,项目名称:MitAna,代码行数:39,代码来源:runHLTExample.C

示例7: runSimpleExample

//--------------------------------------------------------------------------------------------------
void runSimpleExample(
   const char *files = "/home/edwenger/merge_BSC_Tuned_v1_Pythia_MinBias_D6T_900GeV_d20091210.root",
   Bool_t useHlt=1
  )
{
  using namespace mithep;
  gDebugMask  = Debug::kAnalysis;
  gDebugLevel = 1;

  SimpleExampleMod *smod = new SimpleExampleMod;
  smod->SetUseHfOnly(true);

  // set up analysis
  Analysis *ana = new Analysis;
  ana->SetSuperModule(smod);
  ana->AddFile(files);
  ana->SetUseHLT(useHlt);
  if (gROOT->IsBatch()) 
    ana->SetOutputName("mit-example-hist.root");
  
  // run the analysis after successful initialisation
  ana->Run(!gROOT->IsBatch());
}
开发者ID:CmsHI,项目名称:CVS_SavedFMa,代码行数:24,代码来源:runSimpleExample.C

示例8: runHLTAnalysis

void runHLTAnalysis(TString inputfiles, TString outputfileName) {

  //Trigger
  HLTMod *hltmod = new HLTMod;
  hltmod->SetPrintTable(kFALSE);
  hltmod->AddTrigger("HLT_IsoEle15_L1I");
  hltmod->AddTrigger("HLT_Ele15_SW_L1R");
  hltmod->AddTrigger("HLT_IsoEle15_LW_L1I");
  hltmod->AddTrigger("HLT_IsoEle18_L1R");
  hltmod->AddTrigger("HLT_Ele15_LW_L1R");
  hltmod->AddTrigger("HLT_LooseIsoEle15_LW_L1R");
  hltmod->AddTrigger("HLT_IsoMu15");
  hltmod->AddTrigger("HLT_Mu15");
  hltmod->SetTrigObjsName("myhltobjs");

  //PreSelection
  HwwEvtPreSelMod *preSelectionMod = new HwwEvtPreSelMod;

  //chain together
  preSelectionMod->Add(hltmod);

  // set up analysis
  Analysis *ana = new Analysis;  
  ana->SetKeepHierarchy(kFALSE);  
  ana->SetSuperModule(preSelectionMod);  
  ana->AddFile(inputfiles);
  ana->SetOutputName(outputfileName.Data());
  // run the analysis after successful initialisation
  ana->Run(! gROOT->IsBatch());  

  cout << "HLTMod: Accepted " << hltmod->GetNAccepted() 
       << " of " << hltmod->GetNEvents() << " events" << endl;

  return;

}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:36,代码来源:runWWSelection.C

示例9: executeComputeElectronFakeRateMod


//.........这里部分代码省略.........
  hltmod_Jet50->AddTrigger("HLT_Jet50");
  hltmod_Jet50->SetTrigObjsName("myhltobjs_Jet50");

  HLTMod *hltmod_Jet80 = new HLTMod;
  hltmod_Jet80->SetName("HLTMod_Jet80");
  hltmod_Jet80->SetPrintTable(kFALSE);
  hltmod_Jet80->AddTrigger("HLT_Jet80");
  hltmod_Jet80->SetTrigObjsName("myhltobjs_Jet80");

  HLTMod *hltmod_Jet110 = new HLTMod;
  hltmod_Jet110->SetName("HLTMod_Jet110");
  hltmod_Jet110->SetPrintTable(kFALSE);
  hltmod_Jet110->AddTrigger("HLT_Jet110");
  hltmod_Jet110->SetTrigObjsName("myhltobjs_Jet110");

  HLTMod *hltmod_Photon15 = new HLTMod;
  hltmod_Photon15->SetName("HLTMod_Photon15");
  hltmod_Photon15->SetPrintTable(kFALSE);
  hltmod_Photon15->AddTrigger("HLT_Photon15_L1R");
  hltmod_Photon15->SetTrigObjsName("myhltobjs_Photon15");

  HLTMod *hltmod_Photon25 = new HLTMod;
  hltmod_Photon25->SetName("HLTMod_Photon25");
  hltmod_Photon25->SetPrintTable(kFALSE);
  hltmod_Photon25->AddTrigger("HLT_Photon25_L1R");
  hltmod_Photon25->SetTrigObjsName("myhltobjs_Photon25");


  //------------------------------------------------------------------------------------------------
  // publisher Mod
  //------------------------------------------------------------------------------------------------
  PublisherMod<CaloJet,Jet> *pubJet = new PublisherMod<CaloJet,Jet>("JetPub");
  pubJet->SetInputName("SisCone5Jets");
  pubJet->SetOutputName("PubSisCone5Jets");

  PublisherMod<CaloMet,Met> *pubMet = new PublisherMod<CaloMet,Met>("MetPub");
  pubMet->SetInputName("SisCone5Met");
  pubMet->SetOutputName(ModNames::gkCleanCaloMetName);

  //------------------------------------------------------------------------------------------------
  // object id and cleaning sequence
  //------------------------------------------------------------------------------------------------
  MuonIDMod           *muonID           = new MuonIDMod;  
  muonID->SetIDType("Loose");
  muonID->SetIsoType("TrackCaloSliding"); 
  ElectronIDMod       *electronID       = new ElectronIDMod;
  electronID->SetIDType(TString("Tight"));
  electronID->SetIsoType(TString("TrackJuraSliding"));
  electronID->SetApplyConversionFilter(kTRUE);

  PhotonIDMod         *photonID       = new PhotonIDMod;
  photonID->SetIDType(TString("Custom"));
  photonID->SetIsoType(TString("CombinedIso"));
  photonID->SetPtMin(20.0);

  JetIDMod            *jetID            = new JetIDMod;
  jetID->SetInputName(pubJet->GetOutputName());
  jetID->SetUseCorrection(kTRUE);
  jetID->SetPtCut(35.0);

  ElectronCleaningMod *electronCleaning = new ElectronCleaningMod;
  PhotonCleaningMod   *photonCleaning   = new PhotonCleaningMod;
  JetCleaningMod      *jetCleaning      = new JetCleaningMod;

  MergeLeptonsMod *mergeLeptonsMod = new MergeLeptonsMod;
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:66,代码来源:runComputeElectronFakeRate.C

示例10: WWSelection


//.........这里部分代码省略.........
  // some global setups
  //------------------------------------------------------------------------------------------------
  using namespace mithep;
  gDebugMask  = Debug::kAnalysis;
  gDebugLevel = 3;

  //------------------------------------------------------------------------------------------------
  // generator information
  //------------------------------------------------------------------------------------------------
  GeneratorMod *GeneratorMod = new GeneratorMod;

  //------------------------------------------------------------------------------------------------
  // HLT information
  //------------------------------------------------------------------------------------------------
  HLTMod *hltmod = new HLTMod;
  hltmod->SetPrintTable(kTRUE);
  hltmod->AddTrigger("HLT_IsoEle15_L1I");
  hltmod->AddTrigger("HLT_Ele15_SW_L1R");
  hltmod->AddTrigger("HLT_IsoEle15_LW_L1I");
  hltmod->AddTrigger("HLT_IsoEle18_L1R");
  hltmod->AddTrigger("HLT_Ele15_LW_L1R");
  hltmod->AddTrigger("HLT_LooseIsoEle15_LW_L1R");
  hltmod->AddTrigger("HLT_IsoMu15");
  hltmod->AddTrigger("HLT_Mu15");
  hltmod->SetTrigObjsName("myhltobjs");

  //------------------------------------------------------------------------------------------------
  // object id and cleaning sequence
  //------------------------------------------------------------------------------------------------
  MuonIDMod           *muonID           = new MuonIDMod;  
  muonID->SetMuonIDType("Loose");
  muonID->SetMuonIsoType("TrackCaloSliding"); 
  ElectronIDMod       *electronID       = new ElectronIDMod;
  electronID->SetElectronIDType(TString("Tight"));
  electronID->SetElectronIsoType(TString("TrackJuraSliding"));
  JetIDMod            *JetID            = new JetIDMod;            
  JetID->SetJetBranchName(TString("SisCone5Jets"));                          //name of jet algorithm
  JetID->SetGoodJetsName(TString("GoodJets"));
  JetID->SetUseJetCorrection(true);
  JetID->SetJetEtCut(30.0);
  ElectronCleaningMod *electronCleaning = new ElectronCleaningMod;
  JetCleaningMod      *JetCleaning      = new JetCleaningMod;
  JetCleaning->SetGoodJetsName (TString("GoodJets"));
  JetCleaning->SetCleanJetsName(TString("CleanJets"));

  //------------------------------------------------------------------------------------------------
  // analyses modules
  //------------------------------------------------------------------------------------------------
  WWEvtSelMod *analysisMod = new WWEvtSelMod;
  analysisMod->SetLoadGenParticles(false);
  analysisMod->SetCleanJetsName(TString("CleanJets"));
  analysisMod->SetPrintDebug(false);

  //------------------------------------------------------------------------------------------------
  // making analysis chain
  //------------------------------------------------------------------------------------------------
  //GeneratorMod->Add(hltmod); hltmod->Add(muonID);
  GeneratorMod->Add(muonID);
  muonID->Add(electronID);
  electronID->Add(JetID);
  JetID->Add(electronCleaning);
  electronCleaning->Add(JetCleaning);
  JetCleaning->Add(analysisMod);
  //------------------------------------------------------------------------------------------------
  // setup analysis
  //------------------------------------------------------------------------------------------------
  Analysis *ana = new Analysis;
  ana->SetUseHLT(true);
  ana->SetKeepHierarchy(false);
  if (nEvents >= 0)
    ana->SetProcessNEvents(nEvents);
  ana->SetSuperModule(GeneratorMod);

  //------------------------------------------------------------------------------------------------
  // organize input
  //------------------------------------------------------------------------------------------------
  printf("\nRely on Catalog: %s\n",catalogDir);
  printf("  -> Book: %s  Dataset: %s  Fileset: %s <-\n\n",book,dataset,fileset);
  Catalog *c = new Catalog(catalogDir);
  Dataset *d = c->FindDataset(book,dataset,fileset);
  ana->AddDataset(d);

  //------------------------------------------------------------------------------------------------
  // organize output
  //------------------------------------------------------------------------------------------------
  TString rootFile = TString(outputName);
  rootFile += TString("_") + TString(dataset);
  if (TString(fileset) != TString(""))
    rootFile += TString("_") + TString(fileset);
  rootFile += TString(".root");
  printf("\nRoot output: %s\n\n",rootFile.Data());  
  ana->SetOutputName(rootFile.Data());

  //------------------------------------------------------------------------------------------------
  // run the analysis after successful initialisation
  //------------------------------------------------------------------------------------------------
  ana->Run(!gROOT->IsBatch());  

  return;
}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:101,代码来源:runWWSelection.C

示例11: runHgg2012HCP


//.........这里部分代码省略.........
  hltModP->AddTrigger("HLT_Photon26_R9Id85_OR_CaloId10_Iso50_Photon18_R9Id85_OR_CaloId10_Iso50_Mass70_v*",190000,999999); 
  hltModP->AddTrigger("HLT_Photon26_R9Id85_Photon18_CaloId10_Iso50_Mass60_v*",190000,999999); 
  hltModP->AddTrigger("HLT_Photon26_R9Id85_Photon18_R9Id85_Mass60_v*",190000,999999); 
  hltModP->AddTrigger("HLT_Photon36_CaloId10_Iso50_Photon22_CaloId10_Iso50_v*",190000,999999); 
  hltModP->AddTrigger("HLT_Photon36_CaloId10_Iso50_Photon22_R9Id85_v*",190000,999999); 
  hltModP->AddTrigger("HLT_Photon36_R9Id85_OR_CaloId10_Iso50_Photon22_R9Id85_OR_CaloId10_Iso50_v*",190000,999999); 
  hltModP->AddTrigger("HLT_Photon36_R9Id85_Photon22_CaloId10_Iso50_v*",190000,999999); 
  hltModP->AddTrigger("HLT_Photon36_R9Id85_Photon22_R9Id85_v*",190000,999999); 
    
  hltModP->SetTrigObjsName("MyHltPhotObjs");
  hltModP->SetAbortIfNotAccepted(isData);
  //------------------------------------------------------------------------------------------------
  // split pfcandidates to PFPU and PFnoPU
  //------------------------------------------------------------------------------------------------
  SeparatePileUpMod* SepPUMod = new SeparatePileUpMod;
  //  SepPUMod->SetUseAllVerteces(kFALSE);
  // SepPUMod->SetVertexName("OutVtxCiC");
  SepPUMod->SetPFNoPileUpName("pfnopileupcands");
  SepPUMod->SetPFPileUpName("pfpileupcands");
  SepPUMod->SetCheckClosestZVertex(kFALSE);
  
  //------------------------------------------------------------------------------------------------
  // select events with a good primary vertex
  //------------------------------------------------------------------------------------------------
  GoodPVFilterMod *goodPVFilterMod = new GoodPVFilterMod;
  goodPVFilterMod->SetMinVertexNTracks(0);
  goodPVFilterMod->SetMinNDof         (4.0);
  goodPVFilterMod->SetMaxAbsZ         (24.0);
  goodPVFilterMod->SetMaxRho          (2.0);
  goodPVFilterMod->SetAbortIfNotAccepted(kFALSE);
  goodPVFilterMod->SetIsMC(!isData);

  GoodPVFilterMod *goodPVFilterModE = new GoodPVFilterMod("GoodPVFilterModE");
  goodPVFilterModE->SetOutputName("GoodVertexesE");
  goodPVFilterModE->SetMinVertexNTracks(0);
  goodPVFilterModE->SetMinNDof         (4.0);
  goodPVFilterModE->SetMaxAbsZ         (24.0);
  goodPVFilterModE->SetMaxRho          (2.0);  
  goodPVFilterModE->SetIsMC(!isData);
  
  GoodPVFilterMod *goodPVFilterModES = new GoodPVFilterMod("GoodPVFilterModES");
  goodPVFilterModES->SetOutputName("GoodVertexesES");
  goodPVFilterModES->SetMinVertexNTracks(0);
  goodPVFilterModES->SetMinNDof         (4.0);
  goodPVFilterModES->SetMaxAbsZ         (24.0);
  goodPVFilterModES->SetMaxRho          (2.0);    
  

  //------------------------------------------------------------------------------------------------
  // object id and cleaning sequence
  //------------------------------------------------------------------------------------------------
  //-----------------------------------
  // Lepton Selection 
  //-----------------------------------
  ElectronIDMod* eleIdMod = new ElectronIDMod;
  eleIdMod -> SetPtMin(20);  
  eleIdMod -> SetEtaMax(2.5);
  eleIdMod -> SetApplyEcalFiducial(true);
  eleIdMod -> SetIDType("Hgg_LeptonTag_2012IdHCP");  
  eleIdMod -> SetElectronMVAWeightsSubdet0Pt10To20(TString((getenv("CMSSW_BASE")+string("/src/MitPhysics/data/ElectronMVAWeights/Electrons_BDTG_NonTrigV0_Cat1.weights.xml"))));
  eleIdMod -> SetElectronMVAWeightsSubdet1Pt10To20(TString((getenv("CMSSW_BASE")+string("/src/MitPhysics/data/ElectronMVAWeights/Electrons_BDTG_NonTrigV0_Cat2.weights.xml"))));  
  eleIdMod -> SetElectronMVAWeightsSubdet2Pt10To20(TString((getenv("CMSSW_BASE")+string("/src/MitPhysics/data/ElectronMVAWeights/Electrons_BDTG_NonTrigV0_Cat3.weights.xml"))));  
  eleIdMod -> SetElectronMVAWeightsSubdet0Pt20ToInf(TString((getenv("CMSSW_BASE")+string("/src/MitPhysics/data/ElectronMVAWeights/Electrons_BDTG_NonTrigV0_Cat4.weights.xml")))); 
  eleIdMod -> SetElectronMVAWeightsSubdet1Pt20ToInf(TString((getenv("CMSSW_BASE")+string("/src/MitPhysics/data/ElectronMVAWeights/Electrons_BDTG_NonTrigV0_Cat5.weights.xml")))); 
  eleIdMod -> SetElectronMVAWeightsSubdet2Pt20ToInf(TString((getenv("CMSSW_BASE")+string("/src/MitPhysics/data/ElectronMVAWeights/Electrons_BDTG_NonTrigV0_Cat6.weights.xml")))); 
  eleIdMod -> SetWhichVertex(-1);
开发者ID:janveverka,项目名称:UserCode_MitHgg_macros,代码行数:67,代码来源:runHgg2012HCP.C

示例12: getCatalogDir

//--------------------------------------------------------------------------------------------------
void runBavantiBoostedV_Synch
                       (const char *fileset    = "0000",
                        const char *skim       = "noskim",
                        //const char *dataset    = "s12-ttj-sl-v1-v7c",     
                        const char *dataset    = "GJets_HT-400ToInf_8TeV-madgraph+Summer12_DR53X-PU_S10_START53_V7A-v1+AODSIM",                        
                        const char *book       = "t2mit/filefi/032",
                        const char *catalogDir = "/home/cmsprod/catalog",
                        const char *outputName = "boostedv",
                        int         nEvents    = 10)
{
  //------------------------------------------------------------------------------------------------
  // some parameters get passed through the environment
  //------------------------------------------------------------------------------------------------
  TString cataDir  = getCatalogDir(catalogDir);
  TString mitData  = Utils::GetEnv("MIT_DATA");
  TString json     = Utils::GetEnv("MIT_PROD_JSON");
  TString jsonFile = getJsonFile("/home/cmsprod/cms/json");
  Bool_t  isData   = (json.CompareTo("~") != 0);
  // only for synchrionization purposes
  isData = kFALSE;
  printf("\n Initialization worked. Data?: %d\n\n",isData);

  //------------------------------------------------------------------------------------------------
  // some global setups
  //------------------------------------------------------------------------------------------------
  // debugging config
  using namespace mithep;
  gDebugMask  = (Debug::EDebugMask) (Debug::kGeneral | Debug::kTreeIO);
  gDebugLevel = 3;


  // Caching and how
  Int_t local = 1, cacher = 1;

  // local =   0 - as is,
  //           1 - /mt/hadoop  (MIT:SmartCache - preload one-by-one)
  //           2 - /mnt/hadoop (MIT:SmartCache - preload complete fileset)
  //           3 - ./          (xrdcp          - preload one-by-one)
  // cacher =  0 - no file by file caching
  //           1 - file by file caching on

  //------------------------------------------------------------------------------------------------
  // set up information for master module
  //------------------------------------------------------------------------------------------------
  RunLumiSelectionMod *runLumiSel = new RunLumiSelectionMod;
  runLumiSel->SetAcceptMC(kTRUE);                          // Monte Carlo events are always accepted
  
  // only select on run- and lumisection numbers when valid json file present
  if (json.CompareTo("~") != 0 && json.CompareTo("-") != 0) {
    printf(" runBoostedV() - adding jsonFile: %s\n",jsonFile.Data());
    runLumiSel->AddJSONFile(jsonFile.Data());
  }
  if (json.CompareTo("-") == 0) {
    printf("\n WARNING -- Looking at data without JSON file: always accept.\n\n");
    runLumiSel->SetAbortIfNotAccepted(kFALSE);   // accept all events if there is no valid JSON file
  }
  printf("\n Run lumi worked. \n\n");

  //------------------------------------------------------------------------------------------------
  // setup analysis
  //------------------------------------------------------------------------------------------------
  Analysis *ana = new Analysis;
  ana->SetUseCacher(cacher);
  ana->SetUseHLT(kTRUE);
  ana->SetKeepHierarchy(kTRUE);
  ana->SetSuperModule(runLumiSel);
  ana->SetPrintScale(100);
  if (nEvents >= 0)
    ana->SetProcessNEvents(nEvents);

  //------------------------------------------------------------------------------------------------
  // organize input
  //------------------------------------------------------------------------------------------------
  Catalog *c = new Catalog(cataDir.Data());
  TString skimdataset = TString(dataset)+TString("/") +TString(skim);
  Dataset *d = NULL;
  TString bookstr = book;
  if (TString(skim).CompareTo("noskim") == 0)
    d = c->FindDataset(bookstr,dataset,fileset,local);
  else 
    d = c->FindDataset(bookstr,skimdataset.Data(),fileset,local);
  ana->AddDataset(d);
  
  //------------------------------------------------------------------------------------------------
  // organize output
  //------------------------------------------------------------------------------------------------
  TString rootFile = TString(outputName);
  rootFile += TString("_") + TString(dataset) + TString("_") + TString(skim);
  if (TString(fileset) != TString(""))
    rootFile += TString("_") + TString(fileset);
  TString ntupleFile = rootFile + TString("_ntuple");
  rootFile += TString(".root");
  ana->SetOutputName(rootFile.Data());
  ana->SetCacheSize(0);

  //------------------------------------------------------------------------------------------------
  // HLT information
  //------------------------------------------------------------------------------------------------
  HLTMod *hltModP = new HLTMod("HLTModP");
//.........这里部分代码省略.........
开发者ID:yiiyama,项目名称:MitMonoJet,代码行数:101,代码来源:runBavantiBoostedV_Synch.C

示例13: executeComputeElectronFakeRateMod


//.........这里部分代码省略.........
  //------------------------------------------------------------------------------------------------
  GeneratorMod *generatorMod = new GeneratorMod;
  generatorMod->SetFillHist(kTRUE);

  //------------------------------------------------------------------------------------------------
  // HLT information
  //------------------------------------------------------------------------------------------------
  HLTMod *hltmod = new HLTMod;
  hltmod->SetPrintTable(kTRUE);
  hltmod->AddTrigger("HLT_IsoEle15_L1I");
  hltmod->AddTrigger("HLT_Ele15_SW_L1R");
  hltmod->AddTrigger("HLT_IsoEle15_LW_L1I");
  hltmod->AddTrigger("HLT_IsoEle18_L1R");
  hltmod->AddTrigger("HLT_Ele15_LW_L1R");
  hltmod->AddTrigger("HLT_LooseIsoEle15_LW_L1R");
  hltmod->AddTrigger("HLT_IsoMu15");
  hltmod->AddTrigger("HLT_Mu15");
  hltmod->SetTrigObjsName("myhltobjs");

  //------------------------------------------------------------------------------------------------
  // object id and cleaning sequence
  //------------------------------------------------------------------------------------------------
  MuonIDMod           *muonID           = new MuonIDMod;  
  muonID->SetIDType("Loose");
  muonID->SetIsoType("TrackCaloSliding"); 
  ElectronIDMod       *electronID       = new ElectronIDMod;
  electronID->SetIDType(TString("Tight"));
  electronID->SetIsoType(TString("TrackJuraSliding"));
  PhotonIDMod         *photonID       = new PhotonIDMod;
  photonID->SetIDType(TString("Tight"));
  photonID->SetPtMin(20.0);
  JetIDMod            *jetID            = new JetIDMod;
  jetID->SetInputName(TString("SisCone5Jets"));
  jetID->SetUseCorrection(kTRUE);
  jetID->SetPtCut(35.0);
  ElectronCleaningMod *electronCleaning = new ElectronCleaningMod;
  PhotonCleaningMod   *photonCleaning   = new PhotonCleaningMod;
  JetCleaningMod      *jetCleaning      = new JetCleaningMod;

  //------------------------------------------------------------------------------------------------
  // merge modules
  //------------------------------------------------------------------------------------------------
  //MergeLeptonsMod *mergeLeptonsMod = new MergeLeptonsMod;

  //------------------------------------------------------------------------------------------------
  // analyses modules
  //------------------------------------------------------------------------------------------------
  JetChargeCorrelationStudyMod *analysisMod = new JetChargeCorrelationStudyMod;
  analysisMod->SetVetoGeneratorLeptons(kTRUE);
  //------------------------------------------------------------------------------------------------
  // making analysis chain
  //------------------------------------------------------------------------------------------------
  hltmod->Add(muonID);
  generatorMod->Add(muonID);
  muonID->Add(electronID);
  electronID->Add(photonID);
  photonID->Add(jetID);
  jetID->Add(electronCleaning);
  electronCleaning->Add(photonCleaning);
  photonCleaning->Add(jetCleaning);
  jetCleaning->Add(analysisMod);

  //------------------------------------------------------------------------------------------------
  // setup analysis
  //------------------------------------------------------------------------------------------------
  Analysis *ana = new Analysis;
  ana->SetUseHLT(kFALSE);
  ana->SetKeepHierarchy(kTRUE);
  if (nEvents >= 0)
    ana->SetProcessNEvents(nEvents);
  //ana->SetSuperModule(muonID);
  ana->SetSuperModule(generatorMod);

  //------------------------------------------------------------------------------------------------
  // organize input
  //------------------------------------------------------------------------------------------------
  printf("\nRely on Catalog: %s\n",catalogDir);
  printf("  -> Book: %s  Dataset: %s  Fileset: %s <-\n\n",book,dataset,fileset);
  Catalog *c = new Catalog(catalogDir);
  Dataset *d = c->FindDataset(book,dataset,fileset);
  ana->AddDataset(d);

  //------------------------------------------------------------------------------------------------
  // organize output
  //------------------------------------------------------------------------------------------------
  TString rootFile = TString(outputName);
  rootFile += TString("_") + TString(dataset);
  if (TString(fileset) != TString(""))
    rootFile += TString("_") + TString(fileset);
  rootFile += TString(".root");
  printf("\nRoot output: %s\n\n",rootFile.Data());  
  ana->SetOutputName(rootFile.Data());

  //------------------------------------------------------------------------------------------------
  // run the analysis after successful initialisation
  //------------------------------------------------------------------------------------------------
  ana->Run(!gROOT->IsBatch());  

  return;
}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:101,代码来源:runJetChargeCorrelationStudy.C

示例14: runFlatMonoJet


//.........这里部分代码省略.........
  //------------------------------------------------------------------------------------------------
  GoodPVFilterMod *goodPVFilterMod = new GoodPVFilterMod;
  goodPVFilterMod->SetMinVertexNTracks(0);
  goodPVFilterMod->SetMinNDof         (4.0);
  goodPVFilterMod->SetMaxAbsZ         (24.0);
  goodPVFilterMod->SetMaxRho          (2.0);
  goodPVFilterMod->SetIsMC(!isData);
  goodPVFilterMod->SetVertexesName("PrimaryVertexes");

  //------------------------------------------------------------------------------------------------
  // object id and cleaning sequence
  //------------------------------------------------------------------------------------------------
  //-----------------------------------
  // Lepton Selection
  //-----------------------------------
  ElectronIDMod* eleIdMod = new ElectronIDMod;
  eleIdMod->SetPtMin(10.);
  eleIdMod->SetEtaMax(2.5);
  eleIdMod->SetApplyEcalFiducial(kTRUE);
  eleIdMod->SetIDType("CustomLoose");
  eleIdMod->SetIsoType("PFIso_HggLeptonTag2012HCP");
  eleIdMod->SetPFNoPileUpName("pfnopileupcands");
  eleIdMod->SetApplyConversionFilterType1(kTRUE);
  eleIdMod->SetApplyConversionFilterType2(kFALSE);
  eleIdMod->SetChargeFilter(kFALSE);
  eleIdMod->SetApplyD0Cut(kTRUE);
  eleIdMod->SetApplyDZCut(kTRUE);
  eleIdMod->SetWhichVertex(0);
  eleIdMod->SetNExpectedHitsInnerCut(0);
  eleIdMod->SetGoodElectronsName("GoodElectronsBS");
  eleIdMod->SetRhoType(RhoUtilities::CMS_RHO_RHOKT6PFJETS);

  MuonIDMod *muonIdWW = new MuonIDMod;
  muonIdWW->SetOutputName("HWWMuons");
  muonIdWW->SetIntRadius(0.0);
  muonIdWW->SetClassType("GlobalTracker");
  muonIdWW->SetIDType("WWMuIdV4");
  muonIdWW->SetIsoType("IsoRingsV0_BDTG_Iso");
  muonIdWW->SetApplyD0Cut(kTRUE);
  muonIdWW->SetApplyDZCut(kTRUE);
  muonIdWW->SetWhichVertex(0);
  muonIdWW->SetRhoType(RhoUtilities::CMS_RHO_RHOKT6PFJETS);
  muonIdWW->SetPtMin(10.);
  muonIdWW->SetEtaCut(2.4);

  MuonIDMod *muonIdPOG = new MuonIDMod;
  muonIdPOG->SetOutputName("POGMuons");
  muonIdPOG->SetClassType("GlobalTracker");
  muonIdPOG->SetIDType("NoId");
  muonIdPOG->SetApplyD0Cut(true);
  muonIdPOG->SetD0Cut(0.2);
  muonIdPOG->SetApplyDZCut(true);
  muonIdPOG->SetDZCut(0.5);
  //muonIdPOG->SetIsoType("PFIsoBetaPUCorrected");
  //muonIdPOG->SetPFNoPileUpName("pfnopileupcands");
  //muonIdPOG->SetPFPileUpName("pfpileupcands");
  muonIdPOG->SetIsoType("NoIso");
  muonIdPOG->SetPtMin(10.);
  muonIdPOG->SetEtaCut(2.4);

  MuonIDMod* muonIdIso = new MuonIDMod;
  muonIdIso->SetOutputName("IsolatedPOGMuons");
  muonIdIso->SetClassType("GlobalorTracker");
  muonIdIso->SetIDType("NoId");
  muonIdIso->SetApplyD0Cut(true);
  muonIdIso->SetD0Cut(0.2);
开发者ID:zdemirag,项目名称:MitMonoJet,代码行数:67,代码来源:runFlatMonoJet.C

示例15: runH2gSkim


//.........这里部分代码省略.........
  mcselmod->AddAbsPdgId(24);
  mcselmod->AddAbsPdgId(25);


  SkimMod<MCParticle> *skimMod = 0;
  if (! isData) {
    skimMod = new SkimMod<MCParticle>;
    skimMod->SetBranchName("MCParticles");
  }

  OutputMod *outMod = new OutputMod;
  outMod->Keep("*");
  outMod->Drop("CaloTowers");
  outMod->Drop("MCParticles");
  outMod->Drop("*Jets*");
  outMod->Keep("AKT5GenJets");
  outMod->Keep("AKt5PFJets");

  if (! isData)
    outMod->AddNewBranch("SkmMCParticles");


  TString skmRootFile = TString(outputName);
  skmRootFile += TString("_") + TString(dataset) + TString("_") + TString(skim);
  if (TString(fileset) != TString(""))
    skmRootFile += TString("_") + TString(fileset);
  outMod->SetFileName(skmRootFile);
  outMod->SetPathName(".");


  //------------------------------------------------------------------------------------------------
  // making analysis chain
  //------------------------------------------------------------------------------------------------
  // this is how it always starts
  runLumiSel      ->Add(twophotonsel);

  if (isData) { 
    twophotonsel  ->Add(outMod);
  }
  else {
    twophotonsel  ->Add(mcselmod);
    mcselmod      ->Add(skimMod);
    skimMod       ->Add(outMod);  
  }
  
  //------------------------------------------------------------------------------------------------
  // setup analysis
  //------------------------------------------------------------------------------------------------
  Analysis *ana = new Analysis;
  ana->SetUseHLT       (kTRUE);
  ana->SetKeepHierarchy(kTRUE);
  ana->SetSuperModule  (runLumiSel);
  ana->SetPrintScale   (100);
  if (nEvents >= 0)
    ana->SetProcessNEvents(nEvents);

  //------------------------------------------------------------------------------------------------
  // organize input
  //------------------------------------------------------------------------------------------------
  Catalog *c = new Catalog(catalogDir);
  TString skimdataset = TString(dataset)+TString("/") +TString(skim);
  Dataset *d = NULL;
  TString bookstr = book;
  if (TString(skim).CompareTo("noskim") == 0)
    d = c->FindDataset(bookstr,dataset,fileset);
  else 
    d = c->FindDataset(bookstr,skimdataset.Data(),fileset);
  ana->AddDataset(d);
  
  //------------------------------------------------------------------------------------------------
  // organize output
  //------------------------------------------------------------------------------------------------
  TString rootFile = TString(outputName);
  rootFile += TString("_") + TString(dataset) + TString("_") + TString(skim);
  if (TString(fileset) != TString(""))
    rootFile += TString("_") + TString(fileset);
  rootFile += TString(".root");
  //ana->SetOutputName(rootFile.Data());
  //ana->SetCacheSize(64*1024*1024);
  //ana->SetCacheSize(0);

  ana->SetOutputName("test.root");
  
  //------------------------------------------------------------------------------------------------
  // Say what we are doing
  //------------------------------------------------------------------------------------------------
  printf("\n==== PARAMETER SUMMARY FOR THIS JOB ====\n");
  printf("\n JSON file: %s\n  and overlap cut: %f (%s)\n",jsonFile.Data(),overlapCut,overlap);
  printf("\n Rely on Catalog: %s\n",catalogDir);
  printf("  -> Book: %s  Dataset: %s  Skim: %s  Fileset: %s <-\n",book,dataset,skim,fileset);
  printf("\n Root output: %s\n\n",rootFile.Data());  
  printf("\n========================================\n");

  //------------------------------------------------------------------------------------------------
  // run the analysis after successful initialisation
  //------------------------------------------------------------------------------------------------
  ana->Run(!gROOT->IsBatch());

  return;
}
开发者ID:bendavid,项目名称:MitPhysics,代码行数:101,代码来源:runH2gSkim.C


注:本文中的Analysis::SetOutputName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。