er  dev
draw.cxx
1 #if !defined(__CLING__)
2 
3 #include "TFile.h"
4 //#include "TTree.h"
5 #include "TChain.h"
6 #include "TCanvas.h"
7 
8 #include "~/ER/beamtime/data/ERBeamTimeEventHeader.h"
9 
10 
11 #include <iostream>
12 
13 using std::cout;
14 using std::endl;
15 
16 #endif
17 
18 void draw() {
19 
20  TString inFile = "he8_10_Left.reco.root";
21  TString inPath = "~/media/analysis_nas/exp201810/He8/reco/";
22 
23  TFile *fr = new TFile(inPath + inFile);
24  TTree *tr = (TTree*)fr->Get("er");
25 
26  /*TFile *frIn = new TFile("~/Acculinna/ExperRoot/macro/EXP1803/beamtime/he8_10_0010.Digi.root");
27  TTree *trIn = (TTree*)frIn->Get("er");
28  tr->AddFriend(trIn);*/
29 
30  TCanvas *c1 = new TCanvas("c1", "BEAM projections", 1500, 1000);
31  c1->Divide(1,1);
32  //BeamDetTrack
33  c1->cd(1);
34  tr->SetMarkerColor(kBlack);
35  //tr->Draw("fYt:fXt", "EventHeader.fTrigger==2 && BeamDetTrack.fYt>-2. && BeamDetTrack.fXt>-2.");
36  tr->Draw("fYt:fXt", " BeamDetTrack.fYt>-2. && BeamDetTrack.fXt>-2.","col");
37  tr->SetMarkerColor(kRed);
38  //tr->Draw("fYt:fXt", " (EventHeader.fTrigger==2 && (BeamDetTrack.fYt)^2 + (BeamDetTrack.fXt)^2 ) < 8.^2", "same");
39  c1->Update();
40 
41 }
42