#include <GnumiTree.h>
Public Member Functions | |
| void | SetTree (TTree &tree) |
| void | paint_flux (TH2D *hist, double npot, double zloc=1039.8e2) |
Public Attributes | |
| int | run |
| int | evtno |
| float | ndxdz |
| float | ndydz |
| float | npz |
| float | nenergy |
| float | ndxdznea |
| float | ndydznea |
| float | nenergyn |
| float | nwtnear |
| float | ndxdzfar |
| float | ndydzfar |
| float | nenergyf |
| float | nwtfar |
| int | norig |
| int | ndecay |
| int | ntype |
| float | vx |
| float | vy |
| float | vz |
| float | pdpx |
| float | pdpy |
| float | pdpz |
| float | ppdxdz |
| float | ppdydz |
| float | pppz |
| float | ppenergy |
| int | ppmedium |
| int | ptype |
| float | ppvx |
| float | ppvy |
| float | ppvz |
| float | muparpx |
| float | muparpy |
| float | muparpz |
| float | mupare |
| float | necm |
| float | nimpwt |
| float | xpoint |
| float | ypoint |
| float | zpoint |
| float | tvx |
| float | tvy |
| float | tvz |
| float | tpx |
| float | tpy |
| float | tpz |
| int | tptype |
Private Attributes | |
| TTree * | tree |
|
||||||||||||||||
|
Definition at line 67 of file GnumiTree.cxx. References muparpz, ndxdz, ndydz, nimpwt, pdpz, reweight_neutrino(), tree, and vz. 00068 {
00069 int nbinsx = hist->GetNbinsX();
00070 int nbinsy = hist->GetNbinsY();
00071
00072 double xmin = hist->GetXaxis()->GetXmin();
00073 double xmax = hist->GetXaxis()->GetXmax();
00074
00075 double ymin = hist->GetYaxis()->GetXmin();
00076 double ymax = hist->GetYaxis()->GetXmax();
00077
00078 double xstep = (xmax-xmin)/nbinsx;
00079 double ystep = (ymax-ymin)/nbinsy;
00080
00081 int nentries = tree->GetEntries();
00082
00083 cerr << nentries << " entries " <<
00084 " x:(" << xmin << " -> " << xmax << " += " << xstep << ")"
00085 " y:(" << ymin << " -> " << ymax << " += " << ystep << ")"
00086 << endl;
00087
00088 for (int ind = 0; ind<nentries; ++ind) {
00089 tree->GetEntry(ind);
00090
00091 if (ind%10000 == 1) cerr << " " << ind << ", ";
00092
00093 int neutrino_type = ntype;
00094
00095 if (neutrino_type != 56) {
00096 //cerr << "Got " << neutrino_type << " not 56\n";
00097 continue;
00098 }
00099
00100 double vertex[3] =
00101 { vx, vy, vz };
00102 double neutrino_momentum[3] =
00103 { ndxdz*npz, ndydz*npz, npz };
00104 double parent_momentum[3] =
00105 { pdpx, pdpy, pdpz };
00106 double muparent_momentum[3] =
00107 { muparpx, muparpy, muparpz };
00108
00109 double standard_weight = nimpwt/3.14159;
00110 int parent_type = ptype;
00111 // Paint the different reweights
00112 for (double x = xmin; x<xmax; x+=xstep) {
00113 for (double y = ymin; y<ymax; y+=ystep) {
00114 double det_pos[] = { x, y, zloc } ;
00115 double eneu, weight;
00116 reweight_neutrino(det_pos,
00117 vertex,
00118 neutrino_type,
00119 neutrino_momentum,
00120 parent_type,
00121 parent_momentum,
00122 muparent_momentum,
00123 eneu, weight);
00124 hist->Fill(x,y,standard_weight*weight/npot);
00125 }
00126 }
00127 }
00128 }
|
|
|
Definition at line 11 of file GnumiTree.cxx. References evtno, mupare, muparpx, muparpy, muparpz, ndecay, ndxdz, ndxdzfar, ndxdznea, ndydz, ndydzfar, ndydznea, necm, nenergy, nenergyf, nenergyn, nimpwt, norig, npz, ntype, nwtfar, nwtnear, pdpx, pdpy, pdpz, ppdxdz, ppdydz, ppenergy, ppmedium, pppz, ppvx, ppvy, ppvz, ptype, run, tptype, tpx, tpy, tpz, tree, tvx, tvy, tvz, vx, vy, vz, xpoint, ypoint, and zpoint. 00012 {
00013 // Got 'a do it this way because all trees are at top level...
00014 the_tree.SetBranchAddress("run",&run);
00015 the_tree.SetBranchAddress("evtno",&evtno);
00016 the_tree.SetBranchAddress("ndxdz",&ndxdz);
00017 the_tree.SetBranchAddress("ndydz",&ndydz);
00018 the_tree.SetBranchAddress("npz",&npz);
00019 the_tree.SetBranchAddress("nenergy",&nenergy);
00020 the_tree.SetBranchAddress("ndxdznea",&ndxdznea);
00021 the_tree.SetBranchAddress("ndydznea",&ndydznea);
00022 the_tree.SetBranchAddress("nenergyn",&nenergyn);
00023 the_tree.SetBranchAddress("nwtnear",&nwtnear);
00024 the_tree.SetBranchAddress("ndxdzfar",&ndxdzfar);
00025 the_tree.SetBranchAddress("ndydzfar",&ndydzfar);
00026 the_tree.SetBranchAddress("nenergyf",&nenergyf);
00027 the_tree.SetBranchAddress("nwtfar",&nwtfar);
00028 the_tree.SetBranchAddress("norig",&norig);
00029 the_tree.SetBranchAddress("ndecay",&ndecay);
00030 the_tree.SetBranchAddress("ntype",&ntype);
00031 the_tree.SetBranchAddress("vx",&vx);
00032 the_tree.SetBranchAddress("vy",&vy);
00033 the_tree.SetBranchAddress("vz",&vz);
00034 the_tree.SetBranchAddress("pdpx",&pdpx);
00035 the_tree.SetBranchAddress("pdpy",&pdpy);
00036 the_tree.SetBranchAddress("pdpz",&pdpz);
00037 the_tree.SetBranchAddress("ppdxdz",&ppdxdz);
00038 the_tree.SetBranchAddress("ppdydz",&ppdydz);
00039 the_tree.SetBranchAddress("pppz",&pppz);
00040 the_tree.SetBranchAddress("ppenergy",&ppenergy);
00041 the_tree.SetBranchAddress("ppmedium",&ppmedium);
00042 the_tree.SetBranchAddress("ptype",&ptype);
00043 the_tree.SetBranchAddress("ppvx",&ppvx);
00044 the_tree.SetBranchAddress("ppvy",&ppvy);
00045 the_tree.SetBranchAddress("ppvz",&ppvz);
00046 the_tree.SetBranchAddress("muparpx",&muparpx);
00047 the_tree.SetBranchAddress("muparpy",&muparpy);
00048 the_tree.SetBranchAddress("muparpz",&muparpz);
00049 the_tree.SetBranchAddress("mupare",&mupare);
00050 the_tree.SetBranchAddress("necm",&necm);
00051 the_tree.SetBranchAddress("nimpwt",&nimpwt);
00052 the_tree.SetBranchAddress("xpoint",&xpoint);
00053 the_tree.SetBranchAddress("ypoint",&ypoint);
00054 the_tree.SetBranchAddress("zpoint",&zpoint);
00055 the_tree.SetBranchAddress("tvx",&tvx);
00056 the_tree.SetBranchAddress("tvy",&tvy);
00057 the_tree.SetBranchAddress("tvz",&tvz);
00058 the_tree.SetBranchAddress("tpx",&tpx);
00059 the_tree.SetBranchAddress("tpy",&tpy);
00060 the_tree.SetBranchAddress("tpz",&tpz);
00061 the_tree.SetBranchAddress("tptype",&tptype);
00062
00063 tree = &the_tree;
00064 }
|
|
|
Definition at line 10 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 25 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 22 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 23 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 24 of file GnumiTree.h. Referenced by paint_flux(), and SetTree(). |
|
|
Definition at line 15 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 11 of file GnumiTree.h. Referenced by paint_flux(), and SetTree(). |
|
|
Definition at line 13 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 12 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 11 of file GnumiTree.h. Referenced by paint_flux(), and SetTree(). |
|
|
Definition at line 13 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 12 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 27 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 11 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 13 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 12 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 28 of file GnumiTree.h. Referenced by paint_flux(), and SetTree(). |
|
|
Definition at line 14 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 11 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 16 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 13 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 12 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 18 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 18 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 18 of file GnumiTree.h. Referenced by paint_flux(), and SetTree(). |
|
|
Definition at line 19 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 19 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 19 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 20 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 19 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 21 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 21 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 21 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 20 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 10 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 32 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 31 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 31 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 31 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 7 of file GnumiTree.h. Referenced by paint_flux(), and SetTree(). |
|
|
Definition at line 30 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 30 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 30 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 17 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 17 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 17 of file GnumiTree.h. Referenced by paint_flux(), and SetTree(). |
|
|
Definition at line 29 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 29 of file GnumiTree.h. Referenced by SetTree(). |
|
|
Definition at line 29 of file GnumiTree.h. Referenced by SetTree(). |
1.3.9.1