Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:00

0001 
0002 void rootlogon() {
0003   gROOT->SetStyle("Plain");
0004   gStyle->SetPalette(1);
0005   gSystem->Load("libPhysics");
0006   gSystem->Load("libEG");
0007   gStyle->SetHistMinimumZero(kTRUE);
0008 }
0009 
0010 void loadFWLite() {
0011   gSystem->Load("libFWCoreFWLite.so");
0012   FWLiteEnabler::enable();
0013 }
0014 
0015 TTree* getEventsrootlogon() {
0016   TTree* events = 0;
0017   gDirectory->GetObject("Events", events);
0018   return events;
0019 }
0020 
0021 void initAOD(const char* process) {
0022 
0023   string verticesAod = "recoVertexs_offlinePrimaryVertices__"; 
0024   verticesAod += process;
0025 
0026   string pfCandidatesAod = "recoPFCandidates_particleFlow__"; 
0027   pfCandidatesAod += process;
0028 
0029   string ic5GenJetsAod = "recoGenJets_iterativeCone5GenJets__";  
0030   ic5GenJetsAod += process;
0031 
0032   string pfJetsAod = "recoPFJets_iterativeCone5PFJets__";  
0033   pfJetsAod += process;
0034 
0035   TTree* Events = getEventsrootlogon();
0036   Events->SetAlias("verticesAod", verticesAod.c_str()); 
0037   Events->SetAlias("pfCandidatesAod",  pfCandidatesAod.c_str());
0038   Events->SetAlias("ic5GenJetsAod",  ic5GenJetsAod.c_str());
0039   Events->SetAlias("pfJetsAod",  pfJetsAod.c_str());
0040 
0041 }
0042 
0043 void initPF2PAT(const char* process) {
0044 
0045 
0046   string met = "recoMETs_pfMET__"; met += process;
0047   string pu = "recoPileUpPFCandidates_pfPileUp__";  pu+= process;
0048   string jetsin = "recoPFJets_pfJets__"; jetsin += process;
0049   string jetsout = "recoPFJets_pfNoTau__"; jetsout += process;
0050   string taus = "recoPFTaus_allLayer0Taus__"; taus += process;
0051   string muons = "recoPFCandidates_pfIsolatedMuons__"; muons += process;
0052   string electrons = "recoPFCandidates_pfIsolatedElectrons__"; electrons += process;
0053   string pfcandout = "recoPFCandidates_pfNoJet__"; pfcandout += process;  
0054   string noPileUp = "recoPFCandidates_pfNoPileUp__"; noPileUp += process;  
0055 
0056 
0057   string genMetTrue = "recoGenMETs_genMetTrue__";
0058   genMetTrue += process;
0059   string decaysFromZs = "recoGenParticles_decaysFromZs__";
0060   decaysFromZs += process;
0061 
0062   TTree* Events = getEventsrootlogon();
0063   Events->SetAlias("met", met.c_str() );
0064   Events->SetAlias("pileUp", pu.c_str() );
0065   Events->SetAlias("jetsAll", jetsin.c_str() );
0066   Events->SetAlias("jets", jetsout.c_str() );
0067   Events->SetAlias("taus", taus.c_str());
0068   Events->SetAlias("muons", muons.c_str());
0069   Events->SetAlias("electrons", electrons.c_str());
0070   Events->SetAlias("pfCandOut", pfcandout.c_str());
0071   Events->SetAlias("noPileUp", noPileUp.c_str());
0072 
0073   Events->SetAlias("genmet",  genMetTrue.c_str());
0074   Events->SetAlias("decaysFromZs",  decaysFromZs.c_str());
0075 }
0076 
0077 
0078 void initPAT(const char* process) {
0079   string taus = "patTaus_selectedPatTausPFlow__"; taus += process;
0080   string jets = "patJets_selectedPatJetsPFlow__"; jets += process;
0081   string met = "patMETs_patMETsPFlow__";  met+= process;
0082   string mus = "patMuons_selectedPatMuonsPFlow__"; mus += process;
0083   string eles = "patElectrons_selectedPatElectronsPFlow__"; eles += process;
0084   
0085   string patCaloJets = "patJets_selectedPatJets__"; patCaloJets += process;
0086 
0087   TTree* Events = getEventsrootlogon();
0088   Events->SetAlias("patTaus", taus.c_str() );
0089   Events->SetAlias("patJets", jets.c_str() );
0090   Events->SetAlias("patCaloJets", patCaloJets.c_str() );
0091   Events->SetAlias("patMet", met.c_str() );
0092   Events->SetAlias("patMuons", mus.c_str() );
0093   Events->SetAlias("patElectrons", eles.c_str() );
0094 }
0095