本文整理汇总了C++中Analysis::AddFile方法的典型用法代码示例。如果您正苦于以下问题:C++ Analysis::AddFile方法的具体用法?C++ Analysis::AddFile怎么用?C++ Analysis::AddFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analysis
的用法示例。
在下文中一共展示了Analysis::AddFile方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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());
}
示例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());
}
示例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());
}
示例5: merge
//--------------------------------------------------------------------------------------------------
void merge(const char *files,
const char *prefix="mergetest",
UInt_t nev=0)
{
using namespace mithep;
gDebugMask = Debug::kAnalysis;
gDebugLevel = 1;
OutputMod *omod = new OutputMod;
omod->SetFileName(prefix);
omod->Keep("*");
Analysis *ana = new Analysis;
ana->SetSuperModule(omod);
if (nev)
ana->SetProcessNEvents(nev);
ana->AddFile(files);
// run the analysis after successful initialisation
ana->Run(0);
}
示例6: 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());
}
示例7: 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;
}
示例8: 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());
}
示例9: 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;
}
示例10: runSCNtupler
//==================================================================================================
void runSCNtupler(
const char *file = "root://xrootd.cmsaf.mit.edu//store/user/paus/filefi/029/r12a-sel-j22-v1/00176847-0073-E211-9FFE-0030487DE7C5.root",
const char *output = "/scratch/klawhorn/test_scntuple.root",
Bool_t isData = kTRUE,
Int_t useGen = 0,
Int_t fsrmode = 0,
Int_t nevents = -1,
Bool_t skipHLTFail = kFALSE
)
{
gDebugMask = Debug::kAnalysis; // debug message category
gDebugLevel = 0xFFFFFFFF; // higher level allows more messages to print
// muon kinematics
const Double_t muPtMin = 0;
const Double_t muPtMax = 7000;
const Double_t muEtaMin = -3;
const Double_t muEtaMax = 3;
// electron kinematics
const Double_t eleEtMin = 9;
const Double_t eleEtMax = 7000;
const Double_t eleEtaMin = -3;
const Double_t eleEtaMax = 3;
// jet requirements
const Double_t jetPtMin = 10;
// SC requirements
const Double_t scEtMin = 9;
// good PV requirements
const UInt_t minNTracksFit = 0;
const Double_t minNdof = 4;
const Double_t maxAbsZ = 24;
const Double_t maxRho = 2;
//
// setup analysis object
//
Analysis *ana = new Analysis;
ana->SetUseHLT(kTRUE);
if(nevents>0)
ana->SetProcessNEvents(nevents);
ana->AddFile(file);
//
// setup ntupler module
//
SCNtuplerMod *mymod = new SCNtuplerMod;
mymod->SetOutputName(output); // output ntuple file name
mymod->SetIsData(isData); // toggle data specific or MC specific procedures
mymod->SetUseGen(useGen); // use generator info
mymod->SetSkipIfHLTFail(skipHLTFail); // skip to next event if no HLT accept
mymod->SetFSRMode(fsrmode);
mymod->SetMuPtMin(muPtMin);
mymod->SetMuPtMax(muPtMax);
mymod->SetMuEtaMin(muEtaMin);
mymod->SetMuEtaMax(muEtaMax);
mymod->SetEleEtMin(eleEtMin);
mymod->SetEleEtMax(eleEtMax);
mymod->SetEleEtaMin(eleEtaMin);
mymod->SetEleEtaMax(eleEtaMax);
mymod->SetJetPtMin(jetPtMin);
mymod->SetSCEtMin(scEtMin);
mymod->SetMinNTracksFit(minNTracksFit);
mymod->SetMinNdof(minNdof);
mymod->SetMaxAbsZ(maxAbsZ);
mymod->SetMaxRho(maxRho);
// Jet corrections
char* PATH = getenv("CMSSW_BASE"); assert(PATH);
TString path(TString::Format("%s/src/MitPhysics/data/", PATH));
mymod->AddJetCorr(path+"Summer13_V1_MC_L1FastJet_AK5PF.txt");
mymod->AddJetCorr(path+"Summer13_V1_MC_L2Relative_AK5PF.txt");
mymod->AddJetCorr(path+"Summer13_V1_MC_L3Absolute_AK5PF.txt");
if(isData) {
mymod->AddJetCorr(path+"Summer13_V1_DATA_L1FastJet_AK5PF.txt");
mymod->AddJetCorr(path+"Summer13_V1_DATA_L2Relative_AK5PF.txt");
mymod->AddJetCorr(path+"Summer13_V1_DATA_L3Absolute_AK5PF.txt");
mymod->AddJetCorr(path+"Summer13_V1_DATA_L2L3Residual_AK5PF.txt");
}
//
// SingleMu
//
mymod->AddTrigger("HLT_IsoMu24_eta2p1_v11", kHLT_IsoMu24_eta2p1, "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f40QL3crIsoFiltered10", kHLT_IsoMu24_eta2p1Obj);
mymod->AddTrigger("HLT_IsoMu24_eta2p1_v12", kHLT_IsoMu24_eta2p1, "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f40QL3crIsoFiltered10", kHLT_IsoMu24_eta2p1Obj);
mymod->AddTrigger("HLT_IsoMu24_eta2p1_v13", kHLT_IsoMu24_eta2p1, "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoRhoFiltered0p15", kHLT_IsoMu24_eta2p1Obj);
mymod->AddTrigger("HLT_IsoMu24_eta2p1_v14", kHLT_IsoMu24_eta2p1, "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoRhoFiltered0p15", kHLT_IsoMu24_eta2p1Obj);
mymod->AddTrigger("HLT_IsoMu24_eta2p1_v15", kHLT_IsoMu24_eta2p1, "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoRhoFiltered0p15", kHLT_IsoMu24_eta2p1Obj);
//
// SingleElectron
//
mymod->AddTrigger("HLT_Ele27_WP80_v8", kHLT_Ele27_WP80, "hltEle27WP80TrackIsoFilter", kHLT_Ele27_WP80Obj);
//.........这里部分代码省略.........
示例11: runHgg2012HCP
//.........这里部分代码省略.........
//jetCorr ->Add(photidpresel);
//photidpresel ->Add(phottreesingle);
//photidpreselinvert ->Add(phottreesingleinvert);
//elecIdS->Add(phottreeES);
//TFile::SetOpenTimeout(0);
//TFile::SetCacheFileDir("./rootfilecache",kTRUE,kTRUE);
TFile::SetReadaheadSize(128*1024*1024);
//------------------------------------------------------------------------------------------------
// setup analysis
//------------------------------------------------------------------------------------------------
Analysis *ana = new Analysis;
ana->SetUseHLT(kTRUE);
ana->SetKeepHierarchy(kTRUE);
ana->SetSuperModule(runLumiSel);
ana->SetPrintScale(100);
if (nEvents >= 0)
ana->SetProcessNEvents(nEvents);
if (TString(dataset).Contains("meridiani")) {
ana->SetUseHLT(kFALSE);
}
//------------------------------------------------------------------------------------------------
// organize input
//------------------------------------------------------------------------------------------------
Catalog *c = new Catalog(catalogDir);
TString skimdataset = TString(dataset)+TString("/") +TString(skim);
Dataset *d = NULL;
TString bookstr = book;
//if (TString(dataset).Contains("s11-h")) bookstr.ReplaceAll("local","t2mit");
// if (TString(skim).CompareTo("noskim") == 0)
// d = c->FindDataset(bookstr,dataset,fileset);
// else
// d = c->FindDataset(bookstr,skimdataset.Data(),fileset);
// ana->AddDataset(d);
std::vector<TString> synchFile;
// synchFile.push_back("26650E45-A902-E211-9523-001D09F29146.root");
// synchFile.push_back("FC4B4004-6502-E211-B532-BCAEC518FF8A.root");
// synchFile.push_back("063C9BE3-8F02-E211-9503-001D09F2424A.root");
// synchFile.push_back("10946F3E-4F02-E211-ACA8-5404A63886BB.root");
// synchFile.push_back("70EAB2D6-8F02-E211-AD24-001D09F29146.root");
// synchFile.push_back("50F136D5-8F02-E211-A7E1-001D09F25109.root");
// synchFile.push_back("ACF83417-6502-E211-8A06-002481E0D90C.root");
// synchFile.push_back("50F136D5-8F02-E211-A7E1-001D09F25109.root");
// synchFile.push_back("84D8683B-3702-E211-ACC8-BCAEC53296F3.root");
// synchFile.push_back("64CF7800-6802-E211-AE29-003048D374CA.root");
// synchFile.push_back("044DE8D2-8F02-E211-BEF1-00215AEDFD98.root");
// synchFile.push_back("6A50C106-6002-E211-A8FD-003048F118E0.root");
// synchFile.push_back("80DCA06C-5002-E211-B0FD-5404A6388692.root");
// synchFile.push_back("1600BC48-4F02-E211-B8FA-BCAEC518FF6B.root");
// synchFile.push_back("36E6F661-9002-E211-8ED4-001D09F253D4.root");
synchFile.push_back("28B1B2DB-AAF5-E111-8D01-E0CB4E4408E3.root");
synchFile.push_back("1EA891A9-77F8-E111-BD59-003048D2BB90.root");
synchFile.push_back("38E9A015-F1F8-E111-9654-001D09F28D4A.root");
synchFile.push_back("DC46A78E-60E0-E111-B65D-001D09F25479.root");
synchFile.push_back("B490A799-45DD-E111-A676-001D09F2AD4D.root");
synchFile.push_back("2E00B5D2-C9DD-E111-81B5-0025901D6268.root");
for( unsigned int iF = 0 ; iF<synchFile.size(); ++iF) {
ana->AddFile("root://xrootd.cmsaf.mit.edu//store/user/paus/filefi/029/r12c-dph-pr-v2/"+synchFile[iF]); ///scratch/fabstoec/root/DA2D6D6F-BB95-E111-9564-001A92971B7E.root");
//ana->AddFile("root://xrootd.cmsaf.mit.edu//store/user/paus/filefi/029/r12b-dph-j13-v1/"+synchFile[iF]); ///scratch/fabstoec/root/DA2D6D6F-BB95-E111-9564-001A92971B7E.root");
}
//------------------------------------------------------------------------------------------------
// 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);
//------------------------------------------------------------------------------------------------
// 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;
}
示例12: runHgll_2012_resync_mu
//.........这里部分代码省略.........
LeptonPairPhotonTreeWriter *eegtreeNoPhSmear = new LeptonPairPhotonTreeWriter;
eegtreeNoPhSmear ->SetInputPhotonsName(myPhIdNoSmear->GetOutputName());
eegtreeNoPhSmear ->SetPhotonsFromBranch( false );
eegtreeNoPhSmear ->SetGoodElectronsFromBranch( true );
eegtreeNoPhSmear ->SetIsData(isData);
eegtreeNoPhSmear ->SetGoodMuonsFromBranch( true );
eegtreeNoPhSmear ->SetYear(2012);
// eegtreeNoPhSmear ->SetDoDataEleEneCorr( true );
// eegtreeNoPhSmear ->SetDataEleEneCorr( 1., 1. );
// eegtreeNoPhSmear ->SetDoMCEleEneSmear( true );
// eegtreeNoPhSmear ->SetMCEleEneSmear( 0.016, 0.028 );
eegtreeNoPhSmear->SetTupleName("noPhSmearTree");
LeptonPairPhotonTreeWriter *eegtreeNoPhSmearNoEleSmear = new LeptonPairPhotonTreeWriter;
eegtreeNoPhSmearNoEleSmear ->SetInputPhotonsName(myPhIdNoSmear->GetOutputName());
eegtreeNoPhSmearNoEleSmear ->SetPhotonsFromBranch( false );
eegtreeNoPhSmearNoEleSmear ->SetGoodElectronsFromBranch( true );
eegtreeNoPhSmearNoEleSmear ->SetIsData(isData);
eegtreeNoPhSmearNoEleSmear ->SetGoodMuonsFromBranch( true );
eegtreeNoPhSmearNoEleSmear ->SetYear(2012);
eegtreeNoPhSmearNoEleSmear ->SetVerbose(true);
eegtreeNoPhSmearNoEleSmear ->SetDoElectronChannel(false);
// eegtreeNoPhSmearNoEleSmear ->SetDoDataEleEneCorr( true );
// eegtreeNoPhSmearNoEleSmear ->SetDataEleEneCorr( 1., 1. );
// eegtreeNoPhSmearNoEleSmear ->SetDoMCEleEneSmear( false );
// eegtreeNoPhSmearNoEleSmear ->SetMCEleEneSmear( 0.016, 0.028 );
eegtreeNoPhSmearNoEleSmear->SetTupleName("noPhSmearNoEleSmearTree");
//------------------------------------------------------------------------------------------------
// making analysis chain
//------------------------------------------------------------------------------------------------
// this is how it always starts
if (TString(dataset).Contains("-h")) {
runLumiSel ->Add(sysMod);
}
// high level trigger is always first
runLumiSel ->Add(hltModll);
hltModll ->Add(goodPVFilterMod);
// KH replace for sync
// goodPVFilterMod ->Add(photreg);
// photreg->Add(myPhId);
// photreg->Add(myPhIdNoSmear);
// goodPVFilterMod ->Add(myPhId);
goodPVFilterMod ->Add(myPhIdNoSmear);
// myPhId ->Add(eegtree);
// myPhId ->Add(eegtreeNoEleSmear);
// myPhIdNoSmear ->Add(eegtreeNoPhSmear);
myPhIdNoSmear ->Add(eegtreeNoPhSmearNoEleSmear);
//TFile::SetCacheFileDir("./rootfilecache",kTRUE,kTRUE);
TFile::SetReadaheadSize(128*1024*1024);
//------------------------------------------------------------------------------------------------
// 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(dataset).Contains("s11-h")) bookstr.ReplaceAll("local","t2mit");
if (TString(skim).CompareTo("noskim") == 0)
d = c->FindDataset(bookstr,dataset,fileset);
else
d = c->FindDataset(bookstr,skimdataset.Data(),fileset);
// ana->AddDataset(d);
string fname;
if( bookstr.Length() > 0 ) {
ifstream f(bookstr.Data());
while (f >> fname) {
if( !(strncmp( fname.c_str(), "#", 1 ) ) ) continue; // skip commented lines
cout << "adding inputfile : " << fname.c_str() << endl;
// entrymap[string(fname.c_str())] = unskimmedEntries(fname.c_str());
// cout << "unskimmed entries: " << entrymap[string(fname.c_str())] << endl;
// total_unskimmed += entrymap[string(fname.c_str())];
ana->AddFile(fname.c_str());
}
}