Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:25

0001 void drawEdm(){
0002   
0003   gStyle->SetOptStat("nemruo");
0004 
0005   TChain *ev = new TChain("Events");
0006   ev->Add("rfio:/castor/cern.ch/user/e/edwenger/MBSkimHIRECO_900GeV_2k_v3.root");  
0007 
0008 
0009   // vertices
0010   ev->SetAlias("hivtx","recoVertexs_hiSelectedVertex__HIRECOSKIM.obj");
0011   ev->SetAlias("ppvtx","recoVertexs_offlinePrimaryVertices__RECO.obj");
0012 
0013   // tracks
0014   ev->SetAlias("pptrk","recoTracks_generalTracks__RECO.obj");
0015   ev->SetAlias("hitrk","recoTracks_hiSelectedTracks__HIRECOSKIM.obj");  
0016   
0017   // jets
0018   ev->SetAlias("ppjet","recoCaloJets_iterativeCone5CaloJets__RECO.obj");
0019   ev->SetAlias("hijet","recoCaloJets_iterativeConePu5CaloJets__HIRECOSKIM.obj");
0020 
0021   // number of high purity tracks
0022   ev->SetAlias("nHPtracks","Sum$( (pptrk.qualityMask() & (1<<2) ) > 0 )");
0023 
0024 
0025   // draw example
0026   TCanvas *c1 = new TCanvas("c1","c1",600,500);
0027   ev->Draw("hivtx[0].z()-ppvtx[0].z()>>hvtx(100,-1,1)","!ppvtx.isFake()","goff");
0028   hvtx->SetTitle("hiSelectedVertex - offlinePrimaryVertices; z-vtx residual [cm]");
0029   hvtx->Draw();
0030   gPad->SetLogy();
0031 
0032 
0033   // scan example
0034   ev->Scan("ppjet.pt():hijet.pt():ppjet.eta():hijet.eta():ppjet.phi():hijet.phi()","hijet.pt()>7");
0035 
0036 }