#include <ReactorNtuple.hh>
Public Methods | |
ReactorNtuple (int ntId, const char *ntName, char *dirName) | |
ReactorNtuple constructor. More... | |
~ReactorNtuple () | |
ReactorNtuple destructor. | |
ReactorNtuple (const ReactorNtuple &Ntuple) | |
ReactorNtuple copy constructor. | |
ReactorNtuple & | operator= (const ReactorNtuple &rhs) |
ReactorNtuple overloaded = operator. | |
void | Fill (ReactorEvent &Event, ReactorDetector &Detector) |
Definition at line 12 of file ReactorNtuple.hh.
|
ReactorNtuple constructor. Called by ReactorFsim with an ntuple Id, name and directory name. Creates all the ntuple arrays and histograms as set by the user. Definition at line 32 of file ReactorNtuple.cpp.
00034 { 00035 00036 // define ntuple tags here 00037 // to add vars, increment ntVars, and add tag to end of list 00038 // don't change wordsize 00039 // 00040 int wordsize = 8; 00041 int ntVarsMax = 127; 00042 int ntVars = 0; 00043 char ntTags[ntVarsMax*wordsize]; 00044 // 00045 // book the general event veriables 00046 // 00047 strcpy(ntTags+ntVars++*wordsize,"evtnum "); 00048 strcpy(ntTags+ntVars++*wordsize,"wtc "); 00049 strcpy(ntTags+ntVars++*wordsize,"wtf "); 00050 // 00051 // book the nubar event variables 00052 // 00053 strcpy(ntTags+ntVars++*wordsize,"enu "); 00054 strcpy(ntTags+ntVars++*wordsize,"vnu1r "); 00055 strcpy(ntTags+ntVars++*wordsize,"vnu1cos "); 00056 strcpy(ntTags+ntVars++*wordsize,"vnu1phi "); 00057 strcpy(ntTags+ntVars++*wordsize,"vnu1x "); 00058 strcpy(ntTags+ntVars++*wordsize,"vnu1y "); 00059 strcpy(ntTags+ntVars++*wordsize,"vnu1z "); 00060 // 00061 // book the electron event variables 00062 // 00063 strcpy(ntTags+ntVars++*wordsize,"nele "); 00064 strcpy(ntTags+ntVars++*wordsize,"KEele1 "); 00065 strcpy(ntTags+ntVars++*wordsize,"ele1cos "); 00066 strcpy(ntTags+ntVars++*wordsize,"vele1r "); 00067 strcpy(ntTags+ntVars++*wordsize,"vele1cos "); 00068 strcpy(ntTags+ntVars++*wordsize,"vele1phi "); 00069 strcpy(ntTags+ntVars++*wordsize,"vele1x "); 00070 strcpy(ntTags+ntVars++*wordsize,"vele1y "); 00071 strcpy(ntTags+ntVars++*wordsize,"vele1z "); 00072 strcpy(ntTags+ntVars++*wordsize,"tele1 "); 00073 // 00074 // book the positron event variables 00075 // 00076 strcpy(ntTags+ntVars++*wordsize,"npos "); 00077 strcpy(ntTags+ntVars++*wordsize,"KEpos1 "); 00078 strcpy(ntTags+ntVars++*wordsize,"pos1cos "); 00079 strcpy(ntTags+ntVars++*wordsize,"vpos1r "); 00080 strcpy(ntTags+ntVars++*wordsize,"vpos1cos "); 00081 strcpy(ntTags+ntVars++*wordsize,"vpos1phi "); 00082 strcpy(ntTags+ntVars++*wordsize,"vpos1x "); 00083 strcpy(ntTags+ntVars++*wordsize,"vpos1y "); 00084 strcpy(ntTags+ntVars++*wordsize,"vpos1z "); 00085 strcpy(ntTags+ntVars++*wordsize,"tpos1 "); 00086 // 00087 // book the neutron event variables 00088 // 00089 strcpy(ntTags+ntVars++*wordsize,"nneu "); 00090 strcpy(ntTags+ntVars++*wordsize,"KEneu1 "); 00091 strcpy(ntTags+ntVars++*wordsize,"neu1cos "); 00092 strcpy(ntTags+ntVars++*wordsize,"neuproc1 "); 00093 strcpy(ntTags+ntVars++*wordsize,"vneu1r "); 00094 strcpy(ntTags+ntVars++*wordsize,"vneu1cos "); 00095 strcpy(ntTags+ntVars++*wordsize,"vneu1phi "); 00096 strcpy(ntTags+ntVars++*wordsize,"vneu1x "); 00097 strcpy(ntTags+ntVars++*wordsize,"vneu1y "); 00098 strcpy(ntTags+ntVars++*wordsize,"vneu1z "); 00099 strcpy(ntTags+ntVars++*wordsize,"tneu1 "); 00100 strcpy(ntTags+ntVars++*wordsize,"nsteps1 "); 00101 strcpy(ntTags+ntVars++*wordsize,"absorb1 "); 00102 00103 strcpy(ntTags+ntVars++*wordsize,"KEneu2 "); 00104 strcpy(ntTags+ntVars++*wordsize,"neu2cos "); 00105 strcpy(ntTags+ntVars++*wordsize,"neuproc2 "); 00106 strcpy(ntTags+ntVars++*wordsize,"vneu2r "); 00107 strcpy(ntTags+ntVars++*wordsize,"vneu2cos "); 00108 strcpy(ntTags+ntVars++*wordsize,"vneu2phi "); 00109 strcpy(ntTags+ntVars++*wordsize,"vneu2x "); 00110 strcpy(ntTags+ntVars++*wordsize,"vneu2y "); 00111 strcpy(ntTags+ntVars++*wordsize,"vneu2z "); 00112 strcpy(ntTags+ntVars++*wordsize,"tneu2 "); 00113 strcpy(ntTags+ntVars++*wordsize,"nsteps2 "); 00114 strcpy(ntTags+ntVars++*wordsize,"absorb2 "); 00115 00116 strcpy(ntTags+ntVars++*wordsize,"KEneu3 "); 00117 strcpy(ntTags+ntVars++*wordsize,"neu3cos "); 00118 strcpy(ntTags+ntVars++*wordsize,"neuproc3 "); 00119 strcpy(ntTags+ntVars++*wordsize,"vneu3r "); 00120 strcpy(ntTags+ntVars++*wordsize,"vneu3cos "); 00121 strcpy(ntTags+ntVars++*wordsize,"vneu3phi "); 00122 strcpy(ntTags+ntVars++*wordsize,"vneu3x "); 00123 strcpy(ntTags+ntVars++*wordsize,"vneu3y "); 00124 strcpy(ntTags+ntVars++*wordsize,"vneu3z "); 00125 strcpy(ntTags+ntVars++*wordsize,"tneu3 "); 00126 strcpy(ntTags+ntVars++*wordsize,"nsteps3 "); 00127 strcpy(ntTags+ntVars++*wordsize,"absorb3 "); 00128 // 00129 // book the pmt detector variables 00130 // 00131 strcpy(ntTags+ntVars++*wordsize,"ncosbins "); 00132 strcpy(ntTags+ntVars++*wordsize,"nphibins "); 00133 // 00134 strcpy(ntTags+ntVars++*wordsize,"phposvis "); 00135 strcpy(ntTags+ntVars++*wordsize,"phposrec "); 00136 strcpy(ntTags+ntVars++*wordsize,"phneuvis "); 00137 strcpy(ntTags+ntVars++*wordsize,"phneurec "); 00138 strcpy(ntTags+ntVars++*wordsize,"phtlvis "); 00139 strcpy(ntTags+ntVars++*wordsize,"phtlrec "); 00140 strcpy(ntTags+ntVars++*wordsize,"phbivis "); 00141 strcpy(ntTags+ntVars++*wordsize,"phbirec "); 00142 strcpy(ntTags+ntVars++*wordsize,"phcfvis "); 00143 strcpy(ntTags+ntVars++*wordsize,"phcfrec "); 00144 strcpy(ntTags+ntVars++*wordsize,"phmuovis "); 00145 strcpy(ntTags+ntVars++*wordsize,"phmuorec "); 00146 strcpy(ntTags+ntVars++*wordsize,"phelevis "); 00147 strcpy(ntTags+ntVars++*wordsize,"phelerec "); 00148 // 00149 strcpy(ntTags+ntVars++*wordsize,"npepos "); 00150 strcpy(ntTags+ntVars++*wordsize,"Qpos "); 00151 strcpy(ntTags+ntVars++*wordsize,"attenpos "); 00152 strcpy(ntTags+ntVars++*wordsize,"sfactpos "); 00153 strcpy(ntTags+ntVars++*wordsize,"npeneu "); 00154 strcpy(ntTags+ntVars++*wordsize,"Qneu "); 00155 strcpy(ntTags+ntVars++*wordsize,"attenneu "); 00156 strcpy(ntTags+ntVars++*wordsize,"sfactneu "); 00157 strcpy(ntTags+ntVars++*wordsize,"npetl "); 00158 strcpy(ntTags+ntVars++*wordsize,"Qtl "); 00159 strcpy(ntTags+ntVars++*wordsize,"attentl "); 00160 strcpy(ntTags+ntVars++*wordsize,"sfacttl "); 00161 strcpy(ntTags+ntVars++*wordsize,"npebi "); 00162 strcpy(ntTags+ntVars++*wordsize,"Qbi "); 00163 strcpy(ntTags+ntVars++*wordsize,"attenbi "); 00164 strcpy(ntTags+ntVars++*wordsize,"sfactbi "); 00165 strcpy(ntTags+ntVars++*wordsize,"npecf "); 00166 strcpy(ntTags+ntVars++*wordsize,"Qcf "); 00167 strcpy(ntTags+ntVars++*wordsize,"attencf "); 00168 strcpy(ntTags+ntVars++*wordsize,"sfactcf "); 00169 strcpy(ntTags+ntVars++*wordsize,"npemuo "); 00170 strcpy(ntTags+ntVars++*wordsize,"Qmuo "); 00171 strcpy(ntTags+ntVars++*wordsize,"attenmuo "); 00172 strcpy(ntTags+ntVars++*wordsize,"sfactmuo "); 00173 strcpy(ntTags+ntVars++*wordsize,"npeele "); 00174 strcpy(ntTags+ntVars++*wordsize,"Qele "); 00175 strcpy(ntTags+ntVars++*wordsize,"attenele "); 00176 strcpy(ntTags+ntVars++*wordsize,"sfactele "); 00177 // 00178 strcpy(ntTags+ntVars++*wordsize,"ngampos "); 00179 strcpy(ntTags+ntVars++*wordsize,"ngamneu "); 00180 strcpy(ntTags+ntVars++*wordsize,"ngamtl "); 00181 strcpy(ntTags+ntVars++*wordsize,"ngambi "); 00182 strcpy(ntTags+ntVars++*wordsize,"ngamcf "); 00183 strcpy(ntTags+ntVars++*wordsize,"ngammuo "); 00184 strcpy(ntTags+ntVars++*wordsize,"ngamele "); 00185 // 00186 strcpy(ntTags+ntVars++*wordsize,"fpmtpos "); 00187 strcpy(ntTags+ntVars++*wordsize,"fpmtneu "); 00188 strcpy(ntTags+ntVars++*wordsize,"fpmttl "); 00189 strcpy(ntTags+ntVars++*wordsize,"fpmtbi "); 00190 strcpy(ntTags+ntVars++*wordsize,"fpmtcf "); 00191 strcpy(ntTags+ntVars++*wordsize,"fpmtmuo "); 00192 strcpy(ntTags+ntVars++*wordsize,"fpmtele "); 00193 // 00194 strcpy(ntTags+ntVars++*wordsize,"hitpmtpo "); 00195 strcpy(ntTags+ntVars++*wordsize,"hitpmtne "); 00196 strcpy(ntTags+ntVars++*wordsize,"hitpmtth "); 00197 strcpy(ntTags+ntVars++*wordsize,"hitpmtbi "); 00198 strcpy(ntTags+ntVars++*wordsize,"hitpmtca "); 00199 strcpy(ntTags+ntVars++*wordsize,"hitpmtmu "); 00200 strcpy(ntTags+ntVars++*wordsize,"hitpmtel "); 00201 // 00202 hbookn_(ntId,ntName,ntVars,dirName,1000,ntTags, 00203 strlen(ntName),strlen(dirName),wordsize,ntVars); 00204 // 00205 // define some histograms 00206 // Last argument is need for c++ ==> f strings 00207 // 00208 Nvar = ntVars; 00209 Id = ntId; 00210 Offset = 10000*(ntId-1); 00211 00212 hbook1_(Offset+101,"electron PH /PMT/gamma/electron",200,0,0.1,0, 00213 strlen("electron PH /PMT/gamma/electron")); 00214 hbook1_(Offset+102,"positron PH /PMT/gamma/positron",200,0,0.1,0, 00215 strlen("positron PH /PMT/gamma/positron")); 00216 hbook1_(Offset+103,"neutron PH /PMT/gamma/neutron",200,0,0.1,0, 00217 strlen("neutron PH /PMT/gamma/neutron")); 00218 hbook1_(Offset+104,"thallium PH /PMT/gamma/decay",200,0,0.1,0, 00219 strlen("thallium PH /PMT/gamma/decay")); 00220 hbook1_(Offset+105,"bismuth PH /PMT/gamma/decay",200,0,0.1,0, 00221 strlen("bismuth PH /PMT/gamma/decay")); 00222 hbook1_(Offset+106,"cf prompt gamma PH /PMT/gamma/decay",200,0,0.1,0, 00223 strlen("cf prompt gamma PH /PMT/gamma/decay")); 00224 hbook1_(Offset+107,"muon PH /PMT/gamma/muon",200,0,0.1,0, 00225 strlen("muon PH /PMT/gamma/muon")); 00226 // 00227 hbook1_(Offset+201,"electron time /PMT/gamma/electron",250,0,5e8,0, 00228 strlen("electron time /PMT/gamma/electron")); 00229 hbook1_(Offset+202,"positron time /PMT/gamma/positron",250,0,50,0, 00230 strlen("positron time /PMT/gamma/positron")); 00231 hbook1_(Offset+203,"neutron time /PMT/gamma/neutron",250,0,5e5,0, 00232 strlen("neutron time /PMT/gamma/neutron")); 00233 hbook1_(Offset+204,"thallium time /PMT/gamma/decay",250,0,1e6,0, 00234 strlen("thallium time /PMT/gamma/decay")); 00235 hbook1_(Offset+205,"bismuth time /PMT/gamma/decay",250,0,1e6,0, 00236 strlen("bismuth time /PMT/gamma/decay")); 00237 hbook1_(Offset+206,"cf prompt gamma time /PMT/gamma/decay",250,0,50,0, 00238 strlen("cf prompt gamma time /PMT/gamma/decay")); 00239 hbook1_(Offset+207,"muon time /PMT/gamma/muon",300,0,60,0, 00240 strlen("muon time /PMT/gamma/muon")); 00241 // 00242 hbook1_(Offset+301,"number of gamma/electron",10,0,10,0, 00243 strlen("number of gamma/electron")); 00244 hbook1_(Offset+302,"number of gamma/positron",10,0,10,0, 00245 strlen("number of gamma/positron")); 00246 hbook1_(Offset+303,"number of gamma/neutron",20,0,20,0, 00247 strlen("number of gamma/neutron")); 00248 hbook1_(Offset+306,"number of prompt Cf gamma/decay",20,0,20,0, 00249 strlen("number of prompt CF gamma/decay")); 00250 // 00251 hbook1_(Offset+401,"electron gamma energy",100,0,10,0, 00252 strlen("electron gamma energy")); 00253 hbook1_(Offset+402,"positron gamma energy",100,0,10,0, 00254 strlen("positron gamma energy")); 00255 hbook1_(Offset+403,"neutron gamma energy",100,0,10,0, 00256 strlen("neutron gamma energy")); 00257 hbook1_(Offset+406,"prompt Cf gamma energy",100,0,10,0, 00258 strlen("prompt Cf gamma energy")); 00259 // 00260 hbook1_(Offset+501,"electron gamma time",250,0,5e8,0, 00261 strlen("electron gamma time")); 00262 hbook1_(Offset+502,"positron gamma time",250,0,5,0, 00263 strlen("positron gamma time")); 00264 hbook1_(Offset+503,"neutron gamma time",250,0,5e5,0, 00265 strlen("neutron gamma time")); 00266 hbook1_(Offset+506,"prompt Cf gamma time",250,0,5,0, 00267 strlen("prompt Cf gamma time")); 00268 // 00269 hbook1_(Offset+601,"electron gamma radius",400,0,400,0, 00270 strlen("electron gamma radius")); 00271 hbook1_(Offset+602,"positron gamma radius",400,0,400,0, 00272 strlen("positron gamma radius")); 00273 hbook1_(Offset+603,"neutron gamma radius",400,0,400,0, 00274 strlen("neutron gamma radius")); 00275 hbook1_(Offset+606,"prompt Cf gamma radius",400,0,400,0, 00276 strlen("prompt Cf gamma radius")); 00277 // 00278 hbook1_(Offset+701,"electron gamma cos(theta)",20,-1.1,1.1,0, 00279 strlen("electron gamma cos(theta)")); 00280 hbook1_(Offset+702,"positron gamma cos(theta)",20,-1.1,1.1,0, 00281 strlen("positron gamma cos(theta)")); 00282 hbook1_(Offset+703,"neutron gamma cos(theta)",20,-1.1,1.1,0, 00283 strlen("neutron gamma cos(theta)")); 00284 hbook1_(Offset+706,"prompt Cf gamma cos(theta)",20,-1.1,1.1,0, 00285 strlen("prompt Cf gamma cos(theta)")); 00286 // 00287 hbook1_(Offset+1001,"npe in each PMT from each electron",200,-0.5,199.5,0, 00288 strlen("npe in each PMT from each electron")); 00289 hbook1_(Offset+1002,"npe in each PMT from each positron",200,-0.5,199.5,0, 00290 strlen("npe in each PMT from each positron")); 00291 hbook1_(Offset+1003,"npe in each PMT from each neutron",200,-0.5,199.5,0, 00292 strlen("npe in each PMT from each neutron")); 00293 hbook1_(Offset+1004,"npe in each PMT from each thallium",200,-0.5,199.5,0, 00294 strlen("npe in each PMT from each thallium")); 00295 hbook1_(Offset+1005,"npe in each PMT from each bismuth",200,-0.5,199.5,0, 00296 strlen("npe in each PMT from each bismuth")); 00297 hbook1_(Offset+1006,"npe in each PMT from each calif",200,-0.5,199.5,0, 00298 strlen("npe in each PMT from each calif")); 00299 hbook1_(Offset+1007,"npe in each PMT from each muon",200,-0.5,199.5,0, 00300 strlen("npe in each PMT from each muon")); 00301 // 00302 hbook1_(Offset+2001,"total npe in each PMT from electrons", 00303 200,-0.5,199.5,0, 00304 strlen("total npe in each PMT from electrons")); 00305 hbook1_(Offset+2002,"total npe in each PMT from positrons", 00306 200,-0.5,199.5,0, 00307 strlen("total npe in each PMT from positrons")); 00308 hbook1_(Offset+2003,"total npe in each PMT from neutrons", 00309 200,-0.5,199.5,0, 00310 strlen("total npe in each PMT from neutrons")); 00311 hbook1_(Offset+2004,"total npe in each PMT from thallium", 00312 200,-0.5,199.5,0, 00313 strlen("total npe in each PMT from thallium")); 00314 hbook1_(Offset+2005,"total npe in each PMT from bismuth", 00315 200,-0.5,199.5,0, 00316 strlen("total npe in each PMT from bismuth")); 00317 hbook1_(Offset+2006,"total npe in each PMT from calif", 00318 200,-0.5,199.5,0, 00319 strlen("total npe in each PMT from calif")); 00320 hbook1_(Offset+2007,"total npe in each PMT from muons", 00321 800,-0.5,799.5,0, 00322 strlen("total npe in each PMT from muons")); 00323 } |