12 #include "Riostream.h"
53 string seed[10] = {
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"};
54 string type[2] = {
"3pion",
"SM"};
56 filename =
"./data/JetSummary_p250_e20_1000events_r05.csv";
57 myfile.open(filename.c_str());
60 for(
int a = 0;
a<10;
a++){
61 for(
int b=0;
b<2;
b++){
63 const std::string inFile =
"LeptoAna_p250_e20_1000events_"+seed[
a]+
"seed_"+type[
b]+
"_r05.root";
64 const std::string inDirectory =
"/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/";
67 TFile *
f = TFile::Open(inputFile.c_str());
68 TTree *
t = (TTree*)f->Get(
"event");
70 const int Nevent = t->GetEntries();
73 vector<float> * tracks_rmax;
74 vector<float> * tracks_count;
75 vector<float> * tracks_chargesum;
76 vector<float> * tracks_vertex;
77 vector<float> * jetshape_radius;
78 vector<float> * jetshape_econe_1;
79 vector<float> * jetshape_econe_2;
80 vector<float> * jetshape_econe_5;
81 vector<float> * jet_eta;
82 vector<float> * jet_minv;
83 vector<float> * jet_etotal;
84 vector<float> * jet_ptrans;
85 vector<int> * evtgen_pid;
88 t->SetBranchAddress(
"tracks_rmax_R",&tracks_rmax);
89 t->SetBranchAddress(
"tracks_count_R",&tracks_count);
90 t->SetBranchAddress(
"tracks_chargesum_R",&tracks_chargesum);
91 t->SetBranchAddress(
"tracks_vertex",&tracks_vertex);
92 t->SetBranchAddress(
"jetshape_radius",&jetshape_radius);
93 t->SetBranchAddress(
"jetshape_econe_r01",&jetshape_econe_1);
94 t->SetBranchAddress(
"jetshape_econe_r02",&jetshape_econe_2);
95 t->SetBranchAddress(
"jetshape_econe_r05",&jetshape_econe_5);
96 t->SetBranchAddress(
"jet_eta",&jet_eta);
97 t->SetBranchAddress(
"jet_minv",&jet_minv);
98 t->SetBranchAddress(
"jet_etotal",&jet_etotal);
99 t->SetBranchAddress(
"evtgen_pid",&evtgen_pid);
100 t->SetBranchAddress(
"jet_ptrans",&jet_ptrans);
109 for(
int l=0; l < tracks_rmax->size(); l++){
112 double rmax = (*tracks_rmax)[l];
113 int count = (*tracks_count)[l];
114 int chargesum = (*tracks_chargesum)[l];
115 double vertex = (*tracks_vertex)[l];
116 double radius = (*jetshape_radius)[l];
117 double econe_1 = (*jetshape_econe_1)[l];
118 double econe_2 = (*jetshape_econe_2)[l];
119 double econe_5 = (*jetshape_econe_5)[l];
120 double eta = (*jet_eta)[l];
121 double minv = (*jet_minv)[l];
122 double etotal = (*jet_etotal)[l];
123 double ptrans = (*jet_ptrans)[l];
124 int pid = (*evtgen_pid)[l];
126 if(ptrans < 5)
continue;
129 if(
b == 0 && pid == 15 && vertex == vertex) myfile << count <<
"," << chargesum <<
"," << eta <<
"," << vertex <<
"," <<
"tau" << endl;
132 if(
b != 0 && pid != 15 && pid != 11 && vertex == vertex) myfile << count <<
"," << chargesum <<
"," << eta <<
"," << vertex <<
"," <<
"DIS" << endl;