diff --git a/data/ANL/CC1pi0_on_n/ANL_CC1pi0_WNmu_per_0.04GeV.txt b/data/ANL/CC1pi0_on_n/ANL_CC1pi0_WNmu_per_0.04GeV.txt new file mode 100644 index 0000000..0e5189f --- /dev/null +++ b/data/ANL/CC1pi0_on_n/ANL_CC1pi0_WNmu_per_0.04GeV.txt @@ -0,0 +1,22 @@ +1 0 +1.04 3.8501848126140423 +1.08 12.489870397230145 +1.12 17.285547185701585 +1.16 24.223599868993585 +1.20 21.39329995789079 +1.24 26.251579095120007 +1.28 14.471950591868241 +1.32 14.471950591868241 +1.36 17.949328592148973 +1.40 16.379497496841807 +1.44 9.830533851120581 +1.48 10.403078650633976 +1.52 5.871286202217757 +1.56 0 +1.60 0.7145931783090766 +1.64 1.728442427361614 +1.68 0 +1.72 0 +1.76 0 +1.80 0.6793618116314946 +1.84 0 diff --git a/data/ANL/CC1pi0_on_n/ANL_CC1pi0_WNpi_per_0.03GeV.txt b/data/ANL/CC1pi0_on_n/ANL_CC1pi0_WNpi_per_0.03GeV.txt new file mode 100644 index 0000000..b5df0d5 --- /dev/null +++ b/data/ANL/CC1pi0_on_n/ANL_CC1pi0_WNpi_per_0.03GeV.txt @@ -0,0 +1,26 @@ +1 0 +1.03 0 +1.06 0 +1.09 4.631980108288985 +1.12 22.3389491785374 +1.15 14.030534705923358 +1.18 24.531313178258547 +1.21 20.741849278460716 +1.24 20.128180698533683 +1.27 16.583180349963982 +1.30 17.557316478051728 +1.33 19.38623846815235 +1.36 5.459624009481093 +1.39 8.387609508981477 +1.42 2.1553691353147535 +1.45 3.2516440870959507 +1.48 6.302140217972251 +1.51 3.611925731415422 +1.54 1.53259126716706 +1.57 1.0408756070922287 +1.60 1.5264564404062 +1.63 1.0349266841726106 +1.66 3.596681616433898 +1.69 0 +1.72 0.41475146980224054 +1.75 0 diff --git a/data/ANL/CC1pi0_on_n/ANL_CC1pi0_Wmupi_per_0.04GeV.txt b/data/ANL/CC1pi0_on_n/ANL_CC1pi0_Wmupi_per_0.04GeV.txt new file mode 100644 index 0000000..2ca20b1 --- /dev/null +++ b/data/ANL/CC1pi0_on_n/ANL_CC1pi0_Wmupi_per_0.04GeV.txt @@ -0,0 +1,21 @@ +0 0 +0.24 4.534883720930228 +0.28 12.500000000000002 +0.32 11.569767441860467 +0.36 15.000000000000002 +0.40 19.883720930232563 +0.44 25.000000000000007 +0.48 18.081395348837212 +0.52 17.616279069767447 +0.56 13.779069767441865 +0.60 18.197674418604656 +0.64 10.98837209302326 +0.68 7.79069767441861 +0.72 7.79069767441861 +0.76 5.872093023255815 +0.80 2.9069767441860463 +0.84 5.406976744186046 +0.88 0.9302325581395365 +0.92 0.9302325581395365 +0.96 0 +1.00 0 diff --git a/data/ANL/CC1pip_on_n/ANL_CC1npip_WNmu_per_0.04GeV.txt b/data/ANL/CC1pip_on_n/ANL_CC1npip_WNmu_per_0.04GeV.txt new file mode 100644 index 0000000..0e5189f --- /dev/null +++ b/data/ANL/CC1pip_on_n/ANL_CC1npip_WNmu_per_0.04GeV.txt @@ -0,0 +1,22 @@ +1 0 +1.04 3.8501848126140423 +1.08 12.489870397230145 +1.12 17.285547185701585 +1.16 24.223599868993585 +1.20 21.39329995789079 +1.24 26.251579095120007 +1.28 14.471950591868241 +1.32 14.471950591868241 +1.36 17.949328592148973 +1.40 16.379497496841807 +1.44 9.830533851120581 +1.48 10.403078650633976 +1.52 5.871286202217757 +1.56 0 +1.60 0.7145931783090766 +1.64 1.728442427361614 +1.68 0 +1.72 0 +1.76 0 +1.80 0.6793618116314946 +1.84 0 diff --git a/data/ANL/CC1pip_on_n/ANL_CC1npip_WNpi_per_0.02GeV.txt b/data/ANL/CC1pip_on_n/ANL_CC1npip_WNpi_per_0.02GeV.txt new file mode 100644 index 0000000..4053207 --- /dev/null +++ b/data/ANL/CC1pip_on_n/ANL_CC1npip_WNpi_per_0.02GeV.txt @@ -0,0 +1,30 @@ +1 0 +1.02 0 +1.04 0 +1.06 0 +1.08 4.834829378202567 +1.10 6.840680306719484 +1.12 8.846531235236402 +1.14 13.68699349493041 +1.16 11.79543554893339 +1.18 13.801104771595744 +1.20 26.082603481484178 +1.22 14.978195297452487 +1.24 23.83453864883527 +1.26 10.95868008867246 +1.28 8.948649925500604 +1.30 9.773776211069524 +1.32 6.110404477232258 +1.34 8.94301704400916 +1.36 2.917287495003091 +1.38 3.978449685648876 +1.40 3.978449685648876 +1.42 0.9036232147399801 +1.44 5.507867863502565 +1.46 2.7893665733909963 +1.48 3.7322382527165026 +1.50 1.1318457680706508 +1.52 2.0748991532507226 +1.54 2.072718682995969 +1.56 1.362248791656068 +1.58 0 diff --git a/data/ANL/CC1pip_on_n/ANL_CC1npip_Wmupi_per_0.04GeV.txt b/data/ANL/CC1pip_on_n/ANL_CC1npip_Wmupi_per_0.04GeV.txt new file mode 100644 index 0000000..9400a59 --- /dev/null +++ b/data/ANL/CC1pip_on_n/ANL_CC1npip_Wmupi_per_0.04GeV.txt @@ -0,0 +1,21 @@ +0.2 0 +0.24 9.863813229571985 +0.28 18.910505836575872 +0.32 28.83268482490272 +0.36 23.75486381322957 +0.40 9.45525291828794 +0.44 20.019455252918288 +0.48 12.2568093385214 +0.52 23.929961089494164 +0.56 13.48249027237354 +0.60 7.52918287937743 +0.64 5.6614785992217875 +0.68 10.330739299610894 +0.72 8.11284046692607 +0.76 3.9688715953307394 +0.80 3.2684824902723726 +0.84 0.8754863813229612 +0.88 1.6926070038910481 +0.92 0.7587548638132269 +0.96 0 +1.00 0 diff --git a/data/ANL/CC1pip_on_p/ANL_CC1ppip_WNmu_per_0.04GeV.txt b/data/ANL/CC1pip_on_p/ANL_CC1ppip_WNmu_per_0.04GeV.txt new file mode 100644 index 0000000..281b1da --- /dev/null +++ b/data/ANL/CC1pip_on_p/ANL_CC1ppip_WNmu_per_0.04GeV.txt @@ -0,0 +1,30 @@ +1 0 +1.04 9.560871650061287 +1.08 21.673468662866085 +1.12 37.87109950805407 +1.16 49.98582769460281 +1.20 64.14094162359922 +1.24 69.95719892730924 +1.28 60.11273909105441 +1.32 62.693590494965115 +1.36 61.1908288489886 +1.40 52.1974177278136 +1.44 49.16347878594138 +1.48 48.33942493828477 +1.52 33.902143605590794 +1.56 35.971655389205615 +1.60 31.233487843429785 +1.64 25.135773527270153 +1.68 18.184879322286747 +1.72 17.02253716234216 +1.76 13.816257303710003 +1.80 13.816257303710003 +1.84 8.764665139325515 +1.88 7.773243113644838 +1.92 3.8861242829488276 +1.96 5.447848402507674 +2.00 3.6032464880032506 +2.04 1.9281439252668093 +2.08 6.2132239330811245 +2.12 0 +2.16 4.567957802759864 diff --git a/data/ANL/CC1pip_on_p/ANL_CC1ppip_WNpi_per_0.02GeV.txt b/data/ANL/CC1pip_on_p/ANL_CC1ppip_WNpi_per_0.02GeV.txt new file mode 100644 index 0000000..19c3a3d --- /dev/null +++ b/data/ANL/CC1pip_on_p/ANL_CC1ppip_WNpi_per_0.02GeV.txt @@ -0,0 +1,31 @@ +1 0 +1.02 0 +1.04 0 +1.06 0 +1.08 0 +1.10 3.1853281853281885 +1.12 11.583011583011597 +1.14 22.007722007722037 +1.16 47.4903474903475 +1.18 74.13127413127414 +1.20 110.61776061776064 +1.22 122.7799227799228 +1.24 86.8725868725869 +1.26 58.49420849420851 +1.28 48.06949806949808 +1.30 28.95752895752898 +1.32 23.74517374517373 +1.34 14.478764478764475 +1.36 9.266409266409255 +1.38 8.976833976833973 +1.4 8.108108108108127 +1.42 2.3166023166023137 +1.44 2.3166023166023137 +1.46 0 +1.48 0.2895752895752821 +1.50 2.8957528957529064 +1.52 1.7374517374517495 +1.54 1 +1.56 0 +1.58 0 +1.60 0 diff --git a/data/ANL/CC1pip_on_p/ANL_CC1ppip_Wmupi_per_0.02GeV.txt b/data/ANL/CC1pip_on_p/ANL_CC1ppip_Wmupi_per_0.02GeV.txt new file mode 100644 index 0000000..dda6b69 --- /dev/null +++ b/data/ANL/CC1pip_on_p/ANL_CC1ppip_Wmupi_per_0.02GeV.txt @@ -0,0 +1,65 @@ +0.2 0 +0.22 0 +0.24 10.569829934476914 +0.26 12.664254688108024 +0.28 17.775475647079844 +0.30 28.106982467580266 +0.32 34.146885287281364 +0.34 22.43781617778525 +0.36 45.41338437753073 +0.38 25.352488930490843 +0.40 34.87132024274039 +0.42 30.1220012410471 +0.44 48.45794638255802 +0.46 34.312743871015236 +0.48 42.323492601045416 +0.50 26.90222021224009 +0.52 25.284441686561983 +0.54 31.09233180130625 +0.56 25.183580315730794 +0.58 21.825075461974528 +0.60 19.975915272241565 +0.62 26.015187051040684 +0.64 23.934014156350898 +0.66 20.113377015386874 +0.68 22.789095613213995 +0.70 20.12725991523017 +0.72 17.93071170896394 +0.74 17.93071170896394 +0.76 17.93071170896394 +0.78 14.934739853388159 +0.80 8.909982015334293 +0.82 6.94544651402488 +0.84 10.08392843996171 +0.86 10.08392843996171 +0.88 13.807490455506361 +0.90 8.944058224040553 +0.92 8.944058224040553 +0.94 6.869826779272415 +0.96 3.9772404581356966 +0.98 5.955658859288391 +1.00 3.87511700550057 +1.02 2.7226259715400403 +1.04 3.656987200387036 +1.06 1.8071959697521152 +1.08 4.830302584112488 +1.10 1.8210788695953966 +1.12 1.8210788695953966 +1.14 0.3281412690232628 +1.16 0.683732817282106 +1.18 3.7049463089365844 +1.20 1.6244044551487633 +1.22 0.12389436375300988 +1.24 0.12389436375300988 +1.26 0.12389436375300988 +1.28 2.58022107466266 +1.30 0.3836728683964168 +1.32 2.8261166794627712 +1.34 0.9775875306317658 +1.36 0.9775875306317658 +1.38 0.9775875306317658 +1.40 0.9775875306317658 +1.42 0.9775875306317658 +1.44 0 +1.48 0 +1.50 0 diff --git a/data/BNL/CC1pi0_on_n/BNL_CC1pi0_WNmu_per_0.05GeV.txt b/data/BNL/CC1pi0_on_n/BNL_CC1pi0_WNmu_per_0.05GeV.txt new file mode 100644 index 0000000..b73bc62 --- /dev/null +++ b/data/BNL/CC1pi0_on_n/BNL_CC1pi0_WNmu_per_0.05GeV.txt @@ -0,0 +1,41 @@ +1.00 0 +1.05 24.302197673602166 +1.10 49.37182577761135 +1.15 57.80373066211061 +1.20 59.507103236829174 +1.25 50.515599035738525 +1.30 41.52339270250661 +1.35 48.305989187165025 +1.40 41.03119807147705 +1.45 46.82378823694619 +1.50 45.486226507828775 +1.55 33.19470124277389 +1.60 38.91918459053994 +1.65 30.915580312214757 +1.70 35.586865448077326 +1.75 25.6713553490767 +1.80 21.629180611791135 +1.85 25.641163667002132 +1.90 23.44629859339527 +1.95 16.36950874154516 +2.00 12.853230978070066 +2.05 12.108970908324949 +2.10 6.088889929084651 +2.15 9.373464085940967 +2.20 7.444707093875067 +2.25 11.653287148641368 +2.30 6.289699721487587 +2.35 4.622838018115004 +2.40 5.3333957450792155 +2.45 3.4088515458609265 +2.50 4.511901139794503 +2.55 3.1729351463945505 +2.60 2.2341844735179137 +2.65 2.2341844735179137 +2.70 1.1486881831160503 +2.75 1.1486881831160503 +2.80 0.5224822593257556 +2.85 3.2177175374216205 +2.90 0.8155292036538597 +2.95 1.4572100501688396 +3.00 0 diff --git a/data/BNL/CC1pi0_on_n/BNL_CC1pi0_WNpi_per_0.05GeV.txt b/data/BNL/CC1pi0_on_n/BNL_CC1pi0_WNpi_per_0.05GeV.txt new file mode 100644 index 0000000..7145fe9 --- /dev/null +++ b/data/BNL/CC1pi0_on_n/BNL_CC1pi0_WNpi_per_0.05GeV.txt @@ -0,0 +1,41 @@ +1.00 0 +1.05 5.2226268322379354 +1.10 38.085751938459666 +1.15 80.39334780270758 +1.20 101.34682198490468 +1.25 85.74887370130867 +1.30 73.02622597299113 +1.35 57.84062699383427 +1.40 59.080461051100684 +1.45 41.01733260150621 +1.50 54.988730047726655 +1.55 24.60805919998664 +1.60 20.09784937548585 +1.65 27.91019700823864 +1.70 17.239822912690613 +1.75 19.712804281746045 +1.80 19.712804281746045 +1.85 9.8721438541844 +1.90 21.173022325371477 +1.95 12.763604044366573 +2.00 6.200006129516709 +2.05 7.235615835327778 +2.10 4.368673711896022 +2.15 4.993605799637265 +2.20 6.233439856903658 +2.25 5.215661472365653 +2.30 2.3476048913543366 +2.35 3.7938922152352177 +2.40 0.5168297025234523 +2.45 1.756663759789845 +2.50 5.460563525475138 +2.55 3.622544362377056 +2.60 0.9603838191904401 +2.65 1.7895402583870208 +2.70 0.15463098916471552 +2.75 1.3955795040106835 +2.80 0 +2.85 1.8235312145637579 +2.90 0 +2.95 1.4290132313976471 +3.00 0 diff --git a/data/BNL/CC1pi0_on_n/BNL_CC1pi0_Wmupi_per_0.05GeV.txt b/data/BNL/CC1pi0_on_n/BNL_CC1pi0_Wmupi_per_0.05GeV.txt new file mode 100644 index 0000000..08c84cd --- /dev/null +++ b/data/BNL/CC1pi0_on_n/BNL_CC1pi0_Wmupi_per_0.05GeV.txt @@ -0,0 +1,51 @@ +0 0 +0.05 0 +0.10 0 +0.15 0 +0.20 0 +0.25 21.876805757734743 +0.30 29.02128854438378 +0.35 26.32057695576033 +0.40 41.54014970701466 +0.45 38.60911395024054 +0.50 43.36766890069535 +0.55 59.66504348597145 +0.60 52.27427566485138 +0.65 56.95546474939225 +0.70 45.71458128588425 +0.75 39.62972267994769 +0.80 34.62089247844176 +0.85 31.53556834723753 +0.90 33.14118716332549 +0.95 37.899298756382514 +1.00 24.27736438805597 +1.05 24.27736438805597 +1.10 17.797696019389505 +1.15 16.942237920358245 +1.20 11.932521004056738 +1.25 13.848046641198259 +1.30 18.33453794527619 +1.35 7.7872999483737715 +1.40 5.237480640165195 +1.45 8.841507485802786 +1.50 8.841507485802786 +1.55 8.841507485802786 +1.60 8.841507485802786 +1.65 3.7207021166752483 +1.70 4.865771812080531 +1.75 2.084150748580285 +1.80 2.084150748580285 +1.85 5.447599380485286 +1.90 1.8213732576148587 +1.95 1.8213732576148587 +2.00 4.492514197212159 +2.05 2.3278265358802273 +2.10 1.47237996902426 +2.15 0 +2.20 3.0665978316984948 +2.25 0 +2.30 5.6608156943727295 +2.35 3.1115126484253963 +2.40 2.562725864739285 +2.45 2.009808982963328 +2.50 0 diff --git a/data/BNL/CC1pip_on_n/BNL_CC1npip_WNmu_per_0.05GeV.txt b/data/BNL/CC1pip_on_n/BNL_CC1npip_WNmu_per_0.05GeV.txt new file mode 100644 index 0000000..ba083b4 --- /dev/null +++ b/data/BNL/CC1pip_on_n/BNL_CC1npip_WNmu_per_0.05GeV.txt @@ -0,0 +1,41 @@ +1.00 0 +1.05 13.845619662536016 +1.10 41.320756276816496 +1.15 42.73145889997602 +1.20 49.604087267797055 +1.25 52.21153925645456 +1.30 42.90903679698415 +1.35 53.083886541943265 +1.40 40.55984986896604 +1.45 43.31875563198055 +1.50 33.714999049280316 +1.55 41.48973636130653 +1.60 32.411107712403144 +1.65 27.603442431858188 +1.70 29.910467010028018 +1.75 26.749778854341457 +1.80 26.959598548292416 +1.85 16.75829399558534 +1.90 22.133745587420734 +1.95 14.930101437653413 +2.00 14.163738725704967 +2.05 16.699597390894574 +2.10 12.338026305999442 +2.15 7.527880887228115 +2.20 10.73453427137671 +2.25 10.323554895407852 +2.30 5.898584808350876 +2.35 2.9655485414861644 +2.40 3.5496142261831096 +2.45 6.750340388661968 +2.50 1.4282295663654807 +2.55 4.479432272971081 +2.60 3.268391302553951 +2.65 4.971407352395104 +2.70 1.5166893592441326 +2.75 3.1482444196889148 +2.80 2.310186904319842 +2.85 0.8000990221562176 +2.90 2.6526385278706144 +2.95 0.767091636753733 +3.00 0 diff --git a/data/BNL/CC1pip_on_n/BNL_CC1npip_WNpi_per_0.05GeV.txt b/data/BNL/CC1pip_on_n/BNL_CC1npip_WNpi_per_0.05GeV.txt new file mode 100644 index 0000000..aea69cd --- /dev/null +++ b/data/BNL/CC1pip_on_n/BNL_CC1npip_WNpi_per_0.05GeV.txt @@ -0,0 +1,41 @@ +1.00 0 +1.05 8.840769678562665 +1.10 47.021831847648905 +1.15 82.20052985692276 +1.20 96.57525512729605 +1.25 72.55760907013688 +1.30 74.06306802206561 +1.35 59.69784691174236 +1.40 45.760946614341606 +1.45 57.77578894428623 +1.50 59.066453879083696 +1.55 39.55409649098563 +1.60 23.47274088095746 +1.65 26.479223510124868 +1.70 18.76311277082017 +1.75 14.477370198915324 +1.80 11.478807703122953 +1.85 8.265767995534318 +1.90 5.696476728669452 +1.95 5.696476728669452 +2.00 8.063962997138162 +2.05 4.422602476627063 +2.10 4.422602476627063 +2.15 5.073954245390837 +2.20 4.220480672895903 +2.25 0.3649597459235565 +2.30 2.728010739702256 +2.35 1.6600599554110573 +2.40 1.450651628974839 +2.45 2.740682953102322 +2.50 1.0293005334223864 +2.55 0 +2.60 0 +2.65 1.2577171799587177 +2.70 2.333904902959972 +2.75 0.1932512543525604 +2.80 1.9131874180775128 +2.85 0 +2.90 0 +2.95 0 +3.00 0 diff --git a/data/BNL/CC1pip_on_n/BNL_CC1npip_Wmupi_per_0.05GeV.txt b/data/BNL/CC1pip_on_n/BNL_CC1npip_Wmupi_per_0.05GeV.txt new file mode 100644 index 0000000..4b09e49 --- /dev/null +++ b/data/BNL/CC1pip_on_n/BNL_CC1npip_Wmupi_per_0.05GeV.txt @@ -0,0 +1,51 @@ +0 0 +0.05 0 +0.10 0 +0.15 0 +0.20 2.6600624595998426 +0.25 31.24132613723978 +0.30 40.9999766360599 +0.35 35.914737194613835 +0.40 48.2701079154433 +0.45 51.090706603428266 +0.50 35.454415654878254 +0.55 35.454415654878254 +0.60 40.61358898675783 +0.65 42.10628515948484 +0.70 44.321082840743586 +0.75 39.18236593641374 +0.80 27.523552149612282 +0.85 27.523552149612282 +0.90 31.83996220233691 +0.95 25.671258978891974 +1.00 37.96318362239718 +1.05 30.34840826668119 +1.10 27.196872347219294 +1.15 19.82155141754216 +1.20 14.197695277109297 +1.25 17.319325353249774 +1.30 15.55477675755239 +1.35 7.395777357226862 +1.40 8.28516467683776 +1.45 4.1092497838835484 +1.50 2.8883021943931553 +1.55 4.019636093653048 +1.60 5.272877840341202 +1.65 1.43145409375171084 +1.70 3.5555763235022866 +1.75 6.580275775035439 +1.80 0 +1.85 1.1989386902237484 +1.90 4.553184446536271 +1.95 1.9553029284288428 +2.00 0.8566507711564029 +2.05 0 +2.10 1.9739223981877032 +2.15 2.5039049165744487 +2.20 0.5046910719642739 +2.25 0 +2.30 0 +2.35 1.486299173502431 +2.40 2.316468921001743 +2.45 0.4994155555325861 +2.50 0 diff --git a/data/BNL/CC1pip_on_p/BNL_CC1ppip_WNmu_per_0.05GeV.txt b/data/BNL/CC1pip_on_p/BNL_CC1ppip_WNmu_per_0.05GeV.txt new file mode 100644 index 0000000..5045666 --- /dev/null +++ b/data/BNL/CC1pip_on_p/BNL_CC1ppip_WNmu_per_0.05GeV.txt @@ -0,0 +1,41 @@ +1.00 0 +1.05 7.54271628670304 +1.10 18.375726785763945 +1.15 39.31582018703142 +1.20 67.09084638155907 +1.25 82.97707141094108 +1.30 80.58728049312734 +1.35 89.64314962019981 +1.40 87.25270486082167 +1.45 108.78844792724054 +1.50 104.4657378847245 +1.55 106.3881955443967 +1.60 84.67836716446127 +1.65 78.57393885600612 +1.70 73.51091670221936 +1.75 68.44527918217503 +1.80 58.776760509277224 +1.85 52.67298604538644 +1.90 40.3253515624322 +1.95 44.92104045808145 +2.00 37.33141103913408 +2.05 33.1579403336881 +2.10 19.029241429363083 +2.15 14.413283445222007 +2.20 22.423823371239862 +2.25 22.423823371239862 +2.30 17.943374051316823 +2.35 16.148578957090066 +2.40 13.90671969321761 +2.45 6.317744115834657 +2.50 12.69580511598339 +2.55 14.465100389199264 +2.60 5.241684361254073 +2.65 7.0109796344699475 +2.70 5.512047848125761 +2.75 5.512047848125761 +2.80 4.894821411349781 +2.85 4.894821411349781 +2.90 3.5340136554811465 +2.95 3.5340136554811465 +3.00 0 diff --git a/data/BNL/CC1pip_on_p/BNL_CC1ppip_WNpi_per_0.05GeV.txt b/data/BNL/CC1pip_on_p/BNL_CC1ppip_WNpi_per_0.05GeV.txt new file mode 100644 index 0000000..f0ce7aa --- /dev/null +++ b/data/BNL/CC1pip_on_p/BNL_CC1ppip_WNpi_per_0.05GeV.txt @@ -0,0 +1,23 @@ +1.00 0 +1.05 4.487848713509834 +1.10 93.23386766396652 +1.15 313.7212406337963 +1.20 569.4176104452168 +1.25 285.1290454731668 +1.30 137.79122781514718 +1.35 72.62227273327971 +1.40 47.89549497165376 +1.45 30.98280715201338 +1.50 21.915925519683924 +1.55 8.92415852836632 +1.60 14.189055252342428 +1.65 6.418575147678894 +1.70 0 +1.75 5.213357825322873 +1.80 5.213357825322873 +1.85 5.213357825322873 +1.90 0 +1.95 0 +2.00 0 +2.05 4.23015422024298 +2.10 0 diff --git a/data/BNL/CC1pip_on_p/BNL_CC1ppip_Wmupi_per_0.05GeV.txt b/data/BNL/CC1pip_on_p/BNL_CC1ppip_Wmupi_per_0.05GeV.txt new file mode 100644 index 0000000..2afb8a6 --- /dev/null +++ b/data/BNL/CC1pip_on_p/BNL_CC1ppip_Wmupi_per_0.05GeV.txt @@ -0,0 +1,51 @@ +0 0 +0.05 0 +0.10 0 +0.15 0 +0.20 0 +0.25 26.98939274453741 +0.30 58.469136455153006 +0.35 98.09192758929083 +0.40 92.09147821643032 +0.45 119.27060616874391 +0.50 104.8234155568185 +0.55 100.82032575126772 +0.60 93.13017568129186 +0.65 106.32910834732117 +0.70 102.63499909684867 +0.75 97.248986341121 +0.80 81.87925968024037 +0.85 85.09712181088452 +0.90 68.49808135411021 +0.95 48.366030348821994 +1.00 48.366030348821994 +1.05 39.591364404676426 +1.10 34.972956858736836 +1.15 20.371716530900244 +1.20 22.512992896678 +1.25 18.663071683782448 +1.30 14.1987138537541 +1.35 14.1987138537541 +1.40 15.716742369839722 +1.45 6.182401325209355 +1.50 6.182401325209355 +1.55 12.615922778357884 +1.60 6.461864251214081 +1.65 4.4543717664612075 +1.70 4.4543717664612075 +1.75 2.9962711377863513 +1.80 4.214229431941703 +1.85 3.595291029933435 +1.90 3.595291029933435 +1.95 3.595291029933435 +2.00 0 +2.05 4.642184474693266 +2.10 0 +2.15 2.336616958267797 +2.20 0 +2.25 2.9359297696775855 +2.30 1.401325752582892 +2.35 1.401325752582892 +2.40 0 +2.45 0 +2.50 0 diff --git a/src/ANL/ANL_CC1npip_Evt_1DWNmu_nu.cxx b/src/ANL/ANL_CC1npip_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..aa304a2 --- /dev/null +++ b/src/ANL/ANL_CC1npip_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1npip_Evt_1DWNmu_nu.h" + +//******************************************************************** +ANL_CC1npip_Evt_1DWNmu_nu::ANL_CC1npip_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1npip Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pip_on_n/ANL_CC1npip_WNmu_per_0.04GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1npip_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pn = event->GetHMFSParticle(2112)->fP; + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + + double hadMass = (Pn+Pmu).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1npip_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1npip_Evt_1DWNmu_nu.h b/src/ANL/ANL_CC1npip_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..2d8620f --- /dev/null +++ b/src/ANL/ANL_CC1npip_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1NPIP_EVT_1DWNMU_NU_H_SEEN +#define ANL_CC1NPIP_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1npip_Evt_1DWNmu_nu : public Measurement1D { +public: + ANL_CC1npip_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~ANL_CC1npip_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/ANL_CC1npip_Evt_1DWNpi_nu.cxx b/src/ANL/ANL_CC1npip_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..198e1e2 --- /dev/null +++ b/src/ANL/ANL_CC1npip_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1npip_Evt_1DWNpi_nu.h" + +//******************************************************************** +ANL_CC1npip_Evt_1DWNpi_nu::ANL_CC1npip_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1npip Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pip_on_n/ANL_CC1npip_WNpi_per_0.02GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1npip_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pn = event->GetHMFSParticle(2112)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pn+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1npip_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1npip_Evt_1DWNpi_nu.h b/src/ANL/ANL_CC1npip_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..d8e620c --- /dev/null +++ b/src/ANL/ANL_CC1npip_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1NPIP_EVT_1DWNPI_NU_H_SEEN +#define ANL_CC1NPIP_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1npip_Evt_1DWNpi_nu : public Measurement1D { +public: + ANL_CC1npip_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~ANL_CC1npip_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/ANL_CC1npip_Evt_1DWmupi_nu.cxx b/src/ANL/ANL_CC1npip_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..025880e --- /dev/null +++ b/src/ANL/ANL_CC1npip_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1npip_Evt_1DWmupi_nu.h" + +//******************************************************************** +ANL_CC1npip_Evt_1DWmupi_nu::ANL_CC1npip_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1npip Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pip_on_n/ANL_CC1npip_Wmupi_per_0.04GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1npip_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1npip_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1npip_Evt_1DWmupi_nu.h b/src/ANL/ANL_CC1npip_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..db3730b --- /dev/null +++ b/src/ANL/ANL_CC1npip_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1NPIP_EVT_1DWMUPI_NU_H_SEEN +#define ANL_CC1NPIP_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1npip_Evt_1DWmupi_nu : public Measurement1D { +public: + ANL_CC1npip_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~ANL_CC1npip_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/ANL_CC1pi0_Evt_1DWNmu_nu.cxx b/src/ANL/ANL_CC1pi0_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..1b1c968 --- /dev/null +++ b/src/ANL/ANL_CC1pi0_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1pi0_Evt_1DWNmu_nu.h" + +//******************************************************************** +ANL_CC1pi0_Evt_1DWNmu_nu::ANL_CC1pi0_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1pi0 Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pi0_on_n/ANL_CC1pi0_WNmu_per_0.04GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1pi0_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + + double hadMass = (Pmu+Pp).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1pi0_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1pi0_Evt_1DWNmu_nu.h b/src/ANL/ANL_CC1pi0_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..6b970e3 --- /dev/null +++ b/src/ANL/ANL_CC1pi0_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1PPI0_EVT_1DWNMU_NU_H_SEEN +#define ANL_CC1PPI0_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1pi0_Evt_1DWNmu_nu : public Measurement1D { +public: + ANL_CC1pi0_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~ANL_CC1pi0_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/ANL_CC1pi0_Evt_1DWNpi_nu.cxx b/src/ANL/ANL_CC1pi0_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..f914b48 --- /dev/null +++ b/src/ANL/ANL_CC1pi0_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1pi0_Evt_1DWNpi_nu.h" + +//******************************************************************** +ANL_CC1pi0_Evt_1DWNpi_nu::ANL_CC1pi0_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1pi0 Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pi0_on_n/ANL_CC1pi0_WNpi_per_0.03GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1pi0_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(111)->fP; + + double hadMass = (Pp+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1pi0_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1pi0_Evt_1DWNpi_nu.h b/src/ANL/ANL_CC1pi0_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..d5fc9bc --- /dev/null +++ b/src/ANL/ANL_CC1pi0_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1PPI0_EVT_1DWNPI_NU_H_SEEN +#define ANL_CC1PPI0_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1pi0_Evt_1DWNpi_nu : public Measurement1D { +public: + ANL_CC1pi0_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~ANL_CC1pi0_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/ANL_CC1pi0_Evt_1DWmupi_nu.cxx b/src/ANL/ANL_CC1pi0_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..52e62c9 --- /dev/null +++ b/src/ANL/ANL_CC1pi0_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1pi0_Evt_1DWmupi_nu.h" + +//******************************************************************** +ANL_CC1pi0_Evt_1DWmupi_nu::ANL_CC1pi0_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1pi0 Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pi0_on_n/ANL_CC1pi0_Wmupi_per_0.04GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1pi0_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(111)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1pi0_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1pi0_Evt_1DWmupi_nu.h b/src/ANL/ANL_CC1pi0_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..02a5f99 --- /dev/null +++ b/src/ANL/ANL_CC1pi0_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1PPI0_EVT_1DWMUPI_NU_H_SEEN +#define ANL_CC1PPI0_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1pi0_Evt_1DWmupi_nu : public Measurement1D { +public: + ANL_CC1pi0_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~ANL_CC1pi0_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/ANL_CC1ppip_Evt_1DWNmu_nu.cxx b/src/ANL/ANL_CC1ppip_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..1a51a1b --- /dev/null +++ b/src/ANL/ANL_CC1ppip_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1ppip_Evt_1DWNmu_nu.h" + +//******************************************************************** +ANL_CC1ppip_Evt_1DWNmu_nu::ANL_CC1ppip_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1ppip Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pip_on_p/ANL_CC1ppip_WNmu_per_0.04GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1ppip_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + + double hadMass = (Pmu+Pp).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1ppip_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1ppip_Evt_1DWNmu_nu.h b/src/ANL/ANL_CC1ppip_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..9c59117 --- /dev/null +++ b/src/ANL/ANL_CC1ppip_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1PPIP_EVT_1DWNMU_NU_H_SEEN +#define ANL_CC1PPIP_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1ppip_Evt_1DWNmu_nu : public Measurement1D { +public: + ANL_CC1ppip_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~ANL_CC1ppip_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/ANL_CC1ppip_Evt_1DWNpi_nu.cxx b/src/ANL/ANL_CC1ppip_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..fd92a6b --- /dev/null +++ b/src/ANL/ANL_CC1ppip_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1ppip_Evt_1DWNpi_nu.h" + +//******************************************************************** +ANL_CC1ppip_Evt_1DWNpi_nu::ANL_CC1ppip_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1ppip Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pip_on_p/ANL_CC1ppip_WNpi_per_0.02GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1ppip_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pp+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1ppip_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1ppip_Evt_1DWNpi_nu.h b/src/ANL/ANL_CC1ppip_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..51c114b --- /dev/null +++ b/src/ANL/ANL_CC1ppip_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1PPIP_EVT_1DWNPI_NU_H_SEEN +#define ANL_CC1PPIP_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1ppip_Evt_1DWNpi_nu : public Measurement1D { +public: + ANL_CC1ppip_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~ANL_CC1ppip_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/ANL_CC1ppip_Evt_1DWmupi_nu.cxx b/src/ANL/ANL_CC1ppip_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..8842303 --- /dev/null +++ b/src/ANL/ANL_CC1ppip_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "ANL_CC1ppip_Evt_1DWmupi_nu.h" + +//******************************************************************** +ANL_CC1ppip_Evt_1DWmupi_nu::ANL_CC1ppip_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "ANL CC1ppip Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pip_on_p/ANL_CC1ppip_Wmupi_per_0.02GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void ANL_CC1ppip_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool ANL_CC1ppip_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/ANL/ANL_CC1ppip_Evt_1DWmupi_nu.h b/src/ANL/ANL_CC1ppip_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..98501e1 --- /dev/null +++ b/src/ANL/ANL_CC1ppip_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef ANL_CC1PPIP_EVT_1DWMUPI_NU_H_SEEN +#define ANL_CC1PPIP_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class ANL_CC1ppip_Evt_1DWmupi_nu : public Measurement1D { +public: + ANL_CC1ppip_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~ANL_CC1ppip_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/ANL/CMakeLists.txt b/src/ANL/CMakeLists.txt index ff37ba0..fc1de57 100644 --- a/src/ANL/CMakeLists.txt +++ b/src/ANL/CMakeLists.txt @@ -1,130 +1,149 @@ # Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret ################################################################################ # This file is part of NUISANCE. # # NUISANCE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # NUISANCE is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with NUISANCE. If not, see . ################################################################################ set(IMPLFILES ANL_CCQE_Evt_1DQ2_nu.cxx ANL_CCQE_XSec_1DEnu_nu.cxx ANL_CC1npip_Evt_1DcosmuStar_nu.cxx ANL_CC1npip_Evt_1Dppi_nu.cxx ANL_CC1npip_Evt_1DQ2_nu.cxx ANL_CC1npip_XSec_1DEnu_nu.cxx +ANL_CC1npip_Evt_1DWNpi_nu.cxx +ANL_CC1npip_Evt_1DWNmu_nu.cxx +ANL_CC1npip_Evt_1DWmupi_nu.cxx ANL_CC1pi0_Evt_1DcosmuStar_nu.cxx ANL_CC1pi0_Evt_1DQ2_nu.cxx ANL_CC1pi0_XSec_1DEnu_nu.cxx +ANL_CC1pi0_Evt_1DWNpi_nu.cxx +ANL_CC1pi0_Evt_1DWNmu_nu.cxx +ANL_CC1pi0_Evt_1DWmupi_nu.cxx ANL_CC1ppip_Evt_1DcosmuStar_nu.cxx ANL_CC1ppip_Evt_1Dppi_nu.cxx ANL_CC1ppip_Evt_1DQ2_nu.cxx ANL_CC1ppip_Evt_1Dthpr_nu.cxx ANL_CC1ppip_XSec_1DEnu_nu.cxx ANL_CC1ppip_XSec_1DQ2_nu.cxx ANL_CC1ppip_Evt_1DcosthAdler_nu.cxx ANL_CC1ppip_Evt_1Dphi_nu.cxx +ANL_CC1ppip_Evt_1DWNpi_nu.cxx +ANL_CC1ppip_Evt_1DWNmu_nu.cxx +ANL_CC1ppip_Evt_1DWmupi_nu.cxx ANL_NC1npip_Evt_1Dppi_nu.cxx ANL_NC1ppim_XSec_1DEnu_nu.cxx ANL_NC1ppim_Evt_1DcosmuStar_nu.cxx ANL_CC2pi_1pim1pip_XSec_1DEnu_nu.cxx ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu.cxx ANL_CC2pi_1pim1pip_Evt_1Dppim_nu.cxx ANL_CC2pi_1pim1pip_Evt_1Dppip_nu.cxx ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu.cxx ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu.cxx ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu.cxx ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu.cxx ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu.cxx ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu.cxx ANL_CC2pi_1pip1pip_XSec_1DEnu_nu.cxx ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu.cxx ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu.cxx ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu.cxx ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu.cxx ) set(HEADERFILES ANL_CCQE_Evt_1DQ2_nu.h ANL_CCQE_XSec_1DEnu_nu.h ANL_CC1npip_Evt_1DcosmuStar_nu.h ANL_CC1npip_Evt_1Dppi_nu.h ANL_CC1npip_Evt_1DQ2_nu.h ANL_CC1npip_XSec_1DEnu_nu.h +ANL_CC1npip_Evt_1DWNpi_nu.h +ANL_CC1npip_Evt_1DWNmu_nu.h +ANL_CC1npip_Evt_1DWmupi_nu.h ANL_CC1pi0_Evt_1DcosmuStar_nu.h ANL_CC1pi0_Evt_1DQ2_nu.h ANL_CC1pi0_XSec_1DEnu_nu.h +ANL_CC1pi0_Evt_1DWNpi_nu.h +ANL_CC1pi0_Evt_1DWNmu_nu.h +ANL_CC1pi0_Evt_1DWmupi_nu.h ANL_CC1ppip_Evt_1DcosmuStar_nu.h ANL_CC1ppip_Evt_1Dppi_nu.h ANL_CC1ppip_Evt_1DQ2_nu.h ANL_CC1ppip_Evt_1Dthpr_nu.h ANL_CC1ppip_XSec_1DEnu_nu.h ANL_CC1ppip_XSec_1DQ2_nu.h ANL_CC1ppip_Evt_1DcosthAdler_nu.h ANL_CC1ppip_Evt_1Dphi_nu.h +ANL_CC1ppip_Evt_1DWNpi_nu.h +ANL_CC1ppip_Evt_1DWNpi_nu.h +ANL_CC1ppip_Evt_1DWNmu_nu.h +ANL_CC1ppip_Evt_1DWmupi_nu.h ANL_NC1npip_Evt_1Dppi_nu.h ANL_NC1ppim_XSec_1DEnu_nu.h ANL_NC1ppim_Evt_1DcosmuStar_nu.h ANL_CC2pi_1pim1pip_XSec_1DEnu_nu.h ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu.h ANL_CC2pi_1pim1pip_Evt_1Dppim_nu.h ANL_CC2pi_1pim1pip_Evt_1Dppip_nu.h ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu.h ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu.h ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu.h ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu.h ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu.h ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu.h ANL_CC2pi_1pip1pip_XSec_1DEnu_nu.h ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu.h ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu.h ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu.h ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu.h) set(LIBNAME expANL) if(CMAKE_BUILD_TYPE MATCHES DEBUG) add_library(${LIBNAME} STATIC ${IMPLFILES}) else(CMAKE_BUILD_TYPE MATCHES RELEASE) add_library(${LIBNAME} SHARED ${IMPLFILES}) endif() include_directories(${MINIMUM_INCLUDE_DIRECTORIES}) set_target_properties(${LIBNAME} PROPERTIES VERSION "${NUISANCE_VERSION_MAJOR}.${NUISANCE_VERSION_MINOR}.${NUISANCE_VERSION_REVISION}") #set_target_properties(${LIBNAME} PROPERTIES LINK_FLAGS ${ROOT_LD_FLAGS}) if(DEFINED PROJECTWIDE_EXTRA_DEPENDENCIES) add_dependencies(${LIBNAME} ${PROJECTWIDE_EXTRA_DEPENDENCIES}) endif() install(TARGETS ${LIBNAME} DESTINATION lib) #Can uncomment this to install the headers... but is it really neccessary? install(FILES ${HEADERFILES} DESTINATION include/ANL) set(MODULETargets ${MODULETargets} ${LIBNAME} PARENT_SCOPE) diff --git a/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.cxx b/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..d223090 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1npip_Evt_1DWNmu_nu.h" + +//******************************************************************** +BNL_CC1npip_Evt_1DWNmu_nu::BNL_CC1npip_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1npip Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_n/BNL_CC1npip_WNmu_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1npip_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pn = event->GetHMFSParticle(2112)->fP; + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + + double hadMass = (Pn+Pmu).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1npip_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.h b/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..a259510 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1NPIP_EVT_1DWNMU_NU_H_SEEN +#define BNL_CC1NPIP_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1npip_Evt_1DWNmu_nu : public Measurement1D { +public: + BNL_CC1npip_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~BNL_CC1npip_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.cxx b/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..867b651 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1npip_Evt_1DWNpi_nu.h" + +//******************************************************************** +BNL_CC1npip_Evt_1DWNpi_nu::BNL_CC1npip_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1npip Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_n/BNL_CC1npip_WNpi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1npip_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pn = event->GetHMFSParticle(2112)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pn+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1npip_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.h b/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..b5d9405 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1NPIP_EVT_1DWNPI_NU_H_SEEN +#define BNL_CC1NPIP_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1npip_Evt_1DWNpi_nu : public Measurement1D { +public: + BNL_CC1npip_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~BNL_CC1npip_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.cxx b/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..3c56224 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1npip_Evt_1DWmupi_nu.h" + +//******************************************************************** +BNL_CC1npip_Evt_1DWmupi_nu::BNL_CC1npip_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1npip Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_n/BNL_CC1npip_Wmupi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1npip_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1npip_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.h b/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..e396d87 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1NPIP_EVT_1DWMUPI_NU_H_SEEN +#define BNL_CC1NPIP_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1npip_Evt_1DWmupi_nu : public Measurement1D { +public: + BNL_CC1npip_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~BNL_CC1npip_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.cxx b/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..d08833a --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1pi0_Evt_1DWNmu_nu.h" + +//******************************************************************** +BNL_CC1pi0_Evt_1DWNmu_nu::BNL_CC1pi0_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1pi0 Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pi0_on_n/BNL_CC1pi0_WNmu_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1pi0_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + + double hadMass = (Pmu+Pp).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1pi0_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.h b/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..24c17bd --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1PPI0_EVT_1DWNMU_NU_H_SEEN +#define BNL_CC1PPI0_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1pi0_Evt_1DWNmu_nu : public Measurement1D { +public: + BNL_CC1pi0_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~BNL_CC1pi0_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.cxx b/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..50b6682 --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1pi0_Evt_1DWNpi_nu.h" + +//******************************************************************** +BNL_CC1pi0_Evt_1DWNpi_nu::BNL_CC1pi0_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1pi0 Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pi0_on_n/BNL_CC1pi0_WNpi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1pi0_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(111)->fP; + + double hadMass = (Pp+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1pi0_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.h b/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..450ad50 --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1PPI0_EVT_1DWNPI_NU_H_SEEN +#define BNL_CC1PPI0_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1pi0_Evt_1DWNpi_nu : public Measurement1D { +public: + BNL_CC1pi0_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~BNL_CC1pi0_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.cxx b/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..a586558 --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1pi0_Evt_1DWmupi_nu.h" + +//******************************************************************** +BNL_CC1pi0_Evt_1DWmupi_nu::BNL_CC1pi0_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1pi0 Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pi0_on_n/BNL_CC1pi0_Wmupi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1pi0_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(111)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1pi0_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.h b/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..eaab58a --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1PPI0_EVT_1DWMUPI_NU_H_SEEN +#define BNL_CC1PPI0_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1pi0_Evt_1DWmupi_nu : public Measurement1D { +public: + BNL_CC1pi0_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~BNL_CC1pi0_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.cxx b/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..3bc4370 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1ppip_Evt_1DWNmu_nu.h" + +//******************************************************************** +BNL_CC1ppip_Evt_1DWNmu_nu::BNL_CC1ppip_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1ppip Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_p/BNL_CC1ppip_WNmu_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1ppip_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + + double hadMass = (Pmu+Pp).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1ppip_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.h b/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..c755487 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1PPIP_EVT_1DWNMU_NU_H_SEEN +#define BNL_CC1PPIP_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1ppip_Evt_1DWNmu_nu : public Measurement1D { +public: + BNL_CC1ppip_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~BNL_CC1ppip_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.cxx b/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..64daf97 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1ppip_Evt_1DWNpi_nu.h" + +//******************************************************************** +BNL_CC1ppip_Evt_1DWNpi_nu::BNL_CC1ppip_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1ppip Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_p/BNL_CC1ppip_WNpi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1ppip_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pp+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1ppip_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.h b/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..5626c03 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1PPIP_EVT_1DWNPI_NU_H_SEEN +#define BNL_CC1PPIP_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1ppip_Evt_1DWNpi_nu : public Measurement1D { +public: + BNL_CC1ppip_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~BNL_CC1ppip_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.cxx b/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..bf04364 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#include "BNL_CC1ppip_Evt_1DWmupi_nu.h" + +//******************************************************************** +BNL_CC1ppip_Evt_1DWmupi_nu::BNL_CC1ppip_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1ppip Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_p/BNL_CC1ppip_Wmupi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1ppip_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1ppip_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.h b/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..0324df4 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret + +/******************************************************************************* +* This file is part of NUISANCE. +* +* NUISANCE is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* NUISANCE is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with NUISANCE. If not, see . +*******************************************************************************/ + +#ifndef BNL_CC1PPIP_EVT_1DWMUPI_NU_H_SEEN +#define BNL_CC1PPIP_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1ppip_Evt_1DWmupi_nu : public Measurement1D { +public: + BNL_CC1ppip_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~BNL_CC1ppip_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/CMakeLists.txt b/src/BNL/CMakeLists.txt index 0bb7faf..cb65d74 100644 --- a/src/BNL/CMakeLists.txt +++ b/src/BNL/CMakeLists.txt @@ -1,65 +1,83 @@ # Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret ################################################################################ # This file is part of NUISANCE. # # NUISANCE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # NUISANCE is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with NUISANCE. If not, see . ################################################################################ set(IMPLFILES BNL_CC1npip_Evt_1DQ2_nu.cxx BNL_CC1npip_XSec_1DEnu_nu.cxx +BNL_CC1npip_Evt_1DWmupi_nu.cxx +BNL_CC1npip_Evt_1DWNpi_nu.cxx +BNL_CC1npip_Evt_1DWNmu_nu.cxx BNL_CC1pi0_Evt_1DQ2_nu.cxx BNL_CC1pi0_XSec_1DEnu_nu.cxx +BNL_CC1pi0_Evt_1DWmupi_nu.cxx +BNL_CC1pi0_Evt_1DWNpi_nu.cxx +BNL_CC1pi0_Evt_1DWNmu_nu.cxx BNL_CC1ppip_Evt_1DQ2_nu.cxx BNL_CC1ppip_XSec_1DEnu_nu.cxx +BNL_CC1ppip_Evt_1DWmupi_nu.cxx +BNL_CC1ppip_Evt_1DWNpi_nu.cxx +BNL_CC1ppip_Evt_1DWNmu_nu.cxx BNL_CCQE_Evt_1DQ2_nu.cxx BNL_CCQE_XSec_1DEnu_nu.cxx BNL_CC1ppip_Evt_1DcosthAdler_nu.cxx BNL_CC1ppip_Evt_1Dphi_nu.cxx ) set(HEADERFILES BNL_CC1npip_Evt_1DQ2_nu.h BNL_CC1npip_XSec_1DEnu_nu.h +BNL_CC1npip_Evt_1DWmupi_nu.h +BNL_CC1npip_Evt_1DWNpi_nu.h +BNL_CC1npip_Evt_1DWNmu_nu.h BNL_CC1pi0_Evt_1DQ2_nu.h BNL_CC1pi0_XSec_1DEnu_nu.h +BNL_CC1pi0_Evt_1DWmupi_nu.h +BNL_CC1pi0_Evt_1DWNpi_nu.h +BNL_CC1pi0_Evt_1DWNmu_nu.h BNL_CC1ppip_Evt_1DQ2_nu.h BNL_CC1ppip_XSec_1DEnu_nu.h +BNL_CC1ppip_Evt_1DWmupi_nu.h +BNL_CC1ppip_Evt_1DWNpi_nu.h +BNL_CC1ppip_Evt_1DWNmu_nu.h BNL_CCQE_Evt_1DQ2_nu.h BNL_CCQE_XSec_1DEnu_nu.h BNL_CC1ppip_Evt_1DcosthAdler_nu.h BNL_CC1ppip_Evt_1Dphi_nu.h ) set(LIBNAME expBNL) if(CMAKE_BUILD_TYPE MATCHES DEBUG) add_library(${LIBNAME} STATIC ${IMPLFILES}) else(CMAKE_BUILD_TYPE MATCHES RELEASE) add_library(${LIBNAME} SHARED ${IMPLFILES}) endif() include_directories(${MINIMUM_INCLUDE_DIRECTORIES}) set_target_properties(${LIBNAME} PROPERTIES VERSION "${NUISANCE_VERSION_MAJOR}.${NUISANCE_VERSION_MINOR}.${NUISANCE_VERSION_REVISION}") #set_target_properties(${LIBNAME} PROPERTIES LINK_FLAGS ${ROOT_LD_FLAGS}) if(DEFINED PROJECTWIDE_EXTRA_DEPENDENCIES) add_dependencies(${LIBNAME} ${PROJECTWIDE_EXTRA_DEPENDENCIES}) endif() install(TARGETS ${LIBNAME} DESTINATION lib) #Can uncomment this to install the headers... but is it really neccessary? #install(FILES ${HEADERFILES} DESTINATION include) set(MODULETargets ${MODULETargets} ${LIBNAME} PARENT_SCOPE) diff --git a/src/FCN/SampleList.cxx b/src/FCN/SampleList.cxx index 4bf7adc..fbfac24 100644 --- a/src/FCN/SampleList.cxx +++ b/src/FCN/SampleList.cxx @@ -1,1477 +1,1531 @@ #include "SampleList.h" #ifndef __NO_ANL__ #include "ANL_CCQE_Evt_1DQ2_nu.h" #include "ANL_CCQE_XSec_1DEnu_nu.h" // ANL CC1ppip #include "ANL_CC1ppip_Evt_1DQ2_nu.h" #include "ANL_CC1ppip_Evt_1DcosmuStar_nu.h" #include "ANL_CC1ppip_Evt_1DcosthAdler_nu.h" #include "ANL_CC1ppip_Evt_1Dphi_nu.h" #include "ANL_CC1ppip_Evt_1Dppi_nu.h" #include "ANL_CC1ppip_Evt_1Dthpr_nu.h" #include "ANL_CC1ppip_XSec_1DEnu_nu.h" #include "ANL_CC1ppip_XSec_1DQ2_nu.h" +#include "ANL_CC1ppip_Evt_1DWNpi_nu.h" +#include "ANL_CC1ppip_Evt_1DWNmu_nu.h" +#include "ANL_CC1ppip_Evt_1DWmupi_nu.h" // ANL CC1npip #include "ANL_CC1npip_Evt_1DQ2_nu.h" #include "ANL_CC1npip_Evt_1DcosmuStar_nu.h" #include "ANL_CC1npip_Evt_1Dppi_nu.h" #include "ANL_CC1npip_XSec_1DEnu_nu.h" +#include "ANL_CC1npip_Evt_1DWNpi_nu.h" +#include "ANL_CC1npip_Evt_1DWNmu_nu.h" +#include "ANL_CC1npip_Evt_1DWmupi_nu.h" // ANL CC1pi0 #include "ANL_CC1pi0_Evt_1DQ2_nu.h" #include "ANL_CC1pi0_Evt_1DcosmuStar_nu.h" #include "ANL_CC1pi0_XSec_1DEnu_nu.h" +#include "ANL_CC1pi0_Evt_1DWNpi_nu.h" +#include "ANL_CC1pi0_Evt_1DWNmu_nu.h" +#include "ANL_CC1pi0_Evt_1DWmupi_nu.h" // ANL NC1npip (mm, exotic!) #include "ANL_NC1npip_Evt_1Dppi_nu.h" // ANL NC1ppim (mm, exotic!) #include "ANL_NC1ppim_Evt_1DcosmuStar_nu.h" #include "ANL_NC1ppim_XSec_1DEnu_nu.h" // ANL CC2pi 1pim1pip (mm, even more exotic!) #include "ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu.h" #include "ANL_CC2pi_1pim1pip_Evt_1Dppim_nu.h" #include "ANL_CC2pi_1pim1pip_Evt_1Dppip_nu.h" #include "ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu.h" #include "ANL_CC2pi_1pim1pip_XSec_1DEnu_nu.h" // ANL CC2pi 1pip1pip (mm, even more exotic!) #include "ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu.h" #include "ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu.h" #include "ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu.h" #include "ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu.h" #include "ANL_CC2pi_1pip1pip_XSec_1DEnu_nu.h" // ANL CC2pi 1pip1pi0 (mm, even more exotic!) #include "ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu.h" #include "ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu.h" #include "ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu.h" #include "ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu.h" #include "ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu.h" #endif #ifndef __NO_ArgoNeuT__ // ArgoNeuT CC1Pi #include "ArgoNeuT_CC1Pi_XSec_1Dpmu_antinu.h" #include "ArgoNeuT_CC1Pi_XSec_1Dpmu_nu.h" #include "ArgoNeuT_CC1Pi_XSec_1Dthetamu_antinu.h" #include "ArgoNeuT_CC1Pi_XSec_1Dthetamu_nu.h" #include "ArgoNeuT_CC1Pi_XSec_1Dthetamupi_antinu.h" #include "ArgoNeuT_CC1Pi_XSec_1Dthetamupi_nu.h" #include "ArgoNeuT_CC1Pi_XSec_1Dthetapi_antinu.h" #include "ArgoNeuT_CC1Pi_XSec_1Dthetapi_nu.h" // ArgoNeuT CC-inclusive #include "ArgoNeuT_CCInc_XSec_1Dpmu_antinu.h" #include "ArgoNeuT_CCInc_XSec_1Dpmu_nu.h" #include "ArgoNeuT_CCInc_XSec_1Dthetamu_antinu.h" #include "ArgoNeuT_CCInc_XSec_1Dthetamu_nu.h" #endif #ifndef __NO_BNL__ // BNL CCQE #include "BNL_CCQE_Evt_1DQ2_nu.h" #include "BNL_CCQE_XSec_1DEnu_nu.h" // BNL CC1ppip #include "BNL_CC1ppip_Evt_1DQ2_nu.h" #include "BNL_CC1ppip_Evt_1DcosthAdler_nu.h" #include "BNL_CC1ppip_Evt_1Dphi_nu.h" #include "BNL_CC1ppip_XSec_1DEnu_nu.h" +#include "BNL_CC1ppip_Evt_1DWNpi_nu.h" +#include "BNL_CC1ppip_Evt_1DWNmu_nu.h" +#include "BNL_CC1ppip_Evt_1DWmupi_nu.h" // BNL CC1npip #include "BNL_CC1npip_Evt_1DQ2_nu.h" #include "BNL_CC1npip_XSec_1DEnu_nu.h" +#include "BNL_CC1npip_Evt_1DWNpi_nu.h" +#include "BNL_CC1npip_Evt_1DWNmu_nu.h" +#include "BNL_CC1npip_Evt_1DWmupi_nu.h" // BNL CC1pi0 #include "BNL_CC1pi0_Evt_1DQ2_nu.h" #include "BNL_CC1pi0_XSec_1DEnu_nu.h" +#include "BNL_CC1pi0_Evt_1DWNpi_nu.h" +#include "BNL_CC1pi0_Evt_1DWNmu_nu.h" +#include "BNL_CC1pi0_Evt_1DWmupi_nu.h" #endif #ifndef __NO_FNAL__ // FNAL CCQE #include "FNAL_CCQE_Evt_1DQ2_nu.h" // FNAL CC1ppip #include "FNAL_CC1ppip_Evt_1DQ2_nu.h" #include "FNAL_CC1ppip_XSec_1DEnu_nu.h" #include "FNAL_CC1ppip_XSec_1DQ2_nu.h" // FNAL CC1ppim #include "FNAL_CC1ppim_XSec_1DEnu_antinu.h" #endif #ifndef __NO_BEBC__ // BEBC CCQE #include "BEBC_CCQE_XSec_1DQ2_nu.h" // BEBC CC1ppip #include "BEBC_CC1ppip_XSec_1DEnu_nu.h" #include "BEBC_CC1ppip_XSec_1DQ2_nu.h" // BEBC CC1npip #include "BEBC_CC1npip_XSec_1DEnu_nu.h" #include "BEBC_CC1npip_XSec_1DQ2_nu.h" // BEBC CC1pi0 #include "BEBC_CC1pi0_XSec_1DEnu_nu.h" #include "BEBC_CC1pi0_XSec_1DQ2_nu.h" // BEBC CC1npim #include "BEBC_CC1npim_XSec_1DEnu_antinu.h" #include "BEBC_CC1npim_XSec_1DQ2_antinu.h" // BEBC CC1ppim #include "BEBC_CC1ppim_XSec_1DEnu_antinu.h" #include "BEBC_CC1ppim_XSec_1DQ2_antinu.h" #endif #ifndef __NO_GGM__ // GGM CC1ppip #include "GGM_CC1ppip_Evt_1DQ2_nu.h" #include "GGM_CC1ppip_XSec_1DEnu_nu.h" #endif #ifndef __NO_MiniBooNE__ // MiniBooNE CCQE #include "MiniBooNE_CCQE_XSec_1DEnu_nu.h" #include "MiniBooNE_CCQE_XSec_1DQ2_antinu.h" #include "MiniBooNE_CCQE_XSec_1DQ2_nu.h" #include "MiniBooNE_CCQE_XSec_2DTcos_antinu.h" #include "MiniBooNE_CCQE_XSec_2DTcos_nu.h" // MiniBooNE CC1pi+ 1D #include "MiniBooNE_CC1pip_XSec_1DEnu_nu.h" #include "MiniBooNE_CC1pip_XSec_1DQ2_nu.h" #include "MiniBooNE_CC1pip_XSec_1DTpi_nu.h" #include "MiniBooNE_CC1pip_XSec_1DTu_nu.h" // MiniBooNE CC1pi+ 2D #include "MiniBooNE_CC1pip_XSec_2DQ2Enu_nu.h" #include "MiniBooNE_CC1pip_XSec_2DTpiCospi_nu.h" #include "MiniBooNE_CC1pip_XSec_2DTpiEnu_nu.h" #include "MiniBooNE_CC1pip_XSec_2DTuCosmu_nu.h" #include "MiniBooNE_CC1pip_XSec_2DTuEnu_nu.h" // MiniBooNE CC1pi0 #include "MiniBooNE_CC1pi0_XSec_1DEnu_nu.h" #include "MiniBooNE_CC1pi0_XSec_1DQ2_nu.h" #include "MiniBooNE_CC1pi0_XSec_1DTu_nu.h" #include "MiniBooNE_CC1pi0_XSec_1Dcosmu_nu.h" #include "MiniBooNE_CC1pi0_XSec_1Dcospi0_nu.h" #include "MiniBooNE_CC1pi0_XSec_1Dppi0_nu.h" #include "MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu.h" #include "MiniBooNE_NC1pi0_XSec_1Dcospi0_nu.h" #include "MiniBooNE_NC1pi0_XSec_1Dppi0_antinu.h" #include "MiniBooNE_NC1pi0_XSec_1Dppi0_nu.h" // MiniBooNE NC1pi0 //#include "MiniBooNE_NCpi0_XSec_1Dppi0_nu.h" // MiniBooNE NCEL #include "MiniBooNE_NCEL_XSec_Treco_nu.h" #endif #ifndef __NO_MicroBooNE__ #include "MicroBooNE_CCInc_XSec_2DPcos_nu.h" #endif #ifndef __NO_MINERvA__ // MINERvA CCQE #include "MINERvA_CCQE_XSec_1DQ2_antinu.h" #include "MINERvA_CCQE_XSec_1DQ2_joint.h" #include "MINERvA_CCQE_XSec_1DQ2_nu.h" // MINERvA CC0pi #include "MINERvA_CC0pi_XSec_1DEe_nue.h" #include "MINERvA_CC0pi_XSec_1DQ2_nu_proton.h" #include "MINERvA_CC0pi_XSec_1DQ2_nue.h" #include "MINERvA_CC0pi_XSec_1DThetae_nue.h" // 2018 MINERvA CC0pi STV #include "MINERvA_CC0pinp_STV_XSec_1D_nu.h" // 2018 MINERvA CC0pi 2D #include "MINERvA_CC0pi_XSec_1D_2018_nu.h" #include "MINERvA_CC0pi_XSec_2D_nu.h" // #include "MINERvA_CC0pi_XSec_3DptpzTp_nu.h" // 2018 MINERvA CC0pi 2D antinu #include "MINERvA_CC0pi_XSec_2D_antinu.h" // MINERvA CC1pi+ #include "MINERvA_CC1pip_XSec_1DTpi_20deg_nu.h" #include "MINERvA_CC1pip_XSec_1DTpi_nu.h" #include "MINERvA_CC1pip_XSec_1Dth_20deg_nu.h" #include "MINERvA_CC1pip_XSec_1Dth_nu.h" // 2017 data update #include "MINERvA_CC1pip_XSec_1D_2017Update.h" // MINERvA CCNpi+ #include "MINERvA_CCNpip_XSec_1DEnu_nu.h" #include "MINERvA_CCNpip_XSec_1DQ2_nu.h" #include "MINERvA_CCNpip_XSec_1DTpi_nu.h" #include "MINERvA_CCNpip_XSec_1Dpmu_nu.h" #include "MINERvA_CCNpip_XSec_1Dth_nu.h" #include "MINERvA_CCNpip_XSec_1Dthmu_nu.h" // MINERvA CC1pi0 #include "MINERvA_CC1pi0_XSec_1DEnu_antinu.h" #include "MINERvA_CC1pi0_XSec_1DQ2_antinu.h" #include "MINERvA_CC1pi0_XSec_1DTpi0_antinu.h" #include "MINERvA_CC1pi0_XSec_1Dpmu_antinu.h" #include "MINERvA_CC1pi0_XSec_1Dppi0_antinu.h" #include "MINERvA_CC1pi0_XSec_1Dth_antinu.h" #include "MINERvA_CC1pi0_XSec_1Dthmu_antinu.h" // MINERvA CC1pi0 neutrino #include "MINERvA_CC1pi0_XSec_1D_nu.h" // MINERvA CCINC #include "MINERvA_CCinc_XSec_1DEnu_ratio.h" #include "MINERvA_CCinc_XSec_1Dx_ratio.h" #include "MINERvA_CCinc_XSec_2DEavq3_nu.h" // MINERvA CCDIS #include "MINERvA_CCDIS_XSec_1DEnu_ratio.h" #include "MINERvA_CCDIS_XSec_1Dx_ratio.h" // MINERvA CCCOH pion #include "MINERvA_CCCOHPI_XSec_1DEnu_antinu.h" #include "MINERvA_CCCOHPI_XSec_1DEpi_antinu.h" #include "MINERvA_CCCOHPI_XSec_1DQ2_antinu.h" #include "MINERvA_CCCOHPI_XSec_1DEpi_nu.h" #include "MINERvA_CCCOHPI_XSec_1DQ2_nu.h" #include "MINERvA_CCCOHPI_XSec_1Dth_nu.h" #include "MINERvA_CCCOHPI_XSec_joint.h" #include "MINERvA_CC0pi_XSec_1DQ2_TgtRatio_nu.h" #include "MINERvA_CC0pi_XSec_1DQ2_Tgt_nu.h" #endif #ifndef __NO_T2K__ // T2K CC0pi 2016 #include "T2K_CC0pi_XSec_2DPcos_nu_I.h" #include "T2K_CC0pi_XSec_2DPcos_nu_II.h" // T2K CC0pi 2020 arXiv:1908.10249 #include "T2K_CC0pi_XSec_H2O_2DPcos_anu.h" // T2K CC0pi 2020 arXiv:2004.05434 #include "T2K_NuMu_CC0pi_OC_XSec_2DPcos.h" #include "T2K_NuMu_CC0pi_OC_XSec_2DPcos_joint.h" // T2K CC0pi 2020 arXiv:2002.09323 #include "T2K_NuMuAntiNuMu_CC0pi_CH_XSec_2DPcos.h" #include "T2K_NuMuAntiNuMu_CC0pi_CH_XSec_2DPcos_joint.h" // T2K CC-inclusive with full acceptance 2018 #include "T2K_CCinc_XSec_2DPcos_nu_nonuniform.h" // T2K nue CC-inclusive 2019 #include "T2K_nueCCinc_XSec_1Dpe.h" #include "T2K_nueCCinc_XSec_1Dthe.h" #include "T2K_nueCCinc_XSec_1Dpe_joint.h" #include "T2K_nueCCinc_XSec_1Dthe_joint.h" #include "T2K_nueCCinc_XSec_joint.h" // T2K STV CC0pi 2018 #include "T2K_CC0piWithProtons_XSec_2018_multidif_0p_1p_Np.h" #include "T2K_CC0pinp_STV_XSec_1Ddat_nu.h" #include "T2K_CC0pinp_STV_XSec_1Ddphit_nu.h" #include "T2K_CC0pinp_STV_XSec_1Ddpt_nu.h" #include "T2K_CC0pinp_ifk_XSec_3Dinfa_nu.h" #include "T2K_CC0pinp_ifk_XSec_3Dinfip_nu.h" #include "T2K_CC0pinp_ifk_XSec_3Dinfp_nu.h" // T2K CC1pi+ on CH #include "T2K_CC1pip_CH_XSec_1DAdlerPhi_nu.h" #include "T2K_CC1pip_CH_XSec_1DCosThAdler_nu.h" #include "T2K_CC1pip_CH_XSec_1DQ2_nu.h" #include "T2K_CC1pip_CH_XSec_1Dppi_nu.h" #include "T2K_CC1pip_CH_XSec_1Dthmupi_nu.h" #include "T2K_CC1pip_CH_XSec_1Dthpi_nu.h" #include "T2K_CC1pip_CH_XSec_2Dpmucosmu_nu.h" // T2K CC1pi+ on H2O #include "T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.h" #include "T2K_CC1pip_H2O_XSec_1DEnuMB_nu.h" #include "T2K_CC1pip_H2O_XSec_1Dcosmu_nu.h" #include "T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.h" #include "T2K_CC1pip_H2O_XSec_1Dcospi_nu.h" #include "T2K_CC1pip_H2O_XSec_1Dpmu_nu.h" #include "T2K_CC1pip_H2O_XSec_1Dppi_nu.h" // add header here #endif #ifndef __NO_SciBooNE__ // SciBooNE COH studies #include "SciBooNE_CCCOH_1TRK_1DQ2_nu.h" #include "SciBooNE_CCCOH_1TRK_1Dpmu_nu.h" #include "SciBooNE_CCCOH_1TRK_1Dthetamu_nu.h" #include "SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu.h" #include "SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu.h" #include "SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu.h" #include "SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu.h" #include "SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu.h" #include "SciBooNE_CCCOH_MuPiVA_1DQ2_nu.h" #include "SciBooNE_CCCOH_MuPiVA_1Dpmu_nu.h" #include "SciBooNE_CCCOH_MuPiVA_1Dthetamu_nu.h" #include "SciBooNE_CCCOH_MuPr_1DQ2_nu.h" #include "SciBooNE_CCCOH_MuPr_1Dpmu_nu.h" #include "SciBooNE_CCCOH_MuPr_1Dthetamu_nu.h" #include "SciBooNE_CCCOH_STOPFINAL_1DQ2_nu.h" #include "SciBooNE_CCCOH_STOP_NTrks_nu.h" #include "SciBooNE_CCInc_XSec_1DEnu_nu.h" #endif #ifndef __NO_K2K__ // K2K NC1pi0 #include "K2K_NC1pi0_Evt_1Dppi0_nu.h" #endif // MC Studies #include "ExpMultDist_CCQE_XSec_1DVar_FakeStudy.h" #include "ExpMultDist_CCQE_XSec_2DVar_FakeStudy.h" #include "MCStudy_CCQEHistograms.h" #include "GenericFlux_Tester.h" #include "GenericFlux_Vectors.h" #include "ElectronFlux_FlatTree.h" #include "ElectronScattering_DurhamData.h" #include "MCStudy_KaonPreSelection.h" #include "MCStudy_MuonValidation.h" #include "OfficialNIWGPlots.h" #include "T2K2017_FakeData.h" #include "SigmaEnuHists.h" #include "Simple_Osc.h" #include "Smear_SVDUnfold_Propagation_Osc.h" #include "FitWeight.h" #include "NuisConfig.h" #include "NuisKey.h" #ifdef __USE_DYNSAMPLES__ #include "TRegexp.h" #include // linux #include DynamicSampleFactory::DynamicSampleFactory() : NSamples(0), NManifests(0) { LoadPlugins(); NUIS_LOG(FIT, "Loaded " << NSamples << " from " << NManifests << " shared object libraries."); } DynamicSampleFactory *DynamicSampleFactory::glblDSF = NULL; DynamicSampleFactory::PluginManifest::~PluginManifest() { for (size_t i_it = 0; i_it < Instances.size(); ++i_it) { (*(DSF_DestroySample))(Instances[i_it]); } } std::string EnsureTrailingSlash(std::string const &inp) { if (!inp.length()) { return "/"; } if (inp[inp.length() - 1] == '/') { return inp; } return inp + "/"; } void DynamicSampleFactory::LoadPlugins() { std::vector SearchDirectories; if (Config::HasPar("dynamic_sample.path")) { SearchDirectories = GeneralUtils::ParseToStr(Config::GetParS("dynamic_sample.path"), ":"); } char const *envPath = getenv("NUISANCE_DS_PATH"); if (envPath) { std::vector envPaths = GeneralUtils::ParseToStr(envPath, ":"); for (size_t ep_it = 0; ep_it < envPaths.size(); ++ep_it) { SearchDirectories.push_back(envPaths[ep_it]); } } if (!SearchDirectories.size()) { char const *pwdPath = getenv("PWD"); if (pwdPath) { SearchDirectories.push_back(pwdPath); } } for (size_t sp_it = 0; sp_it < SearchDirectories.size(); ++sp_it) { std::string dirpath = EnsureTrailingSlash(SearchDirectories[sp_it]); NUIS_LOG(FIT, "Searching for dynamic sample manifests in: " << dirpath); Ssiz_t len = 0; DIR *dir; struct dirent *ent; dir = opendir(dirpath.c_str()); if (dir != NULL) { TRegexp matchExp("*.so", true); while ((ent = readdir(dir)) != NULL) { if (matchExp.Index(TString(ent->d_name), &len) != Ssiz_t(-1)) { NUIS_LOG(FIT, "\tFound shared object: " << ent->d_name << " checking for relevant methods..."); void *dlobj = dlopen((dirpath + ent->d_name).c_str(), RTLD_NOW | RTLD_GLOBAL); char const *dlerr_cstr = dlerror(); std::string dlerr; if (dlerr_cstr) { dlerr = dlerr_cstr; } if (dlerr.length()) { NUIS_ERR(WRN, "\tDL Load Error: " << dlerr); continue; } PluginManifest plgManif; plgManif.dllib = dlobj; plgManif.soloc = (dirpath + ent->d_name); plgManif.DSF_NSamples = reinterpret_cast(dlsym(dlobj, "DSF_NSamples")); dlerr = ""; dlerr_cstr = dlerror(); if (dlerr_cstr) { dlerr = dlerr_cstr; } if (dlerr.length()) { NUIS_ERR(WRN, "\tFailed to load symbol \"DSF_NSamples\" from " << (dirpath + ent->d_name) << ": " << dlerr); dlclose(dlobj); continue; } plgManif.DSF_GetSampleName = reinterpret_cast( dlsym(dlobj, "DSF_GetSampleName")); dlerr = ""; dlerr_cstr = dlerror(); if (dlerr_cstr) { dlerr = dlerr_cstr; } if (dlerr.length()) { NUIS_ERR(WRN, "\tFailed to load symbol \"DSF_GetSampleName\" from " << (dirpath + ent->d_name) << ": " << dlerr); dlclose(dlobj); continue; } plgManif.DSF_GetSample = reinterpret_cast( dlsym(dlobj, "DSF_GetSample")); dlerr = ""; dlerr_cstr = dlerror(); if (dlerr_cstr) { dlerr = dlerr_cstr; } if (dlerr.length()) { NUIS_ERR(WRN, "\tFailed to load symbol \"DSF_GetSample\" from " << (dirpath + ent->d_name) << ": " << dlerr); dlclose(dlobj); continue; } plgManif.DSF_DestroySample = reinterpret_cast( dlsym(dlobj, "DSF_DestroySample")); dlerr = ""; dlerr_cstr = dlerror(); if (dlerr_cstr) { dlerr = dlerr_cstr; } if (dlerr.length()) { NUIS_ERR(WRN, "Failed to load symbol \"DSF_DestroySample\" from " << (dirpath + ent->d_name) << ": " << dlerr); dlclose(dlobj); continue; } plgManif.NSamples = (*(plgManif.DSF_NSamples))(); NUIS_LOG(FIT, "\tSuccessfully loaded dynamic sample manifest: " << plgManif.soloc << ". Contains " << plgManif.NSamples << " samples."); for (size_t smp_it = 0; smp_it < plgManif.NSamples; ++smp_it) { char const *smp_name = (*(plgManif.DSF_GetSampleName))(smp_it); if (!smp_name) { NUIS_ABORT("Could not load sample " << smp_it << " / " << plgManif.NSamples << " from " << plgManif.soloc); } if (Samples.count(smp_name)) { NUIS_ERR(WRN, "Already loaded a sample named: \"" << smp_name << "\". cannot load duplciates. This " "sample will be skipped."); continue; } plgManif.SamplesProvided.push_back(smp_name); Samples[smp_name] = std::make_pair(plgManif.soloc, smp_it); NUIS_LOG(FIT, "\t\t" << smp_name); } if (plgManif.SamplesProvided.size()) { Manifests[plgManif.soloc] = plgManif; NSamples += plgManif.SamplesProvided.size(); NManifests++; } else { dlclose(dlobj); } } } closedir(dir); } else { NUIS_ERR(WRN, "Tried to open non-existant directory."); } } } DynamicSampleFactory &DynamicSampleFactory::Get() { if (!glblDSF) { glblDSF = new DynamicSampleFactory(); } return *glblDSF; } void DynamicSampleFactory::Print() { std::map > ManifestSamples; for (std::map >::iterator smp_it = Samples.begin(); smp_it != Samples.end(); ++smp_it) { if (!ManifestSamples.count(smp_it->second.first)) { ManifestSamples[smp_it->second.first] = std::vector(); } ManifestSamples[smp_it->second.first].push_back(smp_it->first); } NUIS_LOG(FIT, "Dynamic sample manifest: "); for (std::map >::iterator m_it = ManifestSamples.begin(); m_it != ManifestSamples.end(); ++m_it) { NUIS_LOG(FIT, "\tLibrary " << m_it->first << " contains: "); for (size_t s_it = 0; s_it < m_it->second.size(); ++s_it) { NUIS_LOG(FIT, "\t\t" << m_it->second[s_it]); } } } bool DynamicSampleFactory::HasSample(std::string const &name) { return Samples.count(name); } bool DynamicSampleFactory::HasSample(nuiskey &samplekey) { return HasSample(samplekey.GetS("name")); } MeasurementBase *DynamicSampleFactory::CreateSample(nuiskey &samplekey) { if (!HasSample(samplekey)) { NUIS_ERR(WRN, "Asked to load unknown sample: \"" << samplekey.GetS("name") << "\"."); return NULL; } std::pair sample = Samples[samplekey.GetS("name")]; NUIS_LOG(SAM, "\tLoading sample " << sample.second << " from " << sample.first); return (*(Manifests[sample.first].DSF_GetSample))(sample.second, &samplekey); } DynamicSampleFactory::~DynamicSampleFactory() { Manifests.clear(); } #endif //! Functions to make it easier for samples to be created and handled. namespace SampleUtils { //! Create a given sample given its name, file, type, fakdata(fkdt) file and the //! current rw engine and push it back into the list fChain. MeasurementBase *CreateSample(std::string name, std::string file, std::string type, std::string fkdt, FitWeight *rw) { nuiskey samplekey = Config::CreateKey("sample"); samplekey.Set("name", name); samplekey.Set("input", file); samplekey.Set("type", type); return CreateSample(samplekey); } MeasurementBase *CreateSample(nuiskey samplekey) { #ifdef __USE_DYNSAMPLES__ if (DynamicSampleFactory::Get().HasSample(samplekey)) { NUIS_LOG(SAM, "Instantiating dynamic sample..."); MeasurementBase *ds = DynamicSampleFactory::Get().CreateSample(samplekey); if (ds) { NUIS_LOG(SAM, "Done."); return ds; } NUIS_ABORT("Failed to instantiate dynamic sample."); } #endif FitWeight *rw = FitBase::GetRW(); std::string name = samplekey.GetS("name"); std::string file = samplekey.GetS("input"); std::string type = samplekey.GetS("type"); std::string fkdt = ""; /* ANL CCQE Samples */ #ifndef __NO_ANL__ if (!name.compare("ANL_CCQE_XSec_1DEnu_nu") || !name.compare("ANL_CCQE_XSec_1DEnu_nu_PRD26") || !name.compare("ANL_CCQE_XSec_1DEnu_nu_PRL31") || !name.compare("ANL_CCQE_XSec_1DEnu_nu_PRD16")) { return (new ANL_CCQE_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("ANL_CCQE_Evt_1DQ2_nu") || !name.compare("ANL_CCQE_Evt_1DQ2_nu_PRL31") || !name.compare("ANL_CCQE_Evt_1DQ2_nu_PRD26") || !name.compare("ANL_CCQE_Evt_1DQ2_nu_PRD16")) { return (new ANL_CCQE_Evt_1DQ2_nu(samplekey)); /* ANL CC1ppip samples */ } else if (!name.compare("ANL_CC1ppip_XSec_1DEnu_nu") || !name.compare("ANL_CC1ppip_XSec_1DEnu_nu_W14Cut") || !name.compare("ANL_CC1ppip_XSec_1DEnu_nu_Uncorr") || !name.compare("ANL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr") || !name.compare("ANL_CC1ppip_XSec_1DEnu_nu_W16Cut_Uncorr")) { return (new ANL_CC1ppip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("ANL_CC1ppip_XSec_1DQ2_nu")) { return (new ANL_CC1ppip_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("ANL_CC1ppip_Evt_1DQ2_nu") || !name.compare("ANL_CC1ppip_Evt_1DQ2_nu_W14Cut")) { return (new ANL_CC1ppip_Evt_1DQ2_nu(samplekey)); } else if (!name.compare("ANL_CC1ppip_Evt_1Dppi_nu")) { return (new ANL_CC1ppip_Evt_1Dppi_nu(samplekey)); } else if (!name.compare("ANL_CC1ppip_Evt_1Dthpr_nu")) { return (new ANL_CC1ppip_Evt_1Dthpr_nu(samplekey)); } else if (!name.compare("ANL_CC1ppip_Evt_1DcosmuStar_nu")) { return (new ANL_CC1ppip_Evt_1DcosmuStar_nu(samplekey)); } else if (!name.compare("ANL_CC1ppip_Evt_1DcosthAdler_nu")) { return (new ANL_CC1ppip_Evt_1DcosthAdler_nu(samplekey)); } else if (!name.compare("ANL_CC1ppip_Evt_1Dphi_nu")) { return (new ANL_CC1ppip_Evt_1Dphi_nu(samplekey)); + } else if (!name.compare("ANL_CC1ppip_Evt_1DWNpi_nu")) { + return (new ANL_CC1ppip_Evt_1DWNpi_nu(samplekey)); + } else if (!name.compare("ANL_CC1ppip_Evt_1DWNmu_nu")) { + return (new ANL_CC1ppip_Evt_1DWNmu_nu(samplekey)); + } else if (!name.compare("ANL_CC1ppip_Evt_1DWmupi_nu")) { + return (new ANL_CC1ppip_Evt_1DWmupi_nu(samplekey)); /* ANL CC1npip sample */ } else if (!name.compare("ANL_CC1npip_XSec_1DEnu_nu") || !name.compare("ANL_CC1npip_XSec_1DEnu_nu_W14Cut") || !name.compare("ANL_CC1npip_XSec_1DEnu_nu_Uncorr") || !name.compare("ANL_CC1npip_XSec_1DEnu_nu_W14Cut_Uncorr") || !name.compare("ANL_CC1npip_XSec_1DEnu_nu_W16Cut_Uncorr")) { return (new ANL_CC1npip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("ANL_CC1npip_Evt_1DQ2_nu") || !name.compare("ANL_CC1npip_Evt_1DQ2_nu_W14Cut")) { return (new ANL_CC1npip_Evt_1DQ2_nu(samplekey)); } else if (!name.compare("ANL_CC1npip_Evt_1Dppi_nu")) { return (new ANL_CC1npip_Evt_1Dppi_nu(samplekey)); } else if (!name.compare("ANL_CC1npip_Evt_1DcosmuStar_nu")) { return (new ANL_CC1npip_Evt_1DcosmuStar_nu(samplekey)); + } else if (!name.compare("ANL_CC1npip_Evt_1DWNpi_nu")) { + return (new ANL_CC1npip_Evt_1DWNpi_nu(samplekey)); + } else if (!name.compare("ANL_CC1npip_Evt_1DWNmu_nu")) { + return (new ANL_CC1npip_Evt_1DWNmu_nu(samplekey)); + } else if (!name.compare("ANL_CC1npip_Evt_1DWmupi_nu")) { + return (new ANL_CC1npip_Evt_1DWmupi_nu(samplekey)); /* ANL CC1pi0 sample */ } else if (!name.compare("ANL_CC1pi0_XSec_1DEnu_nu") || !name.compare("ANL_CC1pi0_XSec_1DEnu_nu_W14Cut") || !name.compare("ANL_CC1pi0_XSec_1DEnu_nu_Uncorr") || !name.compare("ANL_CC1pi0_XSec_1DEnu_nu_W14Cut_Uncorr") || !name.compare("ANL_CC1pi0_XSec_1DEnu_nu_W16Cut_Uncorr")) { return (new ANL_CC1pi0_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("ANL_CC1pi0_Evt_1DQ2_nu") || !name.compare("ANL_CC1pi0_Evt_1DQ2_nu_W14Cut")) { return (new ANL_CC1pi0_Evt_1DQ2_nu(samplekey)); } else if (!name.compare("ANL_CC1pi0_Evt_1DcosmuStar_nu")) { return (new ANL_CC1pi0_Evt_1DcosmuStar_nu(samplekey)); + } else if (!name.compare("ANL_CC1pi0_Evt_1DWNpi_nu")) { + return (new ANL_CC1pi0_Evt_1DWNpi_nu(samplekey)); + } else if (!name.compare("ANL_CC1pi0_Evt_1DWNmu_nu")) { + return (new ANL_CC1pi0_Evt_1DWNmu_nu(samplekey)); + } else if (!name.compare("ANL_CC1pi0_Evt_1DWmupi_nu")) { + return (new ANL_CC1pi0_Evt_1DWmupi_nu(samplekey)); /* ANL NC1npip sample */ } else if (!name.compare("ANL_NC1npip_Evt_1Dppi_nu")) { return (new ANL_NC1npip_Evt_1Dppi_nu(samplekey)); /* ANL NC1ppim sample */ } else if (!name.compare("ANL_NC1ppim_XSec_1DEnu_nu")) { return (new ANL_NC1ppim_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("ANL_NC1ppim_Evt_1DcosmuStar_nu")) { return (new ANL_NC1ppim_Evt_1DcosmuStar_nu(samplekey)); /* ANL CC2pi sample */ } else if (!name.compare("ANL_CC2pi_1pim1pip_XSec_1DEnu_nu")) { return (new ANL_CC2pi_1pim1pip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu")) { return (new ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pim1pip_Evt_1Dppip_nu")) { return (new ANL_CC2pi_1pim1pip_Evt_1Dppip_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pim1pip_Evt_1Dppim_nu")) { return (new ANL_CC2pi_1pim1pip_Evt_1Dppim_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu")) { return (new ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pip_XSec_1DEnu_nu")) { return (new ANL_CC2pi_1pip1pip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu")) { return (new ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu")) { return (new ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu")) { return (new ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu")) { return (new ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu")) { return (new ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu")) { return (new ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu")) { return (new ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu")) { return (new ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu(samplekey)); } else if (!name.compare("ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu")) { return (new ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu(samplekey)); /* ArgoNeut Samples */ } else #endif #ifndef __NO_ArgoNeuT__ - if (!name.compare("ArgoNeuT_CCInc_XSec_1Dpmu_antinu")) { - return (new ArgoNeuT_CCInc_XSec_1Dpmu_antinu(samplekey)); - } else if (!name.compare("ArgoNeuT_CCInc_XSec_1Dpmu_nu")) { - return (new ArgoNeuT_CCInc_XSec_1Dpmu_nu(samplekey)); + if (!name.compare("ArgoNeuT_CCInc_XSec_1Dpmu_antinu")) { + return (new ArgoNeuT_CCInc_XSec_1Dpmu_antinu(samplekey)); + } else if (!name.compare("ArgoNeuT_CCInc_XSec_1Dpmu_nu")) { + return (new ArgoNeuT_CCInc_XSec_1Dpmu_nu(samplekey)); } else if (!name.compare("ArgoNeuT_CCInc_XSec_1Dthetamu_antinu")) { return (new ArgoNeuT_CCInc_XSec_1Dthetamu_antinu(samplekey)); } else if (!name.compare("ArgoNeuT_CCInc_XSec_1Dthetamu_nu")) { return (new ArgoNeuT_CCInc_XSec_1Dthetamu_nu(samplekey)); } else if (!name.compare("ArgoNeuT_CC1Pi_XSec_1Dpmu_nu")) { return (new ArgoNeuT_CC1Pi_XSec_1Dpmu_nu(samplekey)); } else if (!name.compare("ArgoNeuT_CC1Pi_XSec_1Dthetamu_nu")) { return (new ArgoNeuT_CC1Pi_XSec_1Dthetamu_nu(samplekey)); } else if (!name.compare("ArgoNeuT_CC1Pi_XSec_1Dthetapi_nu")) { return (new ArgoNeuT_CC1Pi_XSec_1Dthetapi_nu(samplekey)); } else if (!name.compare("ArgoNeuT_CC1Pi_XSec_1Dthetamupi_nu")) { return (new ArgoNeuT_CC1Pi_XSec_1Dthetamupi_nu(samplekey)); } else if (!name.compare("ArgoNeuT_CC1Pi_XSec_1Dpmu_antinu")) { return (new ArgoNeuT_CC1Pi_XSec_1Dpmu_antinu(samplekey)); } else if (!name.compare("ArgoNeuT_CC1Pi_XSec_1Dthetamu_antinu")) { return (new ArgoNeuT_CC1Pi_XSec_1Dthetamu_antinu(samplekey)); } else if (!name.compare("ArgoNeuT_CC1Pi_XSec_1Dthetapi_antinu")) { return (new ArgoNeuT_CC1Pi_XSec_1Dthetapi_antinu(samplekey)); } else if (!name.compare("ArgoNeuT_CC1Pi_XSec_1Dthetamupi_antinu")) { return (new ArgoNeuT_CC1Pi_XSec_1Dthetamupi_antinu(samplekey)); /* BNL Samples */ } else #endif #ifndef __NO_BNL__ if (!name.compare("BNL_CCQE_XSec_1DEnu_nu")) { return (new BNL_CCQE_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("BNL_CCQE_Evt_1DQ2_nu")) { return (new BNL_CCQE_Evt_1DQ2_nu(samplekey)); /* BNL CC1ppip samples */ } else if (!name.compare("BNL_CC1ppip_XSec_1DEnu_nu") || !name.compare("BNL_CC1ppip_XSec_1DEnu_nu_Uncorr") || !name.compare("BNL_CC1ppip_XSec_1DEnu_nu_W14Cut") || !name.compare("BNL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr")) { return (new BNL_CC1ppip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("BNL_CC1ppip_Evt_1DQ2_nu") || !name.compare("BNL_CC1ppip_Evt_1DQ2_nu_W14Cut")) { return (new BNL_CC1ppip_Evt_1DQ2_nu(samplekey)); } else if (!name.compare("BNL_CC1ppip_Evt_1DcosthAdler_nu")) { return (new BNL_CC1ppip_Evt_1DcosthAdler_nu(samplekey)); } else if (!name.compare("BNL_CC1ppip_Evt_1Dphi_nu")) { return (new BNL_CC1ppip_Evt_1Dphi_nu(samplekey)); + } else if (!name.compare("BNL_CC1ppip_Evt_1DWNpi_nu")) { + return (new BNL_CC1ppip_Evt_1DWNpi_nu(samplekey)); + } else if (!name.compare("BNL_CC1ppip_Evt_1DWNmu_nu")) { + return (new BNL_CC1ppip_Evt_1DWNmu_nu(samplekey)); + } else if (!name.compare("BNL_CC1ppip_Evt_1DWmupi_nu")) { + return (new BNL_CC1ppip_Evt_1DWmupi_nu(samplekey)); /* BNL CC1npip samples */ } else if (!name.compare("BNL_CC1npip_XSec_1DEnu_nu") || !name.compare("BNL_CC1npip_XSec_1DEnu_nu_Uncorr")) { return (new BNL_CC1npip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("BNL_CC1npip_Evt_1DQ2_nu")) { return (new BNL_CC1npip_Evt_1DQ2_nu(samplekey)); + } else if (!name.compare("BNL_CC1npip_Evt_1DWNpi_nu")) { + return (new BNL_CC1npip_Evt_1DWNpi_nu(samplekey)); + } else if (!name.compare("BNL_CC1npip_Evt_1DWNmu_nu")) { + return (new BNL_CC1npip_Evt_1DWNmu_nu(samplekey)); + } else if (!name.compare("BNL_CC1npip_Evt_1DWmupi_nu")) { + return (new BNL_CC1npip_Evt_1DWmupi_nu(samplekey)); /* BNL CC1pi0 samples */ } else if (!name.compare("BNL_CC1pi0_XSec_1DEnu_nu")) { return (new BNL_CC1pi0_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("BNL_CC1pi0_Evt_1DQ2_nu")) { return (new BNL_CC1pi0_Evt_1DQ2_nu(samplekey)); + } else if (!name.compare("BNL_CC1pi0_Evt_1DWNpi_nu")) { + return (new BNL_CC1pi0_Evt_1DWNpi_nu(samplekey)); + } else if (!name.compare("BNL_CC1pi0_Evt_1DWNmu_nu")) { + return (new BNL_CC1pi0_Evt_1DWNmu_nu(samplekey)); + } else if (!name.compare("BNL_CC1pi0_Evt_1DWmupi_nu")) { + return (new BNL_CC1pi0_Evt_1DWmupi_nu(samplekey)); /* FNAL Samples */ } else #endif #ifndef __NO_FNAL__ if (!name.compare("FNAL_CCQE_Evt_1DQ2_nu")) { return (new FNAL_CCQE_Evt_1DQ2_nu(samplekey)); /* FNAL CC1ppip */ } else if (!name.compare("FNAL_CC1ppip_XSec_1DEnu_nu")) { return (new FNAL_CC1ppip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("FNAL_CC1ppip_XSec_1DQ2_nu")) { return (new FNAL_CC1ppip_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("FNAL_CC1ppip_Evt_1DQ2_nu")) { return (new FNAL_CC1ppip_Evt_1DQ2_nu(samplekey)); /* FNAL CC1ppim */ } else if (!name.compare("FNAL_CC1ppim_XSec_1DEnu_antinu")) { return (new FNAL_CC1ppim_XSec_1DEnu_antinu(samplekey)); /* BEBC Samples */ } else #endif #ifndef __NO_BEBC__ if (!name.compare("BEBC_CCQE_XSec_1DQ2_nu")) { return (new BEBC_CCQE_XSec_1DQ2_nu(samplekey)); /* BEBC CC1ppip samples */ } else if (!name.compare("BEBC_CC1ppip_XSec_1DEnu_nu")) { return (new BEBC_CC1ppip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("BEBC_CC1ppip_XSec_1DQ2_nu")) { return (new BEBC_CC1ppip_XSec_1DQ2_nu(samplekey)); /* BEBC CC1npip samples */ } else if (!name.compare("BEBC_CC1npip_XSec_1DEnu_nu")) { return (new BEBC_CC1npip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("BEBC_CC1npip_XSec_1DQ2_nu")) { return (new BEBC_CC1npip_XSec_1DQ2_nu(samplekey)); /* BEBC CC1pi0 samples */ } else if (!name.compare("BEBC_CC1pi0_XSec_1DEnu_nu")) { return (new BEBC_CC1pi0_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("BEBC_CC1pi0_XSec_1DQ2_nu")) { return (new BEBC_CC1pi0_XSec_1DQ2_nu(samplekey)); /* BEBC CC1npim samples */ } else if (!name.compare("BEBC_CC1npim_XSec_1DEnu_antinu")) { return (new BEBC_CC1npim_XSec_1DEnu_antinu(samplekey)); } else if (!name.compare("BEBC_CC1npim_XSec_1DQ2_antinu")) { return (new BEBC_CC1npim_XSec_1DQ2_antinu(samplekey)); /* BEBC CC1ppim samples */ } else if (!name.compare("BEBC_CC1ppim_XSec_1DEnu_antinu")) { return (new BEBC_CC1ppim_XSec_1DEnu_antinu(samplekey)); } else if (!name.compare("BEBC_CC1ppim_XSec_1DQ2_antinu")) { return (new BEBC_CC1ppim_XSec_1DQ2_antinu(samplekey)); /* GGM CC1ppip samples */ } else #endif #ifndef __NO_GGM__ if (!name.compare("GGM_CC1ppip_XSec_1DEnu_nu")) { return (new GGM_CC1ppip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("GGM_CC1ppip_Evt_1DQ2_nu")) { return (new GGM_CC1ppip_Evt_1DQ2_nu(samplekey)); /* MiniBooNE Samples */ /* CCQE */ } else #endif #ifndef __NO_MiniBooNE__ if (!name.compare("MiniBooNE_CCQE_XSec_1DQ2_nu") || !name.compare("MiniBooNE_CCQELike_XSec_1DQ2_nu")) { return (new MiniBooNE_CCQE_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("MiniBooNE_CCQE_XSec_1DEnu_nu") || !name.compare("MiniBooNE_CCQELike_XSec_1DEnu_nu")) { return (new MiniBooNE_CCQE_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("MiniBooNE_CCQE_XSec_1DQ2_antinu") || !name.compare("MiniBooNE_CCQELike_XSec_1DQ2_antinu") || !name.compare("MiniBooNE_CCQE_CTarg_XSec_1DQ2_antinu")) { return (new MiniBooNE_CCQE_XSec_1DQ2_antinu(samplekey)); } else if (!name.compare("MiniBooNE_CCQE_XSec_2DTcos_nu") || !name.compare("MiniBooNE_CCQELike_XSec_2DTcos_nu")) { return (new MiniBooNE_CCQE_XSec_2DTcos_nu(samplekey)); } else if (!name.compare("MiniBooNE_CCQE_XSec_2DTcos_antinu") || !name.compare("MiniBooNE_CCQELike_XSec_2DTcos_antinu")) { return (new MiniBooNE_CCQE_XSec_2DTcos_antinu(samplekey)); /* MiniBooNE CC1pi+ */ // 1D } else if (!name.compare("MiniBooNE_CC1pip_XSec_1DEnu_nu")) { return (new MiniBooNE_CC1pip_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pip_XSec_1DQ2_nu")) { return (new MiniBooNE_CC1pip_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pip_XSec_1DTpi_nu")) { return (new MiniBooNE_CC1pip_XSec_1DTpi_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pip_XSec_1DTu_nu")) { return (new MiniBooNE_CC1pip_XSec_1DTu_nu(samplekey)); // 2D } else if (!name.compare("MiniBooNE_CC1pip_XSec_2DQ2Enu_nu")) { return (new MiniBooNE_CC1pip_XSec_2DQ2Enu_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pip_XSec_2DTpiCospi_nu")) { return (new MiniBooNE_CC1pip_XSec_2DTpiCospi_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pip_XSec_2DTpiEnu_nu")) { return (new MiniBooNE_CC1pip_XSec_2DTpiEnu_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pip_XSec_2DTuCosmu_nu")) { return (new MiniBooNE_CC1pip_XSec_2DTuCosmu_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pip_XSec_2DTuEnu_nu")) { return (new MiniBooNE_CC1pip_XSec_2DTuEnu_nu(samplekey)); /* MiniBooNE CC1pi0 */ } else if (!name.compare("MiniBooNE_CC1pi0_XSec_1DEnu_nu")) { return (new MiniBooNE_CC1pi0_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pi0_XSec_1DQ2_nu")) { return (new MiniBooNE_CC1pi0_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pi0_XSec_1DTu_nu")) { return (new MiniBooNE_CC1pi0_XSec_1DTu_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pi0_XSec_1Dcosmu_nu")) { return (new MiniBooNE_CC1pi0_XSec_1Dcosmu_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pi0_XSec_1Dcospi0_nu")) { return (new MiniBooNE_CC1pi0_XSec_1Dcospi0_nu(samplekey)); } else if (!name.compare("MiniBooNE_CC1pi0_XSec_1Dppi0_nu")) { return (new MiniBooNE_CC1pi0_XSec_1Dppi0_nu(samplekey)); } else if (!name.compare("MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu") || !name.compare("MiniBooNE_NC1pi0_XSec_1Dcospi0_rhc")) { return (new MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu(samplekey)); } else if (!name.compare("MiniBooNE_NC1pi0_XSec_1Dcospi0_nu") || !name.compare("MiniBooNE_NC1pi0_XSec_1Dcospi0_fhc")) { return (new MiniBooNE_NC1pi0_XSec_1Dcospi0_nu(samplekey)); } else if (!name.compare("MiniBooNE_NC1pi0_XSec_1Dppi0_antinu") || !name.compare("MiniBooNE_NC1pi0_XSec_1Dppi0_rhc")) { return (new MiniBooNE_NC1pi0_XSec_1Dppi0_antinu(samplekey)); } else if (!name.compare("MiniBooNE_NC1pi0_XSec_1Dppi0_nu") || !name.compare("MiniBooNE_NC1pi0_XSec_1Dppi0_fhc")) { return (new MiniBooNE_NC1pi0_XSec_1Dppi0_nu(samplekey)); /* MiniBooNE NCEL */ } else if (!name.compare("MiniBooNE_NCEL_XSec_Treco_nu")) { return (new MiniBooNE_NCEL_XSec_Treco_nu(samplekey)); } else #endif #ifndef __NO_MicroBooNE__ /* MicroBooNE Samples */ /* MicroBooNE CCinclusive */ if (!name.compare("MicroBooNE_CCInc_XSec_2DPcos_nu")) { return (new MicroBooNE_CCInc_XSec_2DPcos_nu(samplekey)); } else #endif #ifndef __NO_MINERvA__ /* MINERvA Samples */ if (!name.compare("MINERvA_CCQE_XSec_1DQ2_nu") || !name.compare("MINERvA_CCQE_XSec_1DQ2_nu_20deg") || !name.compare("MINERvA_CCQE_XSec_1DQ2_nu_oldflux") || !name.compare("MINERvA_CCQE_XSec_1DQ2_nu_20deg_oldflux")) { return (new MINERvA_CCQE_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("MINERvA_CCQE_XSec_1DQ2_antinu") || !name.compare("MINERvA_CCQE_XSec_1DQ2_antinu_20deg") || !name.compare("MINERvA_CCQE_XSec_1DQ2_antinu_oldflux") || !name.compare("MINERvA_CCQE_XSec_1DQ2_antinu_20deg_oldflux")) { return (new MINERvA_CCQE_XSec_1DQ2_antinu(samplekey)); } else if (!name.compare("MINERvA_CCQE_XSec_1DQ2_joint_oldflux") || !name.compare("MINERvA_CCQE_XSec_1DQ2_joint_20deg_oldflux") || !name.compare("MINERvA_CCQE_XSec_1DQ2_joint") || !name.compare("MINERvA_CCQE_XSec_1DQ2_joint_20deg")) { return (new MINERvA_CCQE_XSec_1DQ2_joint(samplekey)); } else if (!name.compare("MINERvA_CC0pi_XSec_1DEe_nue")) { return (new MINERvA_CC0pi_XSec_1DEe_nue(samplekey)); } else if (!name.compare("MINERvA_CC0pi_XSec_1DQ2_nue")) { return (new MINERvA_CC0pi_XSec_1DQ2_nue(samplekey)); } else if (!name.compare("MINERvA_CC0pi_XSec_1DThetae_nue")) { return (new MINERvA_CC0pi_XSec_1DThetae_nue(samplekey)); } else if (!name.compare("MINERvA_CC0pinp_STV_XSec_1Dpmu_nu") || !name.compare("MINERvA_CC0pinp_STV_XSec_1Dthmu_nu") || !name.compare("MINERvA_CC0pinp_STV_XSec_1Dpprot_nu") || !name.compare("MINERvA_CC0pinp_STV_XSec_1Dthprot_nu") || !name.compare("MINERvA_CC0pinp_STV_XSec_1Dpnreco_nu") || !name.compare("MINERvA_CC0pinp_STV_XSec_1Ddalphat_nu") || !name.compare("MINERvA_CC0pinp_STV_XSec_1Ddpt_nu") || !name.compare("MINERvA_CC0pinp_STV_XSec_1Ddphit_nu")) { return (new MINERvA_CC0pinp_STV_XSec_1D_nu(samplekey)); } else if (!name.compare("MINERvA_CC0pi_XSec_1DQ2_nu_proton")) { return (new MINERvA_CC0pi_XSec_1DQ2_nu_proton(samplekey)); } else if (!name.compare("MINERvA_CC0pi_XSec_1DQ2_TgtC_nu") || !name.compare("MINERvA_CC0pi_XSec_1DQ2_TgtCH_nu") || !name.compare("MINERvA_CC0pi_XSec_1DQ2_TgtFe_nu") || !name.compare("MINERvA_CC0pi_XSec_1DQ2_TgtPb_nu")) { return (new MINERvA_CC0pi_XSec_1DQ2_Tgt_nu(samplekey)); } else if (!name.compare("MINERvA_CC0pi_XSec_1DQ2_TgtRatioC_nu") || !name.compare("MINERvA_CC0pi_XSec_1DQ2_TgtRatioFe_nu") || !name.compare("MINERvA_CC0pi_XSec_1DQ2_TgtRatioPb_nu")) { return (new MINERvA_CC0pi_XSec_1DQ2_TgtRatio_nu(samplekey)); // Dan Ruterbories measurements of late 2018 } else if (!name.compare("MINERvA_CC0pi_XSec_2Dptpz_nu")) { return (new MINERvA_CC0pi_XSec_2D_nu(samplekey)); // } else if (!name.compare("MINERvA_CC0pi_XSec_3DptpzTp_nu")) { // return (new MINERvA_CC0pi_XSec_3DptpzTp_nu(samplekey)); } else if (!name.compare("MINERvA_CC0pi_XSec_1Dpt_nu") || !name.compare("MINERvA_CC0pi_XSec_1Dpz_nu") || !name.compare("MINERvA_CC0pi_XSec_1DQ2QE_nu") || !name.compare("MINERvA_CC0pi_XSec_1DEnuQE_nu")) { return (new MINERvA_CC0pi_XSec_1D_2018_nu(samplekey)); // C. Patrick's early 2018 measurements } else if (!name.compare("MINERvA_CC0pi_XSec_2Dptpz_antinu") || !name.compare("MINERvA_CC0pi_XSec_2DQ2QEEnuQE_antinu") || !name.compare("MINERvA_CC0pi_XSec_2DQ2QEEnuTrue_antinu")) { return (new MINERvA_CC0pi_XSec_2D_antinu(samplekey)); /* CC1pi+ */ // DONE } else if (!name.compare("MINERvA_CC1pip_XSec_1DTpi_nu") || !name.compare("MINERvA_CC1pip_XSec_1DTpi_nu_20deg") || !name.compare("MINERvA_CC1pip_XSec_1DTpi_nu_fluxcorr") || !name.compare("MINERvA_CC1pip_XSec_1DTpi_nu_20deg_fluxcorr")) { return (new MINERvA_CC1pip_XSec_1DTpi_nu(samplekey)); // DONE } else if (!name.compare("MINERvA_CC1pip_XSec_1Dth_nu") || !name.compare("MINERvA_CC1pip_XSec_1Dth_nu_20deg") || !name.compare("MINERvA_CC1pip_XSec_1Dth_nu_fluxcorr") || !name.compare("MINERvA_CC1pip_XSec_1Dth_nu_20deg_fluxcorr")) { return (new MINERvA_CC1pip_XSec_1Dth_nu(samplekey)); } else if (!name.compare("MINERvA_CC1pip_XSec_1DTpi_nu_2017") || !name.compare("MINERvA_CC1pip_XSec_1Dth_nu_2017") || !name.compare("MINERvA_CC1pip_XSec_1Dpmu_nu_2017") || !name.compare("MINERvA_CC1pip_XSec_1Dthmu_nu_2017") || !name.compare("MINERvA_CC1pip_XSec_1DQ2_nu_2017") || !name.compare("MINERvA_CC1pip_XSec_1DEnu_nu_2017")) { return (new MINERvA_CC1pip_XSec_1D_2017Update(samplekey)); /* CCNpi+ */ } else if (!name.compare("MINERvA_CCNpip_XSec_1Dth_nu") || !name.compare("MINERvA_CCNpip_XSec_1Dth_nu_2015") || !name.compare("MINERvA_CCNpip_XSec_1Dth_nu_2016") || !name.compare("MINERvA_CCNpip_XSec_1Dth_nu_2015_20deg") || !name.compare("MINERvA_CCNpip_XSec_1Dth_nu_2015_fluxcorr") || !name.compare("MINERvA_CCNpip_XSec_1Dth_nu_2015_20deg_fluxcorr")) { return (new MINERvA_CCNpip_XSec_1Dth_nu(samplekey)); } else if (!name.compare("MINERvA_CCNpip_XSec_1DTpi_nu") || !name.compare("MINERvA_CCNpip_XSec_1DTpi_nu_2015") || !name.compare("MINERvA_CCNpip_XSec_1DTpi_nu_2016") || !name.compare("MINERvA_CCNpip_XSec_1DTpi_nu_2015_20deg") || !name.compare("MINERvA_CCNpip_XSec_1DTpi_nu_2015_fluxcorr") || !name.compare( "MINERvA_CCNpip_XSec_1DTpi_nu_2015_20deg_fluxcorr")) { return (new MINERvA_CCNpip_XSec_1DTpi_nu(samplekey)); } else if (!name.compare("MINERvA_CCNpip_XSec_1Dthmu_nu")) { return (new MINERvA_CCNpip_XSec_1Dthmu_nu(samplekey)); } else if (!name.compare("MINERvA_CCNpip_XSec_1Dpmu_nu")) { return (new MINERvA_CCNpip_XSec_1Dpmu_nu(samplekey)); } else if (!name.compare("MINERvA_CCNpip_XSec_1DQ2_nu")) { return (new MINERvA_CCNpip_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("MINERvA_CCNpip_XSec_1DEnu_nu")) { return (new MINERvA_CCNpip_XSec_1DEnu_nu(samplekey)); /* MINERvA CC1pi0 anti-nu */ // Done } else if (!name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu") || !name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu_2015") || !name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu_2016") || !name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu_fluxcorr") || !name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu_2015_fluxcorr") || !name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu_2016_fluxcorr")) { return (new MINERvA_CC1pi0_XSec_1Dth_antinu(samplekey)); } else if (!name.compare("MINERvA_CC1pi0_XSec_1Dppi0_antinu") || !name.compare("MINERvA_CC1pi0_XSec_1Dppi0_antinu_fluxcorr")) { return (new MINERvA_CC1pi0_XSec_1Dppi0_antinu(samplekey)); } else if (!name.compare("MINERvA_CC1pi0_XSec_1DTpi0_antinu")) { return (new MINERvA_CC1pi0_XSec_1DTpi0_antinu(samplekey)); // Done } else if (!name.compare("MINERvA_CC1pi0_XSec_1DQ2_antinu")) { return (new MINERvA_CC1pi0_XSec_1DQ2_antinu(samplekey)); // Done } else if (!name.compare("MINERvA_CC1pi0_XSec_1Dthmu_antinu")) { return (new MINERvA_CC1pi0_XSec_1Dthmu_antinu(samplekey)); // Done } else if (!name.compare("MINERvA_CC1pi0_XSec_1Dpmu_antinu")) { return (new MINERvA_CC1pi0_XSec_1Dpmu_antinu(samplekey)); // Done } else if (!name.compare("MINERvA_CC1pi0_XSec_1DEnu_antinu")) { return (new MINERvA_CC1pi0_XSec_1DEnu_antinu(samplekey)); // MINERvA CC1pi0 nu } else if (!name.compare("MINERvA_CC1pi0_XSec_1DTpi_nu") || !name.compare("MINERvA_CC1pi0_XSec_1Dth_nu") || !name.compare("MINERvA_CC1pi0_XSec_1Dpmu_nu") || !name.compare("MINERvA_CC1pi0_XSec_1Dthmu_nu") || !name.compare("MINERvA_CC1pi0_XSec_1DQ2_nu") || !name.compare("MINERvA_CC1pi0_XSec_1DEnu_nu") || !name.compare("MINERvA_CC1pi0_XSec_1DWexp_nu") || !name.compare("MINERvA_CC1pi0_XSec_1DPPi0Mass_nu") || !name.compare("MINERvA_CC1pi0_XSec_1DPPi0MassDelta_nu") || !name.compare("MINERvA_CC1pi0_XSec_1DCosAdler_nu") || !name.compare("MINERvA_CC1pi0_XSec_1DPhiAdler_nu")) { return (new MINERvA_CC1pi0_XSec_1D_nu(samplekey)); /* CCINC */ } else if (!name.compare("MINERvA_CCinc_XSec_2DEavq3_nu")) { return (new MINERvA_CCinc_XSec_2DEavq3_nu(samplekey)); } else if (!name.compare("MINERvA_CCinc_XSec_1Dx_ratio_C12_CH") || !name.compare("MINERvA_CCinc_XSec_1Dx_ratio_Fe56_CH") || !name.compare("MINERvA_CCinc_XSec_1Dx_ratio_Pb208_CH")) { return (new MINERvA_CCinc_XSec_1Dx_ratio(samplekey)); } else if (!name.compare("MINERvA_CCinc_XSec_1DEnu_ratio_C12_CH") || !name.compare("MINERvA_CCinc_XSec_1DEnu_ratio_Fe56_CH") || !name.compare("MINERvA_CCinc_XSec_1DEnu_ratio_Pb208_CH")) { return (new MINERvA_CCinc_XSec_1DEnu_ratio(samplekey)); /* CCDIS */ } else if (!name.compare("MINERvA_CCDIS_XSec_1Dx_ratio_C12_CH") || !name.compare("MINERvA_CCDIS_XSec_1Dx_ratio_Fe56_CH") || !name.compare("MINERvA_CCDIS_XSec_1Dx_ratio_Pb208_CH")) { return (new MINERvA_CCDIS_XSec_1Dx_ratio(samplekey)); } else if (!name.compare("MINERvA_CCDIS_XSec_1DEnu_ratio_C12_CH") || !name.compare("MINERvA_CCDIS_XSec_1DEnu_ratio_Fe56_CH") || !name.compare("MINERvA_CCDIS_XSec_1DEnu_ratio_Pb208_CH")) { return (new MINERvA_CCDIS_XSec_1DEnu_ratio(samplekey)); /* CC-COH */ } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DEnu_nu")) { return (new MINERvA_CCCOHPI_XSec_1DEnu_nu(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DEpi_nu")) { return (new MINERvA_CCCOHPI_XSec_1DEpi_nu(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1Dth_nu")) { return (new MINERvA_CCCOHPI_XSec_1Dth_nu(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DQ2_nu")) { return (new MINERvA_CCCOHPI_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DEnu_antinu")) { return (new MINERvA_CCCOHPI_XSec_1DEnu_antinu(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DEpi_antinu")) { return (new MINERvA_CCCOHPI_XSec_1DEpi_antinu(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1Dth_antinu")) { return (new MINERvA_CCCOHPI_XSec_1Dth_antinu(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DQ2_antinu")) { return (new MINERvA_CCCOHPI_XSec_1DQ2_antinu(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DEnu_joint")) { return (new MINERvA_CCCOHPI_XSec_joint(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DEpi_joint")) { return (new MINERvA_CCCOHPI_XSec_joint(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1Dth_joint")) { return (new MINERvA_CCCOHPI_XSec_joint(samplekey)); } else if (!name.compare("MINERvA_CCCOHPI_XSec_1DQ2_joint")) { return (new MINERvA_CCCOHPI_XSec_joint(samplekey)); /* T2K Samples */ } else #endif #ifndef __NO_T2K__ if (!name.compare("T2K_CC0pi_XSec_2DPcos_nu_I")) { return (new T2K_CC0pi_XSec_2DPcos_nu_I(samplekey)); } else if (!name.compare("T2K_CC0pi_XSec_2DPcos_nu_II")) { return (new T2K_CC0pi_XSec_2DPcos_nu_II(samplekey)); } else if (!name.compare("T2K_CCinc_XSec_2DPcos_nu_nonuniform")) { return (new T2K_CCinc_XSec_2DPcos_nu_nonuniform(samplekey)); } else if (!name.compare("T2K_CC0pi_XSec_H2O_2DPcos_anu")) { return (new T2K_CC0pi_XSec_H2O_2DPcos_anu(samplekey)); } else if (!name.compare("T2K_NuMu_CC0pi_O_XSec_2DPcos") || !name.compare("T2K_NuMu_CC0pi_C_XSec_2DPcos")) { return (new T2K_NuMu_CC0pi_OC_XSec_2DPcos(samplekey)); } else if (!name.compare("T2K_NuMu_CC0pi_OC_XSec_2DPcos_joint")) { return (new T2K_NuMu_CC0pi_OC_XSec_2DPcos_joint(samplekey)); } else if (!name.compare("T2K_NuMu_CC0pi_CH_XSec_2DPcos") || !name.compare("T2K_AntiNuMu_CC0pi_CH_XSec_2DPcos")) { return (new T2K_NuMuAntiNuMu_CC0pi_CH_XSec_2DPcos(samplekey)); } else if (!name.compare("T2K_NuMuAntiNuMu_CC0pi_CH_XSec_2DPcos_joint")) { return (new T2K_NuMuAntiNuMu_CC0pi_CH_XSec_2DPcos_joint(samplekey)); } else if (!name.compare("T2K_nueCCinc_XSec_1Dpe_FHC") || !name.compare("T2K_nueCCinc_XSec_1Dpe_RHC") || !name.compare("T2K_nuebarCCinc_XSec_1Dpe_RHC")) { return (new T2K_nueCCinc_XSec_1Dpe(samplekey)); } else if (!name.compare("T2K_nueCCinc_XSec_1Dthe_FHC") || !name.compare("T2K_nueCCinc_XSec_1Dthe_RHC") || !name.compare("T2K_nuebarCCinc_XSec_1Dthe_RHC")) { return (new T2K_nueCCinc_XSec_1Dthe(samplekey)); } else if (!name.compare("T2K_nueCCinc_XSec_1Dpe_joint")) { return (new T2K_nueCCinc_XSec_1Dpe_joint(samplekey)); } else if (!name.compare("T2K_nueCCinc_XSec_1Dthe_joint")) { return (new T2K_nueCCinc_XSec_1Dthe_joint(samplekey)); } else if (!name.compare("T2K_nueCCinc_XSec_joint")) { return (new T2K_nueCCinc_XSec_joint(samplekey)); /* T2K CC1pi+ CH samples */ // Comment these out for now because we don't have the proper data } else if (!name.compare("T2K_CC1pip_CH_XSec_2Dpmucosmu_nu")) { return (new T2K_CC1pip_CH_XSec_2Dpmucosmu_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_CH_XSec_1Dppi_nu")) { return (new T2K_CC1pip_CH_XSec_1Dppi_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_CH_XSec_1Dthpi_nu")) { return (new T2K_CC1pip_CH_XSec_1Dthpi_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_CH_XSec_1Dthmupi_nu")) { return (new T2K_CC1pip_CH_XSec_1Dthmupi_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_CH_XSec_1DQ2_nu")) { return (new T2K_CC1pip_CH_XSec_1DQ2_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_CH_XSec_1DAdlerPhi_nu")) { return (new T2K_CC1pip_CH_XSec_1DAdlerPhi_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_CH_XSec_1DCosThAdler_nu")) { return (new T2K_CC1pip_CH_XSec_1DCosThAdler_nu(samplekey)); /* T2K CC1pi+ H2O samples */ } else if (!name.compare("T2K_CC1pip_H2O_XSec_1DEnuDelta_nu")) { return (new T2K_CC1pip_H2O_XSec_1DEnuDelta_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_H2O_XSec_1DEnuMB_nu")) { return (new T2K_CC1pip_H2O_XSec_1DEnuMB_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dcosmu_nu")) { return (new T2K_CC1pip_H2O_XSec_1Dcosmu_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dcosmupi_nu")) { return (new T2K_CC1pip_H2O_XSec_1Dcosmupi_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dcospi_nu")) { return (new T2K_CC1pip_H2O_XSec_1Dcospi_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dpmu_nu")) { return (new T2K_CC1pip_H2O_XSec_1Dpmu_nu(samplekey)); } else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dppi_nu")) { return (new T2K_CC1pip_H2O_XSec_1Dppi_nu(samplekey)); /* T2K CC0pi + np CH samples */ } else if (!name.compare("T2K_CC0pinp_STV_XSec_1Ddpt_nu")) { return (new T2K_CC0pinp_STV_XSec_1Ddpt_nu(samplekey)); } else if (!name.compare("T2K_CC0pinp_STV_XSec_1Ddphit_nu")) { return (new T2K_CC0pinp_STV_XSec_1Ddphit_nu(samplekey)); } else if (!name.compare("T2K_CC0pinp_STV_XSec_1Ddat_nu")) { return (new T2K_CC0pinp_STV_XSec_1Ddat_nu(samplekey)); } else if (!name.compare("T2K_CC0piWithProtons_XSec_2018_multidif_0p_1p_Np") || !name.compare("T2K_CC0piWithProtons_XSec_2018_multidif_0p_1p") || !name.compare("T2K_CC0piWithProtons_XSec_2018_multidif_0p") || !name.compare("T2K_CC0piWithProtons_XSec_2018_multidif_1p")) { return (new T2K_CC0piWithProtons_XSec_2018_multidif_0p_1p_Np(samplekey)); } else if (!name.compare("T2K_CC0pinp_ifk_XSec_3Dinfp_nu")) { return (new T2K_CC0pinp_ifk_XSec_3Dinfp_nu(samplekey)); } else if (!name.compare("T2K_CC0pinp_ifk_XSec_3Dinfa_nu")) { return (new T2K_CC0pinp_ifk_XSec_3Dinfa_nu(samplekey)); } else if (!name.compare("T2K_CC0pinp_ifk_XSec_3Dinfip_nu")) { return (new T2K_CC0pinp_ifk_XSec_3Dinfip_nu(samplekey)); // SciBooNE COH studies } else #endif #ifndef __NO_SciBooNE__ if (!name.compare("SciBooNE_CCCOH_STOP_NTrks_nu")) { return (new SciBooNE_CCCOH_STOP_NTrks_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_1TRK_1DQ2_nu")) { return (new SciBooNE_CCCOH_1TRK_1DQ2_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_1TRK_1Dpmu_nu")) { return (new SciBooNE_CCCOH_1TRK_1Dpmu_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_1TRK_1Dthetamu_nu")) { return (new SciBooNE_CCCOH_1TRK_1Dthetamu_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPr_1DQ2_nu")) { return (new SciBooNE_CCCOH_MuPr_1DQ2_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPr_1Dpmu_nu")) { return (new SciBooNE_CCCOH_MuPr_1Dpmu_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPr_1Dthetamu_nu")) { return (new SciBooNE_CCCOH_MuPr_1Dthetamu_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPiVA_1DQ2_nu")) { return (new SciBooNE_CCCOH_MuPiVA_1DQ2_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPiVA_1Dpmu_nu")) { return (new SciBooNE_CCCOH_MuPiVA_1Dpmu_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPiVA_1Dthetamu_nu")) { return (new SciBooNE_CCCOH_MuPiVA_1Dthetamu_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu")) { return (new SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu")) { return (new SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu")) { return (new SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu")) { return (new SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu")) { return (new SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu(samplekey)); } else if (!name.compare("SciBooNE_CCCOH_STOPFINAL_1DQ2_nu")) { return (new SciBooNE_CCCOH_STOPFINAL_1DQ2_nu(samplekey)); } else if (!name.compare("SciBooNE_CCInc_XSec_1DEnu_nu") || !name.compare("SciBooNE_CCInc_XSec_1DEnu_nu_NEUT") || !name.compare("SciBooNE_CCInc_XSec_1DEnu_nu_NUANCE")) { return (new SciBooNE_CCInc_XSec_1DEnu_nu(samplekey)); /* K2K Samples */ /* NC1pi0 */ } else #endif #ifndef __NO_K2K__ if (!name.compare("K2K_NC1pi0_Evt_1Dppi0_nu")) { return (new K2K_NC1pi0_Evt_1Dppi0_nu(samplekey)); /* Fake Studies */ } else #endif if (name.find("ExpMultDist_CCQE_XSec_1D") != std::string::npos && name.find("_FakeStudy") != std::string::npos) { return ( new ExpMultDist_CCQE_XSec_1DVar_FakeStudy(name, file, rw, type, fkdt)); } else if (name.find("ExpMultDist_CCQE_XSec_2D") != std::string::npos && name.find("_FakeStudy") != std::string::npos) { return ( new ExpMultDist_CCQE_XSec_2DVar_FakeStudy(name, file, rw, type, fkdt)); } else if (name.find("GenericFlux") != std::string::npos) { return (new GenericFlux_Tester(name, file, rw, type, fkdt)); } else if (name.find("GenericVectors") != std::string::npos) { return (new GenericFlux_Vectors(name, file, rw, type, fkdt)); } else if (!name.compare("T2K2017_FakeData")) { return (new T2K2017_FakeData(samplekey)); } else if (!name.compare("MCStudy_CCQE")) { return (new MCStudy_CCQEHistograms(name, file, rw, type, fkdt)); } else if (!name.compare("ElectronFlux_FlatTree")) { return (new ElectronFlux_FlatTree(name, file, rw, type, fkdt)); } else if (name.find("ElectronData_") != std::string::npos) { return new ElectronScattering_DurhamData(samplekey); } else if (name.find("MuonValidation_") != std::string::npos) { return (new MCStudy_MuonValidation(name, file, rw, type, fkdt)); } else if (!name.compare("NIWGOfficialPlots")) { return (new OfficialNIWGPlots(samplekey)); } else if ((name.find("SigmaEnuHists") != std::string::npos) || (name.find("SigmaEnuPerEHists") != std::string::npos)) { return (new SigmaEnuHists(samplekey)); } else if (!name.compare("Simple_Osc")) { return (new Simple_Osc(samplekey)); } else if (!name.compare("Smear_SVDUnfold_Propagation_Osc")) { return (new Smear_SVDUnfold_Propagation_Osc(samplekey)); } else { NUIS_ABORT("Error: No such sample: " << name << std::endl); } // Return NULL if no sample loaded. return NULL; } // namespace SampleUtils } // namespace SampleUtils diff --git a/src/InputHandler/GENIEInputHandler.cxx b/src/InputHandler/GENIEInputHandler.cxx index 6c4c5ac..3f64f2c 100644 --- a/src/InputHandler/GENIEInputHandler.cxx +++ b/src/InputHandler/GENIEInputHandler.cxx @@ -1,621 +1,635 @@ // Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This file is part of NUISANCE. * * NUISANCE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * NUISANCE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NUISANCE. If not, see . *******************************************************************************/ #ifdef __GENIE_ENABLED__ #include "GENIEInputHandler.h" #ifdef GENIE_PRE_R3 #include "Messenger/Messenger.h" #else #include "Framework/Messenger/Messenger.h" #endif #include "InputUtils.h" GENIEGeneratorInfo::~GENIEGeneratorInfo() { DeallocateParticleStack(); } void GENIEGeneratorInfo::AddBranchesToTree(TTree *tn) { tn->Branch("GenieParticlePDGs", &fGenieParticlePDGs, "GenieParticlePDGs/I"); } void GENIEGeneratorInfo::SetBranchesFromTree(TTree *tn) { tn->SetBranchAddress("GenieParticlePDGs", &fGenieParticlePDGs); } void GENIEGeneratorInfo::AllocateParticleStack(int stacksize) { fGenieParticlePDGs = new int[stacksize]; } void GENIEGeneratorInfo::DeallocateParticleStack() { delete fGenieParticlePDGs; } void GENIEGeneratorInfo::FillGeneratorInfo(NtpMCEventRecord *ntpl) { Reset(); // Check for GENIE Event if (!ntpl) return; if (!ntpl->event) return; // Cast Event Record GHepRecord *ghep = static_cast(ntpl->event); if (!ghep) return; // Fill Particle Stack GHepParticle *p = 0; TObjArrayIter iter(ghep); // Loop over all particles int i = 0; while ((p = (dynamic_cast((iter).Next())))) { if (!p) continue; // Get PDG fGenieParticlePDGs[i] = p->Pdg(); i++; } } void GENIEGeneratorInfo::Reset() { for (int i = 0; i < kMaxParticles; i++) { fGenieParticlePDGs[i] = 0; } } GENIEInputHandler::GENIEInputHandler(std::string const &handle, std::string const &rawinputs) { NUIS_LOG(SAM, "Creating GENIEInputHandler : " << handle); // Plz no shouting StopTalking(); genie::Messenger::Instance()->SetPriorityLevel("GHepUtils", pFATAL); StartTalking(); // Shout all you want // Run a joint input handling fName = handle; // Setup the TChain fGENIETree = new TChain("gtree"); fSaveExtra = FitPar::Config().GetParB("SaveExtraGenie"); fCacheSize = FitPar::Config().GetParI("CacheSize"); fMaxEvents = FitPar::Config().GetParI("MAXEVENTS"); // Are we running with NOvA weights fNOvAWeights = FitPar::Config().GetParB("NOvA_Weights"); MAQEw = 1.0; NonResw = 1.0; RPAQEw = 1.0; RPARESw = 1.0; MECw = 1.0; DISw = 1.0; NOVAw = 1.0; // Loop over all inputs and grab flux, eventhist, and nevents std::vector inputs = InputUtils::ParseInputFileList(rawinputs); for (size_t inp_it = 0; inp_it < inputs.size(); ++inp_it) { // Open File for histogram access TFile *inp_file = new TFile( InputUtils::ExpandInputDirectories(inputs[inp_it]).c_str(), "READ"); if (!inp_file or inp_file->IsZombie()) { NUIS_ABORT( "GENIE File IsZombie() at : '" << inputs[inp_it] << "'" << std::endl << "Check that your file paths are correct and the file exists!" << std::endl << "$ ls -lh " << inputs[inp_it]); } // Get Flux/Event hist TH1D *fluxhist = (TH1D *)inp_file->Get("nuisance_flux"); TH1D *eventhist = (TH1D *)inp_file->Get("nuisance_events"); if (!fluxhist or !eventhist) { NUIS_ERR(FTL, "Input File Contents: " << inputs[inp_it]); inp_file->ls(); NUIS_ABORT("GENIE FILE doesn't contain flux/xsec info." << std::endl << "Try running the app PrepareGENIE first on :" << inputs[inp_it] << std::endl << "$ PrepareGENIE -h"); } // Get N Events TTree *genietree = (TTree *)inp_file->Get("gtree"); if (!genietree) { NUIS_ERR(FTL, "gtree not located in GENIE file: " << inputs[inp_it]); NUIS_ABORT( "Check your inputs, they may need to be completely regenerated!"); } int nevents = genietree->GetEntries(); if (nevents <= 0) { NUIS_ABORT("Trying to a TTree with " << nevents << " to TChain from : " << inputs[inp_it]); } // Check for precomputed weights TTree *weighttree = (TTree *)inp_file->Get("nova_wgts"); if (fNOvAWeights) { if (!weighttree) { NUIS_ABORT("Did not find nova_wgts tree in file " << inputs[inp_it] << " but you specified it" << std::endl); } else { NUIS_LOG(FIT, "Found nova_wgts tree in file " << inputs[inp_it]); } } // Register input to form flux/event rate hists RegisterJointInput(inputs[inp_it], nevents, fluxhist, eventhist); // Add To TChain fGENIETree->AddFile(inputs[inp_it].c_str()); if (weighttree != NULL) fGENIETree->AddFriend(weighttree); } // Registor all our file inputs SetupJointInputs(); // Assign to tree fEventType = kGENIE; fGenieNtpl = NULL; fGENIETree->SetBranchAddress("gmcrec", &fGenieNtpl); // Set up the custom weights if (fNOvAWeights) { fGENIETree->SetBranchAddress("MAQEwgt", &MAQEw); fGENIETree->SetBranchAddress("nonResNormWgt", &NonResw); fGENIETree->SetBranchAddress("RPAQEWgt", &RPAQEw); fGENIETree->SetBranchAddress("RPARESWgt", &RPARESw); fGENIETree->SetBranchAddress("MECWgt", &MECw); fGENIETree->SetBranchAddress("DISWgt", &DISw); fGENIETree->SetBranchAddress("nova2018CVWgt", &NOVAw); } // Libraries should be seen but not heard... StopTalking(); fGENIETree->GetEntry(0); StartTalking(); // Create Fit Event fNUISANCEEvent = new FitEvent(); fNUISANCEEvent->SetGenieEvent(fGenieNtpl); if (fSaveExtra) { fGenieInfo = new GENIEGeneratorInfo(); fNUISANCEEvent->AddGeneratorInfo(fGenieInfo); } fNUISANCEEvent->HardReset(); }; GENIEInputHandler::~GENIEInputHandler() { // if (fGenieGHep) delete fGenieGHep; // if (fGenieNtpl) delete fGenieNtpl; // if (fGENIETree) delete fGENIETree; // if (fGenieInfo) delete fGenieInfo; } void GENIEInputHandler::CreateCache() { if (fCacheSize > 0) { // fGENIETree->SetCacheEntryRange(0, fNEvents); fGENIETree->AddBranchToCache("*", 1); fGENIETree->SetCacheSize(fCacheSize); } } void GENIEInputHandler::RemoveCache() { // fGENIETree->SetCacheEntryRange(0, fNEvents); fGENIETree->AddBranchToCache("*", 0); fGENIETree->SetCacheSize(0); } FitEvent *GENIEInputHandler::GetNuisanceEvent(const UInt_t ent, const bool lightweight) { UInt_t entry = ent + fSkip; if (entry >= (UInt_t)fNEvents) return NULL; // Clear the previous event (See Note 1 in ROOT TClonesArray documentation) if (fGenieNtpl) { fGenieNtpl->Clear(); } // Read Entry from TTree to fill NEUT Vect in BaseFitEvt; fGENIETree->GetEntry(entry); // Run NUISANCE Vector Filler if (!lightweight) { CalcNUISANCEKinematics(); } #ifdef __PROB3PP_ENABLED__ else { // Check for GENIE Event if (!fGenieNtpl) return NULL; if (!fGenieNtpl->event) return NULL; // Cast Event Record fGenieGHep = static_cast(fGenieNtpl->event); if (!fGenieGHep) return NULL; TObjArrayIter iter(fGenieGHep); genie::GHepParticle *p; while ((p = (dynamic_cast((iter).Next())))) { if (!p) { continue; } // Get Status int state = GetGENIEParticleStatus(p, fNUISANCEEvent->Mode); if (state != genie::kIStInitialState) { continue; } fNUISANCEEvent->probe_E = p->E() * 1.E3; fNUISANCEEvent->probe_pdg = p->Pdg(); break; } } #endif // Setup Input scaling for joint inputs fNUISANCEEvent->InputWeight = GetInputWeight(entry); return fNUISANCEEvent; } int GENIEInputHandler::GetGENIEParticleStatus(genie::GHepParticle *p, int mode) { /* kIStUndefined = -1, kIStInitialState = 0, / generator-level initial state / kIStStableFinalState = 1, / generator-level final state: particles to be tracked by detector-level MC / kIStIntermediateState = 2, kIStDecayedState = 3, kIStCorrelatedNucleon = 10, kIStNucleonTarget = 11, kIStDISPreFragmHadronicState = 12, kIStPreDecayResonantState = 13, kIStHadronInTheNucleus = 14, / hadrons inside the nucleus: marked for hadron transport modules to act on / kIStFinalStateNuclearRemnant = 15, / low energy nuclear fragments entering the record collectively as a 'hadronic blob' pseudo-particle / kIStNucleonClusterTarget = 16, // for composite nucleons before phase space decay */ int state = kUndefinedState; switch (p->Status()) { case genie::kIStNucleonTarget: case genie::kIStInitialState: case genie::kIStCorrelatedNucleon: case genie::kIStNucleonClusterTarget: state = kInitialState; break; case genie::kIStStableFinalState: state = kFinalState; break; case genie::kIStHadronInTheNucleus: if (abs(mode) == 2) state = kInitialState; else state = kFSIState; break; case genie::kIStPreDecayResonantState: case genie::kIStDISPreFragmHadronicState: case genie::kIStIntermediateState: state = kFSIState; break; case genie::kIStFinalStateNuclearRemnant: case genie::kIStUndefined: case genie::kIStDecayedState: default: break; } // Flag to remove nuclear part in genie if (p->Pdg() > 1000000) { if (state == kInitialState) state = kNuclearInitial; else if (state == kFinalState) state = kNuclearRemnant; } return state; } #endif #ifdef __GENIE_ENABLED__ int GENIEInputHandler::ConvertGENIEReactionCode(GHepRecord *gheprec) { + + // I randomly picked 53 here because NEUT doesn't have an appropriate mode... + if (gheprec->Summary()->ProcInfo().IsNuElectronElastic()){ + if (pdg::IsNeutrino(gheprec->Summary()->InitState().ProbePdg())) return 53; + else return -53; + } + + // And the same story for 54 + if (gheprec->Summary()->ProcInfo().IsIMDAnnihilation()){ + if (pdg::IsNeutrino(gheprec->Summary()->InitState().ProbePdg())) return 54; + else return -54; + } + + // Electron Scattering if (gheprec->Summary()->ProcInfo().IsEM()) { if (gheprec->Summary()->InitState().ProbePdg() == 11) { if (gheprec->Summary()->ProcInfo().IsQuasiElastic()) return 1; else if (gheprec->Summary()->ProcInfo().IsMEC()) return 2; else if (gheprec->Summary()->ProcInfo().IsResonant()) return 13; else if (gheprec->Summary()->ProcInfo().IsDeepInelastic()) return 26; else { NUIS_ERR(WRN, "Unknown GENIE Electron Scattering Mode!" << std::endl << "ScatteringTypeId = " << gheprec->Summary()->ProcInfo().ScatteringTypeId() << " " << "InteractionTypeId = " << gheprec->Summary()->ProcInfo().InteractionTypeId() << std::endl << genie::ScatteringType::AsString( gheprec->Summary()->ProcInfo().ScatteringTypeId()) << " " << genie::InteractionType::AsString( gheprec->Summary()->ProcInfo().InteractionTypeId()) << " " << gheprec->Summary()->ProcInfo().IsMEC()); return 0; } } // Weak CC } else if (gheprec->Summary()->ProcInfo().IsWeakCC()) { // CC MEC if (gheprec->Summary()->ProcInfo().IsMEC()) { if (pdg::IsNeutrino(gheprec->Summary()->InitState().ProbePdg())) return 2; else if (pdg::IsAntiNeutrino(gheprec->Summary()->InitState().ProbePdg())) return -2; #ifndef GENIE_PRE_R3 } else if (gheprec->Summary()->ProcInfo().IsDiffractive()) { if (pdg::IsNeutrino(gheprec->Summary()->InitState().ProbePdg())) return 15; else if (pdg::IsAntiNeutrino(gheprec->Summary()->InitState().ProbePdg())) return -15; #endif // CC OTHER } else { return utils::ghep::NeutReactionCode(gheprec); } // Weak NC } else if (gheprec->Summary()->ProcInfo().IsWeakNC()) { // NC MEC if (gheprec->Summary()->ProcInfo().IsMEC()) { if (pdg::IsNeutrino(gheprec->Summary()->InitState().ProbePdg())) return 32; else if (pdg::IsAntiNeutrino(gheprec->Summary()->InitState().ProbePdg())) return -32; #ifndef GENIE_PRE_R3 } else if (gheprec->Summary()->ProcInfo().IsDiffractive()) { if (pdg::IsNeutrino(gheprec->Summary()->InitState().ProbePdg())) return 35; else if (pdg::IsAntiNeutrino(gheprec->Summary()->InitState().ProbePdg())) return -35; #endif // NC OTHER } else { return utils::ghep::NeutReactionCode(gheprec); } } return 0; } void GENIEInputHandler::CalcNUISANCEKinematics() { // Reset all variables fNUISANCEEvent->ResetEvent(); // Check for GENIE Event if (!fGenieNtpl) return; if (!fGenieNtpl->event) return; // Cast Event Record fGenieGHep = static_cast(fGenieNtpl->event); if (!fGenieGHep) return; // Convert GENIE Reaction Code fNUISANCEEvent->Mode = ConvertGENIEReactionCode(fGenieGHep); if (!fNUISANCEEvent->Mode) { std::cout << "[WARN]: Failed to determine mode for GENIE event: " << *fGenieGHep << std::endl; } // Set Event Info fNUISANCEEvent->fEventNo = 0.0; fNUISANCEEvent->fTotCrs = fGenieGHep->XSec(); // Have a bool storing if interaction happened on free or bound nucleon bool IsFree = false; // Set the TargetPDG if (fGenieGHep->TargetNucleus() != NULL) { fNUISANCEEvent->fTargetPDG = fGenieGHep->TargetNucleus()->Pdg(); IsFree = false; // Sometimes GENIE scatters off free nucleons, electrons, photons // In which TargetNucleus is NULL and we need to find the initial state // particle } else { // Check the particle is an initial state particle // Follows GHepRecord::TargetNucleusPosition but doesn't do check on // pdg::IsIon GHepParticle *p = fGenieGHep->Particle(1); // Check that particle 1 actually exists if (!p) { NUIS_ABORT("Can't find particle 1 for GHepRecord"); } // If not an ion but is an initial state particle if (!pdg::IsIon(p->Pdg()) && p->Status() == kIStInitialState) { IsFree = true; fNUISANCEEvent->fTargetPDG = p->Pdg(); // Catch if something strange happens: // Here particle 1 is not an initial state particle OR // particle 1 is an ion OR // both } else { if (pdg::IsIon(p->Pdg())) { NUIS_ABORT( "Particle 1 in GHepRecord stack is an ion but isn't an initial " "state particle"); } else { NUIS_ABORT( "Particle 1 in GHepRecord stack is not an ion but is an initial " "state particle"); } } } // Set the A and Z and H from the target PDG // Depends on if we scattered off a free or bound nucleon if (!IsFree) { fNUISANCEEvent->fTargetA = TargetUtils::GetTargetAFromPDG(fNUISANCEEvent->fTargetPDG); fNUISANCEEvent->fTargetZ = TargetUtils::GetTargetZFromPDG(fNUISANCEEvent->fTargetPDG); fNUISANCEEvent->fTargetH = 0; } else { // If free proton scattering if (fNUISANCEEvent->fTargetPDG == 2212) { fNUISANCEEvent->fTargetA = 1; fNUISANCEEvent->fTargetZ = 1; fNUISANCEEvent->fTargetH = 1; // If free neutron scattering } else if (fNUISANCEEvent->fTargetPDG == 2112) { fNUISANCEEvent->fTargetA = 0; fNUISANCEEvent->fTargetZ = 1; fNUISANCEEvent->fTargetH = 0; // If neither } else { fNUISANCEEvent->fTargetA = 0; fNUISANCEEvent->fTargetZ = 0; fNUISANCEEvent->fTargetH = 0; } } fNUISANCEEvent->fBound = !IsFree; fNUISANCEEvent->InputWeight = 1.0; //(1E+38 / genie::units::cm2) * fGenieGHep->XSec(); // And the custom weights if (fNOvAWeights) { fNUISANCEEvent->CustomWeight = NOVAw; fNUISANCEEvent->CustomWeightArray[0] = MAQEw; fNUISANCEEvent->CustomWeightArray[1] = NonResw; fNUISANCEEvent->CustomWeightArray[2] = RPAQEw; fNUISANCEEvent->CustomWeightArray[3] = RPARESw; fNUISANCEEvent->CustomWeightArray[4] = MECw; fNUISANCEEvent->CustomWeightArray[5] = NOVAw; } else { fNUISANCEEvent->CustomWeight = 1.0; fNUISANCEEvent->CustomWeightArray[0] = 1.0; fNUISANCEEvent->CustomWeightArray[1] = 1.0; fNUISANCEEvent->CustomWeightArray[2] = 1.0; fNUISANCEEvent->CustomWeightArray[3] = 1.0; fNUISANCEEvent->CustomWeightArray[4] = 1.0; fNUISANCEEvent->CustomWeightArray[5] = 1.0; } // Get N Particle Stack unsigned int npart = fGenieGHep->GetEntries(); unsigned int kmax = fNUISANCEEvent->kMaxParticles; if (npart > kmax) { NUIS_ERR(WRN, "GENIE has too many particles, expanding stack."); fNUISANCEEvent->ExpandParticleStack(npart); } // Fill Particle Stack GHepParticle *p = 0; TObjArrayIter iter(fGenieGHep); fNUISANCEEvent->fNParticles = 0; // Loop over all particles while ((p = (dynamic_cast((iter).Next())))) { if (!p) continue; // Get Status int state = GetGENIEParticleStatus(p, fNUISANCEEvent->Mode); // Remove Undefined if (kRemoveUndefParticles && state == kUndefinedState) continue; // Remove FSI if (kRemoveFSIParticles && state == kFSIState) continue; if (kRemoveNuclearParticles && (state == kNuclearInitial || state == kNuclearRemnant)) continue; // Fill Vectors int curpart = fNUISANCEEvent->fNParticles; fNUISANCEEvent->fParticleState[curpart] = state; // Mom fNUISANCEEvent->fParticleMom[curpart][0] = p->Px() * 1.E3; fNUISANCEEvent->fParticleMom[curpart][1] = p->Py() * 1.E3; fNUISANCEEvent->fParticleMom[curpart][2] = p->Pz() * 1.E3; fNUISANCEEvent->fParticleMom[curpart][3] = p->E() * 1.E3; // PDG fNUISANCEEvent->fParticlePDG[curpart] = p->Pdg(); // Set if the particle was on the fundamental vertex fNUISANCEEvent->fPrimaryVertex[curpart] = (p->FirstMother() < 2); // Add to N particle count fNUISANCEEvent->fNParticles++; // Extra Check incase GENIE fails. if ((UInt_t)fNUISANCEEvent->fNParticles == kmax) { NUIS_ERR(WRN, "Number of GENIE Particles exceeds maximum!"); NUIS_ERR(WRN, "Extend kMax, or run without including FSI particles!"); break; } } // Fill Extra Stack if (fSaveExtra) fGenieInfo->FillGeneratorInfo(fGenieNtpl); // Run Initial, FSI, Final, Other ordering. fNUISANCEEvent->OrderStack(); FitParticle *ISAnyLepton = fNUISANCEEvent->GetHMISAnyLeptons(); if (ISAnyLepton) { fNUISANCEEvent->probe_E = ISAnyLepton->E(); fNUISANCEEvent->probe_pdg = ISAnyLepton->PDG(); } return; } void GENIEInputHandler::Print() {} #endif diff --git a/src/Utils/FitUtils.cxx b/src/Utils/FitUtils.cxx index 013ef32..484f5f7 100644 --- a/src/Utils/FitUtils.cxx +++ b/src/Utils/FitUtils.cxx @@ -1,1103 +1,1103 @@ // Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This file is part of NUISANCE. * * NUISANCE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * NUISANCE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NUISANCE. If not, see . *******************************************************************************/ #include "FitUtils.h" /* MISC Functions */ //******************************************************************** double *FitUtils::GetArrayFromMap(std::vector invals, std::map inmap) { //******************************************************************** double *outarr = new double[invals.size()]; int count = 0; for (size_t i = 0; i < invals.size(); i++) { outarr[count++] = inmap[invals.at(i)]; } return outarr; } /* MISC Event */ //******************************************************************** // Returns the kinetic energy of a particle in GeV double FitUtils::T(TLorentzVector part) { //******************************************************************** double E_part = part.E() / 1000.; double p_part = part.Vect().Mag() / 1000.; double m_part = sqrt(E_part * E_part - p_part * p_part); double KE_part = E_part - m_part; return KE_part; }; //******************************************************************** // Returns the momentum of a particle in GeV double FitUtils::p(TLorentzVector part) { //******************************************************************** double p_part = part.Vect().Mag() / 1000.; return p_part; }; double FitUtils::p(FitParticle *part) { return FitUtils::p(part->fP); }; //******************************************************************** // Returns the angle between two particles in radians double FitUtils::th(TLorentzVector part1, TLorentzVector part2) { //******************************************************************** double th = part1.Vect().Angle(part2.Vect()); return th; }; double FitUtils::th(FitParticle *part1, FitParticle *part2) { return FitUtils::th(part1->fP, part2->fP); }; // T2K CC1pi+ helper functions // //******************************************************************** // Returns the angle between q3 and the pion defined in Raquel's CC1pi+ on CH // paper // Uses "MiniBooNE formula" for Enu, here called EnuCC1pip_T2K_MB //******************************************************************** double FitUtils::thq3pi_CC1pip_T2K(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector ppi) { // Want this in GeV TVector3 p_mu = pmu.Vect() * (1. / 1000.); // Get the reconstructed Enu // We are not using Michel e sample, so we have pion kinematic information double Enu = EnuCC1piprec(pnu, pmu, ppi, true); // Get neutrino unit direction, multiply by reconstructed Enu TVector3 p_nu = pnu.Vect() * (1. / (pnu.Vect().Mag())) * Enu; TVector3 p_pi = ppi.Vect() * (1. / 1000.); // This is now in GeV TVector3 q3 = (p_nu - p_mu); // Want this in GeV double th_q3_pi = q3.Angle(p_pi); return th_q3_pi; } //******************************************************************** // Returns the q3 defined in Raquel's CC1pi+ on CH paper // Uses "MiniBooNE formula" for Enu //******************************************************************** double FitUtils::q3_CC1pip_T2K(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector ppi) { // Can't use the true Enu here; need to reconstruct it // We do have Michel e- here so reconstruct Enu by "MiniBooNE formula" without // pion kinematics // The bool false refers to that we don't have pion kinematics // Last bool refers to if we have pion kinematic information or not double Enu = EnuCC1piprec(pnu, pmu, ppi, false); TVector3 p_mu = pmu.Vect() * (1. / 1000.); TVector3 p_nu = pnu.Vect() * (1. / pnu.Vect().Mag()) * Enu; double q3 = (p_nu - p_mu).Mag(); return q3; } //******************************************************************** // Returns the W reconstruction from Raquel CC1pi+ CH thesis // Uses the MiniBooNE formula Enu //******************************************************************** double FitUtils::WrecCC1pip_T2K_MB(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector ppi) { double E_mu = pmu.E() / 1000.; double p_mu = pmu.Vect().Mag() / 1000.; double E_nu = EnuCC1piprec(pnu, pmu, ppi, false); double a1 = (E_nu + PhysConst::mass_neutron) - E_mu; double a2 = E_nu - p_mu; double wrec = sqrt(a1 * a1 - a2 * a2); return wrec; } //******************************************************** double FitUtils::ProtonQ2QErec(double pE, double binding) { //******************************************************** const double V = binding / 1000.; // binding potential const double mn = PhysConst::mass_neutron; // neutron mass const double mp = PhysConst::mass_proton; // proton mass const double mn_eff = mn - V; // effective proton mass const double pki = (pE / 1000.0) - mp; double q2qe = mn_eff * mn_eff - mp * mp + 2 * mn_eff * (pki + mp - mn_eff); return q2qe; }; //******************************************************************** double FitUtils::EnuQErec(TLorentzVector pmu, double costh, double binding, bool neutrino) { //******************************************************************** // Convert all values to GeV const double V = binding / 1000.; // binding potential const double mn = PhysConst::mass_neutron; // neutron mass const double mp = PhysConst::mass_proton; // proton mass double mN_eff = mn - V; double mN_oth = mp; if (!neutrino) { mN_eff = mp - V; mN_oth = mn; } double el = pmu.E() / 1000.; double pl = (pmu.Vect().Mag()) / 1000.; // momentum of lepton double ml = sqrt(el * el - pl * pl); // lepton mass double rEnu = (2 * mN_eff * el - ml * ml + mN_oth * mN_oth - mN_eff * mN_eff) / (2 * (mN_eff - el + pl * costh)); return rEnu; }; // Another good old helper function double FitUtils::EnuQErec(TLorentzVector pmu, TLorentzVector pnu, double binding, bool neutrino) { return EnuQErec(pmu, cos(pnu.Vect().Angle(pmu.Vect())), binding, neutrino); } double FitUtils::Q2QErec(TLorentzVector pmu, double costh, double binding, bool neutrino) { double el = pmu.E() / 1000.; double pl = (pmu.Vect().Mag()) / 1000.; // momentum of lepton double ml = sqrt(el * el - pl * pl); // lepton mass double rEnu = EnuQErec(pmu, costh, binding, neutrino); double q2 = -ml * ml + 2. * rEnu * (el - pl * costh); return q2; }; double FitUtils::Q2QErec(TLorentzVector Pmu, TLorentzVector Pnu, double binding, bool neutrino) { double q2qe = Q2QErec(Pmu, cos(Pnu.Vect().Angle(Pmu.Vect())), binding, neutrino); return q2qe; } double FitUtils::EnuQErec(double pl, double costh, double binding, bool neutrino) { if (pl < 0) return 0.; // Make sure nobody is silly double mN_eff = PhysConst::mass_neutron - binding / 1000.; double mN_oth = PhysConst::mass_proton; if (!neutrino) { mN_eff = PhysConst::mass_proton - binding / 1000.; mN_oth = PhysConst::mass_neutron; } double ml = PhysConst::mass_muon; double el = sqrt(pl * pl + ml * ml); double rEnu = (2 * mN_eff * el - ml * ml + mN_oth * mN_oth - mN_eff * mN_eff) / (2 * (mN_eff - el + pl * costh)); return rEnu; }; double FitUtils::Q2QErec(double pl, double costh, double binding, bool neutrino) { if (pl < 0) return 0.; // Make sure nobody is silly double ml = PhysConst::mass_muon; double el = sqrt(pl * pl + ml * ml); double rEnu = EnuQErec(pl, costh, binding, neutrino); double q2 = -ml * ml + 2. * rEnu * (el - pl * costh); return q2; }; //******************************************************************** // Reconstructs Enu for CC1pi0 // Very similar for CC1pi+ reconstruction double FitUtils::EnuCC1pi0rec(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector ppi0) { //******************************************************************** double E_mu = pmu.E() / 1000; double p_mu = pmu.Vect().Mag() / 1000; double m_mu = sqrt(E_mu * E_mu - p_mu * p_mu); double th_nu_mu = pnu.Vect().Angle(pmu.Vect()); double E_pi0 = ppi0.E() / 1000; double p_pi0 = ppi0.Vect().Mag() / 1000; double m_pi0 = sqrt(E_pi0 * E_pi0 - p_pi0 * p_pi0); double th_nu_pi0 = pnu.Vect().Angle(ppi0.Vect()); const double m_n = PhysConst::mass_neutron; // neutron mass const double m_p = PhysConst::mass_proton; // proton mass double th_pi0_mu = ppi0.Vect().Angle(pmu.Vect()); double rEnu = (m_mu * m_mu + m_pi0 * m_pi0 + m_n * m_n - m_p * m_p - 2 * m_n * (E_pi0 + E_mu) + 2 * E_pi0 * E_mu - 2 * p_pi0 * p_mu * cos(th_pi0_mu)) / (2 * (E_pi0 + E_mu - p_pi0 * cos(th_nu_pi0) - p_mu * cos(th_nu_mu) - m_n)); return rEnu; }; //******************************************************************** // Reconstruct Q2 for CC1pi0 // Beware: uses true Enu, not reconstructed Enu double FitUtils::Q2CC1pi0rec(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector ppi0) { //******************************************************************** double E_mu = pmu.E() / 1000.; // energy of lepton in GeV double p_mu = pmu.Vect().Mag() / 1000.; // momentum of lepton double m_mu = sqrt(E_mu * E_mu - p_mu * p_mu); // lepton mass double th_nu_mu = pnu.Vect().Angle(pmu.Vect()); // double rEnu = EnuCC1pi0rec(pnu, pmu, ppi0); //reconstructed neutrino energy // Use true neutrino energy double rEnu = pnu.E() / 1000.; double q2 = -m_mu * m_mu + 2. * rEnu * (E_mu - p_mu * cos(th_nu_mu)); return q2; }; //******************************************************************** // Reconstruct Enu for CC1pi+ // pionInfo reflects if we're using pion kinematics or not // In T2K CC1pi+ CH the Michel tag is used for pion in which pion kinematic info // is lost and Enu is reconstructed without pion kinematics double FitUtils::EnuCC1piprec(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector ppi, bool pionInfo) { //******************************************************************** double E_mu = pmu.E() / 1000.; double p_mu = pmu.Vect().Mag() / 1000.; double m_mu = sqrt(E_mu * E_mu - p_mu * p_mu); double E_pi = ppi.E() / 1000.; double p_pi = ppi.Vect().Mag() / 1000.; double m_pi = sqrt(E_pi * E_pi - p_pi * p_pi); const double m_n = PhysConst::mass_neutron; // neutron/proton mass // should really take proton mass for proton interaction, neutron for neutron // interaction. However, difference is pretty much negligable here! // need this angle too double th_nu_pi = pnu.Vect().Angle(ppi.Vect()); double th_nu_mu = pnu.Vect().Angle(pmu.Vect()); double th_pi_mu = ppi.Vect().Angle(pmu.Vect()); double rEnu = -999; // If experiment doesn't have pion kinematic information (T2K CC1pi+ CH // example of this; Michel e sample has no directional information on pion) // We'll need to modify the reconstruction variables if (!pionInfo) { // Assumes that pion angle contribution contributes net zero // Also assumes the momentum of reconstructed pions when using Michel // electrons is 130 MeV // So need to redefine E_pi and p_pi // It's a little unclear what happens to the pmu . ppi term (4-vector); do // we include the angular contribution? // This below doesn't th_nu_pi = M_PI / 2.; p_pi = 0.130; E_pi = sqrt(p_pi * p_pi + m_pi * m_pi); // rEnu = (m_mu*m_mu + m_pi*m_pi - 2*m_n*(E_mu + E_pi) + 2*E_mu*E_pi - // 2*p_mu*p_pi) / (2*(E_mu + E_pi - p_mu*cos(th_nu_mu) - m_n)); } rEnu = (m_mu * m_mu + m_pi * m_pi - 2 * m_n * (E_pi + E_mu) + 2 * E_pi * E_mu - 2 * p_pi * p_mu * cos(th_pi_mu)) / (2 * (E_pi + E_mu - p_pi * cos(th_nu_pi) - p_mu * cos(th_nu_mu) - m_n)); return rEnu; }; //******************************************************************** // Reconstruct neutrino energy from outgoing particles; will differ from the // actual neutrino energy. Here we use assumption of a Delta resonance double FitUtils::EnuCC1piprecDelta(TLorentzVector pnu, TLorentzVector pmu) { //******************************************************************** const double m_Delta = PhysConst::mass_delta; // PDG value for Delta mass in GeV const double m_n = PhysConst::mass_neutron; // neutron/proton mass // should really take proton mass for proton interaction, neutron for neutron // interaction. However, difference is pretty much negligable here! double E_mu = pmu.E() / 1000; double p_mu = pmu.Vect().Mag() / 1000; double m_mu = sqrt(E_mu * E_mu - p_mu * p_mu); double th_nu_mu = pnu.Vect().Angle(pmu.Vect()); double rEnu = (m_Delta * m_Delta - m_n * m_n - m_mu * m_mu + 2 * m_n * E_mu) / (2 * (m_n - E_mu + p_mu * cos(th_nu_mu))); return rEnu; }; // MOVE TO T2K UTILS! //******************************************************************** // Reconstruct Enu using "extended MiniBooNE" as defined in Raquel's T2K TN // // Supposedly includes pion direction and binding energy of target nucleon // I'm not convinced (yet), maybe double FitUtils::EnuCC1piprec_T2K_eMB(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector ppi) { //******************************************************************** // Unit vector for neutrino momentum TVector3 p_nu_vect_unit = pnu.Vect() * (1. / pnu.E()); double E_mu = pmu.E() / 1000.; TVector3 p_mu_vect = pmu.Vect() * (1. / 1000.); double E_pi = ppi.E() / 1000.; TVector3 p_pi_vect = ppi.Vect() * (1. / 1000.); double E_bind = 25. / 1000.; double m_p = PhysConst::mass_proton; // Makes life a little easier, gonna square this one double a1 = m_p - E_bind - E_mu - E_pi; // Just gets the magnitude square of the muon and pion momentum vectors double a2 = (p_mu_vect + p_pi_vect).Mag2(); // Gets the somewhat complicated scalar product between neutrino and // (p_mu+p_pi), scaled to Enu double a3 = p_nu_vect_unit * (p_mu_vect + p_pi_vect); double rEnu = (m_p * m_p - a1 * a1 + a2) / (2 * (m_p - E_bind - E_mu - E_pi + a3)); return rEnu; } //******************************************************************** // Reconstructed Q2 for CC1pi+ // // enuType describes how the neutrino energy is reconstructed // 0 uses true neutrino energy; case for MINERvA and MiniBooNE // 1 uses "extended MiniBooNE" reconstructed (T2K CH) // 2 uses "MiniBooNE" reconstructed (EnuCC1piprec with pionInfo = true) (T2K CH) // "MiniBooNE" reconstructed (EnuCC1piprec with pionInfo = false, the // case for T2K when using Michel tag) (T2K CH) // 3 uses Delta for reconstruction (T2K CH) double FitUtils::Q2CC1piprec(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector ppi, int enuType, bool pionInfo) { //******************************************************************** double E_mu = pmu.E() / 1000.; // energy of lepton in GeV double p_mu = pmu.Vect().Mag() / 1000.; // momentum of lepton double m_mu = sqrt(E_mu * E_mu - p_mu * p_mu); // lepton mass double th_nu_mu = pnu.Vect().Angle(pmu.Vect()); // Different ways of reconstructing the neutrino energy; default is just to // use the truth (case 0) double rEnu = -999; switch (enuType) { case 0: // True neutrino energy, default; this is the case for when Q2 // defined as Q2 true (MiniBooNE, MINERvA) rEnu = pnu.E() / 1000.; break; case 1: // Extended MiniBooNE reconstructed, as defined by Raquel's CC1pi+ // CH T2K analysis rEnu = EnuCC1piprec_T2K_eMB(pnu, pmu, ppi); break; case 2: // MiniBooNE reconstructed, as defined by MiniBooNE and Raquel's // CC1pi+ CH T2K analysis and Linda's CC1pi+ H2O // Can have this with and without pion info, depending on if Michel tag // used (Raquel) rEnu = EnuCC1piprec(pnu, pmu, ppi, pionInfo); break; case 3: rEnu = EnuCC1piprecDelta(pnu, pmu); break; } // No need for default here since default value of enuType = 0, defined in // header double q2 = -m_mu * m_mu + 2. * rEnu * (E_mu - p_mu * cos(th_nu_mu)); return q2; }; //******************************************************************** // Returns the reconstructed W from a nucleon and an outgoing pion // // Could do this a lot more clever (pp + ppi).Mag() would do the job, but this // would be less instructive //******************************************************************** double FitUtils::MpPi(TLorentzVector pp, TLorentzVector ppi) { double E_p = pp.E(); double p_p = pp.Vect().Mag(); double m_p = sqrt(E_p * E_p - p_p * p_p); double E_pi = ppi.E(); double p_pi = ppi.Vect().Mag(); double m_pi = sqrt(E_pi * E_pi - p_pi * p_pi); double th_p_pi = pp.Vect().Angle(ppi.Vect()); // fairly easy thing to derive since bubble chambers measure the proton! double invMass = sqrt(m_p * m_p + m_pi * m_pi + 2 * E_p * E_pi - 2 * p_pi * p_p * cos(th_p_pi)); return invMass; }; //******************************************************** // Reconstruct the hadronic mass using neutrino and muon // Could technically do E_nu = EnuCC1pipRec(pnu,pmu,ppi) too, but this wwill be // reconstructed Enu; so gives reconstructed Wrec which most of the time isn't // used! // // Only MINERvA uses this so far; and the Enu is Enu_true // If we want W_true need to take initial state nucleon motion into account // Return value is in MeV!!! double FitUtils::Wrec(TLorentzVector pnu, TLorentzVector pmu) { //******************************************************** double E_mu = pmu.E(); double p_mu = pmu.Vect().Mag(); double m_mu = sqrt(E_mu * E_mu - p_mu * p_mu); double th_nu_mu = pnu.Vect().Angle(pmu.Vect()); // The factor of 1000 is necessary for downstream functions const double m_p = PhysConst::mass_proton * 1000; // MINERvA cut on W_exp which is tuned to W_true; so use true Enu from // generators double E_nu = pnu.E(); double w_rec = sqrt(m_p * m_p + m_mu * m_mu - 2 * m_p * E_mu + 2 * E_nu * (m_p - E_mu + p_mu * cos(th_nu_mu))); return w_rec; }; //******************************************************** // Reconstruct the true hadronic mass using the initial state and muon // Could technically do E_nu = EnuCC1pipRec(pnu,pmu,ppi) too, but this wwill be // reconstructed Enu; so gives reconstructed Wrec which most of the time isn't // used! // // No one seems to use this because it's fairly MC dependent! // Return value is in MeV!!! double FitUtils::Wtrue(TLorentzVector pnu, TLorentzVector pmu, TLorentzVector pnuc) { //******************************************************** // Could simply do the TLorentzVector operators here but this is more // instructive? // ... and prone to errors ... double E_mu = pmu.E(); double p_mu = pmu.Vect().Mag(); double m_mu = sqrt(E_mu * E_mu - p_mu * p_mu); double th_nu_mu = pnu.Vect().Angle(pmu.Vect()); double E_nuc = pnuc.E(); double p_nuc = pnuc.Vect().Mag(); double m_nuc = sqrt(E_nuc * E_nuc - p_nuc * p_nuc); double th_nuc_mu = pmu.Vect().Angle(pnuc.Vect()); double th_nu_nuc = pnu.Vect().Angle(pnuc.Vect()); double E_nu = pnu.E(); double w_rec = sqrt(m_nuc * m_nuc + m_mu * m_mu - 2 * E_nu * E_mu + 2 * E_nu * p_mu * cos(th_nu_mu) - 2 * E_nuc * E_mu + 2 * p_nuc * p_mu * cos(th_nuc_mu) + 2 * E_nu * E_nuc - 2 * E_nu * p_nuc * cos(th_nu_nuc)); return w_rec; }; double FitUtils::SumKE_PartVect(std::vector const fps) { double sum = 0.0; for (size_t p_it = 0; p_it < fps.size(); ++p_it) { sum += fps[p_it]->KE(); } return sum; } double FitUtils::SumTE_PartVect(std::vector const fps) { double sum = 0.0; for (size_t p_it = 0; p_it < fps.size(); ++p_it) { sum += fps[p_it]->E(); } return sum; } /* E Recoil */ double FitUtils::GetErecoil_TRUE(FitEvent *event) { // Get total energy of hadronic system. double Erecoil = 0.0; for (unsigned int i = 2; i < event->Npart(); i++) { // Only final state if (!event->PartInfo(i)->fIsAlive) continue; if (event->PartInfo(i)->fNEUTStatusCode != 0) continue; // Skip Lepton if (abs(event->PartInfo(i)->fPID) == abs(event->PartInfo(0)->fPID) - 1) continue; // Add Up KE of protons and TE of everything else if (event->PartInfo(i)->fPID == 2212 || event->PartInfo(i)->fPID == 2112) { Erecoil += fabs(event->PartInfo(i)->fP.E()) - fabs(event->PartInfo(i)->fP.Mag()); } else { Erecoil += event->PartInfo(i)->fP.E(); } } return Erecoil; } double FitUtils::GetErecoil_CHARGED(FitEvent *event) { // Get total energy of hadronic system. double Erecoil = 0.0; for (unsigned int i = 2; i < event->Npart(); i++) { // Only final state if (!event->PartInfo(i)->fIsAlive) continue; if (event->PartInfo(i)->fNEUTStatusCode != 0) continue; // Skip Lepton if (abs(event->PartInfo(i)->fPID) == abs(event->PartInfo(0)->fPID) - 1) continue; // Skip Neutral particles if (event->PartInfo(i)->fPID == 2112 || event->PartInfo(i)->fPID == 111 || event->PartInfo(i)->fPID == 22) continue; // Add Up KE of protons and TE of everything else if (event->PartInfo(i)->fPID == 2212) { Erecoil += fabs(event->PartInfo(i)->fP.E()) - fabs(event->PartInfo(i)->fP.Mag()); } else { Erecoil += event->PartInfo(i)->fP.E(); } } return Erecoil; } // MOVE TO MINERVA Utils! double FitUtils::GetErecoil_MINERvA_LowRecoil(FitEvent *event) { // Get total energy of hadronic system. double Erecoil = 0.0; for (unsigned int i = 2; i < event->Npart(); i++) { // Only final state if (!event->PartInfo(i)->fIsAlive) continue; if (event->PartInfo(i)->Status() != kFinalState) continue; // Skip Lepton if (abs(event->PartInfo(i)->fPID) == 13) continue; // Skip Neutrons particles if (event->PartInfo(i)->fPID == 2112) continue; int PID = event->PartInfo(i)->fPID; // KE of Protons and charged pions if (PID == 2212 or PID == 211 or PID == -211) { // Erecoil += FitUtils::T(event->PartInfo(i)->fP); Erecoil += fabs(event->PartInfo(i)->fP.E()) - fabs(event->PartInfo(i)->fP.Mag()); // Total Energy of non-neutrons // } else if (PID != 2112 and PID < 999 and PID != 22 and abs(PID) != // 14) { } else if (PID == 111 || PID == 11 || PID == -11 || PID == 22) { Erecoil += (event->PartInfo(i)->fP.E()); } } return Erecoil; } // MOVE TO MINERVA Utils! -// The alternative Eavailble definition takes true q0 and subtracts the kinetic +// The alternative Eavailable definition takes true q0 and subtracts the kinetic // energy of neutrons and pion masses returns in MeV double FitUtils::Eavailable(FitEvent *event) { double Eav = 0.0; // Now take q0 and subtract Eav double q0 = event->GetBeamPart()->fP.E(); // Get the pdg of incoming neutrino int ISPDG = event->GetBeamPartPDG(); // For CC if (event->IsCC() && event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))){ q0 -= event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))->fP.E(); - } else { + } else if (event->GetHMFSParticle(ISPDG)) { q0 -= event->GetHMFSParticle(ISPDG)->fP.E(); } for (unsigned int i = 2; i < event->Npart(); i++) { // Only final state if (!event->PartInfo(i)->fIsAlive) continue; if (event->PartInfo(i)->Status() != kFinalState) continue; int PID = event->PartInfo(i)->fPID; // Neutrons if (PID == 2112) { // Adding kinetic energy of neutron Eav += FitUtils::T(event->PartInfo(i)->fP) * 1000.; // All pion masses } else if (abs(PID) == 211 || PID == 111) { Eav += event->PartInfo(i)->fP.M(); } } return q0 - Eav; } TVector3 GetVectorInTPlane(const TVector3 &inp, const TVector3 &planarNormal) { TVector3 pnUnit = planarNormal.Unit(); double inpProjectPN = inp.Dot(pnUnit); TVector3 InPlanarInput = inp - (inpProjectPN * pnUnit); return InPlanarInput; } TVector3 GetUnitVectorInTPlane(const TVector3 &inp, const TVector3 &planarNormal) { return GetVectorInTPlane(inp, planarNormal).Unit(); } Double_t FitUtils::GetDeltaPhiT(TVector3 const &V_lepton, TVector3 const &V_other, TVector3 const &Normal, bool PiMinus) { TVector3 V_lepton_T = GetUnitVectorInTPlane(V_lepton, Normal); TVector3 V_other_T = GetUnitVectorInTPlane(V_other, Normal); return PiMinus ? acos(V_lepton_T.Dot(V_other_T)) : (M_PI - acos(V_lepton_T.Dot(V_other_T))); } TVector3 FitUtils::GetDeltaPT(TVector3 const &V_lepton, TVector3 const &V_other, TVector3 const &Normal) { TVector3 V_lepton_T = GetVectorInTPlane(V_lepton, Normal); TVector3 V_other_T = GetVectorInTPlane(V_other, Normal); return V_lepton_T + V_other_T; } Double_t FitUtils::GetDeltaAlphaT(TVector3 const &V_lepton, TVector3 const &V_other, TVector3 const &Normal, bool PiMinus) { TVector3 DeltaPT = GetDeltaPT(V_lepton, V_other, Normal); return GetDeltaPhiT(V_lepton, DeltaPT, Normal, PiMinus); } double FitUtils::Get_STV_dpt_HMProton(FitEvent *event, int ISPDG, bool Is0pi) { // Check that the neutrino exists if (event->NumISParticle(ISPDG) == 0) { return -9999; } // Return 0 if the proton or muon are missing if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1)) == 0) { return -9999; } // Now get the TVector3s for each particle TVector3 const &NuP = event->GetHMISParticle(ISPDG)->fP.Vect(); TVector3 const &LeptonP = event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))->fP.Vect(); // Find the highest momentum proton in the event between ProtonMinCut_MeV and // ProtonMaxCut_MeV MeV with cos(theta_p) > ProtonCosThetaCut TLorentzVector Pprot = event->GetHMFSParticle(2212)->fP; // Get highest momentum proton in allowed proton range TVector3 HadronP = Pprot.Vect(); // If we don't have a CC0pi signal definition we also add in pion momentum if (!Is0pi) { if (event->NumFSParticle(PhysConst::pdg_pions) == 0) { return -9999; } // Count up pion momentum TLorentzVector ppi = event->GetHMFSParticle(PhysConst::pdg_pions)->fP; HadronP += ppi.Vect(); } return GetDeltaPT(LeptonP, HadronP, NuP).Mag(); } double FitUtils::Get_STV_dphit_HMProton(FitEvent *event, int ISPDG, bool Is0pi) { // Check that the neutrino exists if (event->NumISParticle(ISPDG) == 0) { return -9999; } // Return 0 if the proton or muon are missing if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1)) == 0) { return -9999; } // Now get the TVector3s for each particle TVector3 const &NuP = event->GetHMISParticle(ISPDG)->fP.Vect(); TVector3 const &LeptonP = event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))->fP.Vect(); // Find the highest momentum proton in the event between ProtonMinCut_MeV and // ProtonMaxCut_MeV MeV with cos(theta_p) > ProtonCosThetaCut TLorentzVector Pprot = event->GetHMFSParticle(2212)->fP; TVector3 HadronP = Pprot.Vect(); if (!Is0pi) { if (event->NumFSParticle(PhysConst::pdg_pions) == 0) { return -9999; } TLorentzVector ppi = event->GetHMFSParticle(PhysConst::pdg_pions)->fP; HadronP += ppi.Vect(); } return GetDeltaPhiT(LeptonP, HadronP, NuP); } double FitUtils::Get_STV_dalphat_HMProton(FitEvent *event, int ISPDG, bool Is0pi) { // Check that the neutrino exists if (event->NumISParticle(ISPDG) == 0) { return -9999; } // Return 0 if the proton or muon are missing if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1)) == 0) { return -9999; } // Now get the TVector3s for each particle TVector3 const &NuP = event->GetHMISParticle(ISPDG)->fP.Vect(); TVector3 const &LeptonP = event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))->fP.Vect(); // Find the highest momentum proton in the event between ProtonMinCut_MeV and // ProtonMaxCut_MeV MeV with cos(theta_p) > ProtonCosThetaCut TLorentzVector Pprot = event->GetHMFSParticle(2212)->fP; TVector3 HadronP = Pprot.Vect(); if (!Is0pi) { if (event->NumFSParticle(PhysConst::pdg_pions) == 0) { return -9999; } TLorentzVector ppi = event->GetHMFSParticle(PhysConst::pdg_pions)->fP; HadronP += ppi.Vect(); } return GetDeltaAlphaT(LeptonP, HadronP, NuP); } // As defined in PhysRevC.95.065501 // Using prescription from arXiv 1805.05486 // Returns in GeV double FitUtils::Get_pn_reco_C_HMProton(FitEvent *event, int ISPDG, bool Is0pi) { const double mn = PhysConst::mass_neutron; // neutron mass const double mp = PhysConst::mass_proton; // proton mass // Check that the neutrino exists if (event->NumISParticle(ISPDG) == 0) { return -9999; } // Return 0 if the proton or muon are missing if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1)) == 0) { return -9999; } // Now get the TVector3s for each particle TVector3 const &NuP = event->GetHMISParticle(ISPDG)->fP.Vect(); TVector3 const &LeptonP = event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))->fP.Vect(); TLorentzVector Pprot = event->GetHMFSParticle(2212)->fP; TVector3 HadronP = Pprot.Vect(); double const el = event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))->E() / 1000.; double const eh = Pprot.E() / 1000.; if (!Is0pi) { if (event->NumFSParticle(PhysConst::pdg_pions) == 0) { return -9999; } TLorentzVector ppi = event->GetHMFSParticle(PhysConst::pdg_pions)->fP; HadronP += ppi.Vect(); } TVector3 dpt = GetDeltaPT(LeptonP, HadronP, NuP); double dptMag = dpt.Mag() / 1000.; double ma = 6 * mn + 6 * mp - 0.09216; // target mass (E is from PhysRevC.95.065501) double map = ma - mn + 0.02713; // remnant mass double pmul = LeptonP.Dot(NuP.Unit()) / 1000.; double phl = HadronP.Dot(NuP.Unit()) / 1000.; // double pmul = GetVectorInTPlane(LeptonP, dpt).Mag()/1000.; // double phl = GetVectorInTPlane(HadronP, dpt).Mag()/1000.; double R = ma + pmul + phl - el - eh; double dpl = 0.5 * R - (map * map + dptMag * dptMag) / (2 * R); // double dpl = ((R*R)-(dptMag*dptMag)-(map*map))/(2*R); // as in in // PhysRevC.95.065501 - gives same result double pn_reco = sqrt((dptMag * dptMag) + (dpl * dpl)); // std::cout << "Diagnostics: " << std::endl; // std::cout << "mn: " << mn << std::endl; // std::cout << "ma: " << ma << std::endl; // std::cout << "map: " << map << std::endl; // std::cout << "pmu: " << LeptonP.Mag()/1000. << std::endl; // std::cout << "ph: " << HadronP.Mag()/1000. << std::endl; // std::cout << "pmul: " << pmul << std::endl; // std::cout << "phl: " << phl << std::endl; // std::cout << "el: " << el << std::endl; // std::cout << "eh: " << eh << std::endl; // std::cout << "R: " << R << std::endl; // std::cout << "dptMag: " << dptMag << std::endl; // std::cout << "dpl: " << dpl << std::endl; // std::cout << "pn_reco: " << pn_reco << std::endl; return pn_reco; } double FitUtils::Get_pn_reco_Ar_HMProton(FitEvent *event, int ISPDG, bool Is0pi) { const double mn = PhysConst::mass_neutron; // neutron mass const double mp = PhysConst::mass_proton; // proton mass // Check that the neutrino exists if (event->NumISParticle(ISPDG) == 0) { return -9999; } // Return 0 if the proton or muon are missing if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1)) == 0) { return -9999; } // Now get the TVector3s for each particle TVector3 const &NuP = event->GetHMISParticle(ISPDG)->fP.Vect(); TVector3 const &LeptonP = event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))->fP.Vect(); TLorentzVector Pprot = event->GetHMFSParticle(2212)->fP; TVector3 HadronP = Pprot.Vect(); double const el = event->GetHMFSParticle(ISPDG + ((ISPDG < 0) ? 1 : -1))->E() / 1000.; double const eh = Pprot.E() / 1000.; if (!Is0pi) { if (event->NumFSParticle(PhysConst::pdg_pions) == 0) { return -9999; } TLorentzVector ppi = event->GetHMFSParticle(PhysConst::pdg_pions)->fP; HadronP += ppi.Vect(); } TVector3 dpt = GetDeltaPT(LeptonP, HadronP, NuP); double dptMag = dpt.Mag() / 1000.; // double ma = 6*mn + 6*mp - 0.09216; // target mass (E is from // PhysRevC.95.065501) double map = ma - mn + 0.02713; // remnant mass double ma = 6 * mn + 6 * mp - 0.34381; // target mass (E is from PhysRevC.95.065501) double map = ma - mn + 0.02713; // remnant mass double pmul = LeptonP.Dot(NuP.Unit()) / 1000.; double phl = HadronP.Dot(NuP.Unit()) / 1000.; // double pmul = GetVectorInTPlane(LeptonP, dpt).Mag()/1000.; // double phl = GetVectorInTPlane(HadronP, dpt).Mag()/1000.; double R = ma + pmul + phl - el - eh; double dpl = 0.5 * R - (map * map + dptMag * dptMag) / (2 * R); // double dpl = ((R*R)-(dptMag*dptMag)-(map*map))/(2*R); // as in in // PhysRevC.95.065501 - gives same result double pn_reco = sqrt((dptMag * dptMag) + (dpl * dpl)); return pn_reco; } // Get Cos theta with Adler angles double FitUtils::CosThAdler(TLorentzVector Pnu, TLorentzVector Pmu, TLorentzVector Ppi, TLorentzVector Pprot) { // Get the "resonance" lorentz vector (pion proton system) TLorentzVector Pres = Pprot + Ppi; // Boost the particles into the resonance rest frame so we can define the // x,y,z axis Pnu.Boost(-Pres.BoostVector()); Pmu.Boost(-Pres.BoostVector()); Ppi.Boost(-Pres.BoostVector()); // The z-axis is defined as the axis of three-momentum transfer, \vec{k} // Also unit normalise the axis TVector3 zAxis = (Pnu.Vect() - Pmu.Vect()) * (1.0 / ((Pnu.Vect() - Pmu.Vect()).Mag())); // Then the angle between the pion in the "resonance" rest-frame and the // z-axis is the theta Adler angle double costhAdler = cos(Ppi.Vect().Angle(zAxis)); return costhAdler; } // Get phi with Adler angles, a bit more complicated... double FitUtils::PhiAdler(TLorentzVector Pnu, TLorentzVector Pmu, TLorentzVector Ppi, TLorentzVector Pprot) { // Get the "resonance" lorentz vector (pion proton system) TLorentzVector Pres = Pprot + Ppi; // Boost the particles into the resonance rest frame so we can define the // x,y,z axis Pnu.Boost(-Pres.BoostVector()); Pmu.Boost(-Pres.BoostVector()); Ppi.Boost(-Pres.BoostVector()); // The z-axis is defined as the axis of three-momentum transfer, \vec{k} // Also unit normalise the axis TVector3 zAxis = (Pnu.Vect() - Pmu.Vect()) * (1.0 / ((Pnu.Vect() - Pmu.Vect()).Mag())); // The y-axis is then defined perpendicular to z and muon momentum in the // resonance frame TVector3 yAxis = Pnu.Vect().Cross(Pmu.Vect()); yAxis *= 1.0 / double(yAxis.Mag()); // And the x-axis is then simply perpendicular to z and x TVector3 xAxis = yAxis.Cross(zAxis); xAxis *= 1.0 / double(xAxis.Mag()); // Project the pion on to x and y axes double x = Ppi.Vect().Dot(xAxis); double y = Ppi.Vect().Dot(yAxis); double newphi = atan2(y, x) * (180. / M_PI); // Convert negative angles to positive if (newphi < 0.0) newphi += 360.0; return newphi; } //******************************************************************** double FitUtils::ppInfK(TLorentzVector pmu, double costh, double binding, bool neutrino) { //******************************************************************** // Convert all values to GeV // const double V = binding / 1000.; // binding potential // const double mn = PhysConst::mass_neutron; // neutron mass const double mp = PhysConst::mass_proton; // proton mass double el = pmu.E() / 1000.; // double pl = (pmu.Vect().Mag()) / 1000.; // momentum of lepton double enu = EnuQErec(pmu, costh, binding, neutrino); double ep_inf = enu - el + mp; double pp_inf = sqrt(ep_inf * ep_inf - mp * mp); return pp_inf; }; //******************************************************************** TVector3 FitUtils::tppInfK(TLorentzVector pmu, double costh, double binding, bool neutrino) { //******************************************************************** // Convert all values to GeV // const double V = binding / 1000.; // binding potential // const double mn = PhysConst::mass_neutron; // neutron mass // const double mp = PhysConst::mass_proton; // proton mass double pl_x = pmu.X() / 1000.; double pl_y = pmu.Y() / 1000.; double pl_z = pmu.Z() / 1000.; double enu = EnuQErec(pmu, costh, binding, neutrino); TVector3 tpp_inf(-pl_x, -pl_y, -pl_z + enu); return tpp_inf; }; //******************************************************************** double FitUtils::cthpInfK(TLorentzVector pmu, double costh, double binding, bool neutrino) { //******************************************************************** // Convert all values to GeV // const double V = binding / 1000.; // binding potential // const double mn = PhysConst::mass_neutron; // neutron mass const double mp = PhysConst::mass_proton; // proton mass double el = pmu.E() / 1000.; double pl = (pmu.Vect().Mag()) / 1000.; // momentum of lepton double enu = EnuQErec(pmu, costh, binding, neutrino); double ep_inf = enu - el + mp; double pp_inf = sqrt(ep_inf * ep_inf - mp * mp); double cth_inf = (enu * enu + pp_inf * pp_inf - pl * pl) / (2 * enu * pp_inf); return cth_inf; };